You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I want to be able to calculate "pay_to_address_script" from an address with Coinbin.
This is needed with the lately updated ElectrumX according to its docs.
Someone in bitcoinj-js lib #bitcoinjs/bitcoinjs-lib#990 posted a similiar request and had it solved with the coding:
letscript=bitcoin.address.toOutputScript(address)lethash=bitcoin.crypto.sha256(script)letreversedHash=newBuffer(hash.reverse())console.log(address,' maps to ',reversedHash.toString('hex'))
any help or advice on this issue would make me happy, Zilveer
The text was updated successfully, but these errors were encountered:
zilveer
changed the title
Calculate scripthash from address (ElectrumX API integration)
Calculate Public Key Hash from address (ElectrumX API integration)
Mar 30, 2023
zilveer
changed the title
Calculate Public Key Hash from address (ElectrumX API integration)
Calculate pay_to_address_script from address (ElectrumX API integration)
Mar 30, 2023
Hi,
I want to be able to calculate "pay_to_address_script" from an address with Coinbin.
This is needed with the lately updated ElectrumX according to its docs.
Someone in bitcoinj-js lib #bitcoinjs/bitcoinjs-lib#990 posted a similiar request and had it solved with the coding:
For ElectrumX reference: https://github.com/kyuupichan/electrumx/blob/4dd226f9c090d968b80360d607368f5213ccaa56/lib/coins.py#L165
this is my attempt so far but I am doing something wrong.
here is ElectrumX guide on how to convert
address
toscript hashes
.any help or advice on this issue would make me happy, Zilveer
The text was updated successfully, but these errors were encountered: