address – How do you output segwit bech32 (bc1…) / P2SH (3…) addresses from a bitcoin private key?

    0
    9


    Load up electrum 3.1.1+ and enable the “console” and in the console do the following to output the addresses you need by providing your private key:

    bech32 format bc1…:

    bitcoin.address_from_private_key(“p2wpkh:5Kkzs8XrJNAmf9……”)

    p2sh format 3…:

    bitcoin.address_from_private_key(“p2wpkh-p2sh:5Kkzs8XrJNAmf9VQDFeG……”)

    you just need to prefix your private key with p2wpkh or p2wpkh-p2sh to get one of them.



    Source link

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here