forex.pm forex forum binary options trade

 Сryptocurrency exchanges => Binance - Сryptocurrency exchanges => Topic started by: Bitcoin on Feb 06, 2022, 06:48 am

Title: Generating P2WSH addresses | Is there a standard WitnessScript?
Post by: Bitcoin on Feb 06, 2022, 06:48 am
Generating P2WSH addresses | Is there a standard WitnessScript?

For the examples below I am going to be talking of 1-of-1 multisig only derived from a single private key.


For P2WPKH, the address is generated using using hash160 of the public key which acts as the witness program.


For P2WSH, is there any standard witness program? The demo in https://bc-2.jp/tools/bech32demo/index.html uses <pubkey> OP_CHECKSIG[0xac] as the WitnessScript. While bitcoinaddress pip package uses a different approach (see https://github.com/fortesp/bitcoinaddress/blob/master/bitcoinaddress/address.py#L130-L133 )


(Please excuse any wrong nomenclature I might have used in this question)


Source: Generating P2WSH addresses | Is there a standard WitnessScript? (https://bitcoin.stackexchange.com/questions/101368/generating-p2wsh-addresses-is-there-a-standard-witnessscript)