---
# System prepended metadata

title: BitGo Activate Jimmy Song Workshop Qualifying Question

---

# BitGo Activate Jimmy Song Workshop Qualifying Question

In Jimmy's book or course, you should have learned about Bitcoin script and the different types of output scripts.

Consider the following output script (`scriptPubKey`):
```
OP_HASH160 b15d853bf26f2352bfe84fbea0d02eeaffbb9b8e OP_EQUAL
```

Please answer the following questions:
* What type of output script is this?

Answer: This is a `OP_HASH160 <20 byte hash> OP_EQUAL` script that is defined by [BIP16](https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki#specification) as a Pay-to-script-hash (P2SH) output script.
* What address(es) does this output script correspond to?

Answer: The address for this output script can be found with the following node script:
```javascript=
import * as bitcoin from 'bitcoinjs-lib';

const script = 'OP_HASH160 b15d853bf26f2352bfe84fbea0d02eeaffbb9b8e OP_EQUAL';

const bytes = bitcoin.script.fromASM(script);
const addr = bitcoin.address.fromOutputScript(bytes);
console.log(addr);
```

```shell=
$ node p2sh-output-script.mjs
3HrqZQs2ePpDmdPBCKW2Ve1Zkervoje3SL
```

* Is there more than one address that this output script can correspond to? Please describe why there are multiple or why there is just one.

Answer: There is only one address that corresponds to this output script. [BIP 13](https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki) only allows P2SH output scripts to be encoded as a base58 address. Specifically, bech32 address encoding is not allowed, as those are reserved for use only by native segwit outputs (see [BIP 173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki)), which have a different output script (see [BIP 141](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki)).

* What would you need to provide in the `scriptSig` of an input in order to spend an output encumbered by this script?

Answer: You would need to provide as the `scriptSig` a valid script which, when hashed first with SHA256 and then with RIPEMD-160, is `b15d853bf26f2352bfe84fbea0d02eeaffbb9b8e`. This redeem script would then have to evaluate without errors and leave a single non-zero element on the stack upon completion.