Closed melaxon closed 4 years ago
I replaced blockchain.address.get_balance to blockchain.scripthash.get_balance to comply with new protocol methods, but: 1) The hash must be a string while the object is returned by AddressCreator (otherwise error is returned by server):
BitWasp\Bitcoin\Address\PayToPubKeyHashAddress Object ( [hash:protected] => BitWasp\Buffertools\Buffer Object ( [size] => 20 [buffer] => 0xcebb2851a9c7cfe2582c12ecaf7f3ff4383d1dc0 ) )
not sure how to get the buffer (protected property) without modifying BitWasp\Buffertools\Buffer class
2) Based on https://electrumx.readthedocs.io/en/latest/protocol-basics.html#script-hashes This hash must be SHA256 of P2PKH that is quite different than the value in the buffer
I replaced blockchain.address.get_balance to blockchain.scripthash.get_balance to comply with new protocol methods, but: 1) The hash must be a string while the object is returned by AddressCreator (otherwise error is returned by server):
not sure how to get the buffer (protected property) without modifying BitWasp\Buffertools\Buffer class
2) Based on https://electrumx.readthedocs.io/en/latest/protocol-basics.html#script-hashes This hash must be SHA256 of P2PKH that is quite different than the value in the buffer