Hot answers tagged

3

Observe that the type of the output is: "type": "pubkey" Pay-to-Public-Key (P2PK) outputs do not have addresses. They pay directly to a public key rather than the hash of the public key, as the name suggests. Bitcoin addresses encode public key hashes, for example, addresses starting with a 1 are known as Pay-to-Public-Key-Hash (P2PKH) ...


3

The hash160 of the script is e9c3dd0c07aac76179ebc76a6c78d4d67c6c160a Prepend the version byte 05 05e9c3dd0c07aac76179ebc76a6c78d4d67c6c160a Double sha-256 gives a checksum of 1. 5dad64852fbff1510074011803d9bf50b9650a517240d298a07ea5c525cdc5e7 2. 7f297f3156a14d114af23b33c339817a1241afcb52a154d19683c67c538b7278 first 4 bytes: 7f297f31 Encoding ...


2

Addresses that start with 2 on testnet or more precisely scripts that are like OP_HASH160 <hash> OP_EQUAL are P2SH scripts and the hash is created by computing HASH160 of a redeem script. Your redeem script seems to be a P2WPKH one which makes your address a P2SH-P2WPKH address. Your redeem script that has to be hashed is OP_0 <160-bit hash of ...


2

The following regex should work for validating that a string starts with one of xpub, ypub, Ypub, zpub, Zpub, tpub, upub, Upub, vpub or Vpub and is followed by 79-108 characters that are one of 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz (the Base58 alphabet) which is as close as you can get to validating BIP32 keys with regex: ^([xyYzZtuUvV]...


1

P2PK scripts have the form PUSH <KEY> OP_CHECKSIG. Your example: 41 0400d0ade32217e076945e0946ef7bed72d9aea035aa8891e4bf0749ae6e24f8a7d3ea56efafe472ac3943dbed3af7c093729720ac9ab04e8eba09286e3a00fe41 ac Means push 0x41 (65) bytes. This is followed by the public key (starting with 04 incidicating it is an uncompressed public key). Finally, 0xac is ...


Only top voted, non community-wiki answers of a minimum length are eligible