Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Script conversion method p2wpkh_script_code #954

Merged
merged 1 commit into from Apr 20, 2022

Commits on Apr 18, 2022

  1. Add Script conversion method p2wpkh_script_code

    In order to sign a utxo that does a p2wpkh spend we need to create the
    script that can be used to create a sighash. In the libbitcoin docs this
    is referred to as the 'script code' [0].
    
    The script is the same as a p2pkh script but the pubkey_hash is found in
    the scriptPubkey.
    
    Add a `Script` conversion method that checks if `self` is a v0 p2wpkh
    script and if so extracts the pubkey_hash and returns the required
    script.
    
    [0] https://github.com/libbitcoin/libbitcoin-system/wiki/P2WPKH-Transactions#spending-a-p2wpkh-output
    tcharding committed Apr 18, 2022
    Copy the full SHA
    d882b68 View commit details
    Browse the repository at this point in the history