MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / from_bytes

Method from_bytes

bitcoin/wallet.py:145–153  ·  view source on GitHub ↗
(cls, data, nVersion=None)

Source from the content-addressed store, hash-verified

143class P2SHBitcoinAddress(CBase58BitcoinAddress):
144 @classmethod
145 def from_bytes(cls, data, nVersion=None):
146 if nVersion is None:
147 nVersion = bitcoin.params.BASE58_PREFIXES['SCRIPT_ADDR']
148
149 elif nVersion != bitcoin.params.BASE58_PREFIXES['SCRIPT_ADDR']:
150 raise ValueError('nVersion incorrect for P2SH address: got %d; expected %d' % \
151 (nVersion, bitcoin.params.BASE58_PREFIXES['SCRIPT_ADDR']))
152
153 return super(P2SHBitcoinAddress, cls).from_bytes(data, nVersion)
154
155 @classmethod
156 def from_redeemScript(cls, redeemScript):

Callers 9

from_bytesMethod · 0.45
from_bytesMethod · 0.45
from_scriptPubKeyMethod · 0.45
from_bytesMethod · 0.45
from_pubkeyMethod · 0.45
from_scriptPubKeyMethod · 0.45
from_scriptPubKeyMethod · 0.45
from_scriptPubKeyMethod · 0.45
from_secret_bytesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected