chore(bip-0046): scriptPubKey -> witness programm

This commit is contained in:
theborakompanioni 2024-05-23 15:52:46 +02:00
parent 00c7d0b815
commit f9d370d3da
No known key found for this signature in database
GPG Key ID: E8070AF0053AAC0D

View File

@ -83,7 +83,7 @@ month = 1 + index % 12
=== Address derivation ===
To derive the address from the above calculated public key and timelock, we create a <tt>witness script</tt> which locks the funds until the <tt>timelock</tt>, and then checks the signature of the <tt>derived_key</tt>. The <tt>witness script</tt> is hashed with SHA256 to produce a 32-byte hash value that forms the <tt>scriptPubKey</tt> of the P2WSH address.
To derive the address from the above calculated public key and timelock, we create a <tt>witness script</tt> which locks the funds until the <tt>timelock</tt>, and then checks the signature of the <tt>derived_key</tt>. The <tt>witness script</tt> is hashed with SHA256 to produce a 32-byte hash value that forms the <tt>witness program</tt> in the output script of the P2WSH address.
witnessScript: <timelock> OP_CHECKLOCKTIMEVERIFY OP_DROP <derived_key> OP_CHECKSIG
witness: <signature> <pubkey>