New answers tagged

2

A P2SH locking script on an output has the following structure: Output (scriptPubKey) -------------------------------- OP_HASH160 <scripthash> OP_EQUAL The address comes for this comes from the <scripthash>, creating a "3address". This is the standard format for a P2SH, so you can identify it and work out the address from there. That'...


1

From what I understand, a non-SegWit P2PH address is obtained by hashing the redeem script ScriptPubKey I had the same problem and I have resolved it with this C++ code, and I think this code is self-describing. If you have the ScriptPubKey extract from the blk file, this is code calculate the correct address P2SH. string opcode = hex.substr(0, 2); ...


Top 50 recent answers are included