Convert an address to a scriptPubKey
(self)
| 174 | raise CBitcoinAddressError('not a P2SH scriptPubKey') |
| 175 | |
| 176 | def to_scriptPubKey(self): |
| 177 | """Convert an address to a scriptPubKey""" |
| 178 | assert self.nVersion == bitcoin.params.BASE58_PREFIXES['SCRIPT_ADDR'] |
| 179 | return script.CScript([script.OP_HASH160, self, script.OP_EQUAL]) |
| 180 | |
| 181 | def to_redeemScript(self): |
| 182 | return self.to_scriptPubKey() |
no outgoing calls