Workable python function to generate P2SH address from Private Key 0x01
I am a new developer trying my best to learn something about bitcoin blockchain. I have trouble with generating P2SH (and P2WSH), let's say:
Given private key = 0000000000000000000000000000000000000000000000000000000000000001
Blockchain shows that:
+ Address (p2sh): 3JvL6Ymt8MVWiCNHC7oWU6nLeHNJKLZGLN
+ Script Hash: bcfeb728b584253d5f3f70bcb780e9ef218a68f4
But unfortunately, I cannot reproduce the same address, despite trying all the method:
+ Compressed public key
+ Uncompressed public key
+ Single Single-Sig (OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG)
+ “1-of-1 Multisig” (OP_1 <PubKey> OP_1 OP_CHECKMULTISIG)
But I cannot get the address 3JvL6Y--ZGLN as above, it always returns somethings else. Can you help me with a workable Python script?
Chain explorer: https://blockchain.com/explorer/addresses/btc/3JvL6Ymt8MVWiCNHC7oWU6nLeHNJKLZGLN
from Recent Questions - Bitcoin Stack Exchange https://ift.tt/fty9nXH
via IFTTT