Monday, April 15, 2024

Retrieving bitcoin tackle of the receiver of a transaction with bitcoinrpc

The "tackle" subject within the Bitcoin Core RPC output is current for all transaction outputs for which a corresponding tackle exists. Within the first 10000 blocks there are many pay-to-public-key (P2PK) outputs, which whereas doable to assemble internally in pockets software program, haven’t got a corresponding tackle format that enables instructing a payer to create such an output.

The prevailing tackle sorts in Bitcoin at the moment are:

  • pay-to-pubkey-hash (P2PKH)
  • pay-to-script-hash (P2SH)
  • native witness addresses, for:
    • pay-to-witness-public-key-hash (P2WPKH)
    • pay-to-witness-script-hash (P2WSH)
    • pay-to-taproot (P2TR)

Everytime you examine any output whose scriptPubKey matches any of those tackle sorts, the RPC output will report the tackle. However scriptPubKeys are free type byte arrays, and there’s no strict requirement that they comply with the construction encoded by any of the outlined tackle sorts.

The "addresses" is older, and was deprecated and eliminated. Its goal was itemizing the person individuals in naked multisig outputs. Such outputs predate the introduction of P2SH in 2012, and have been by no means widespread. Right this moment they’re successfully unusable.

For documentation of Bitcoin Core’s RPC, see the assist RPC command, or The web site is unrelated to Bitcoin Core, and its info is commonly outdated.

The "desc" subject reviews details about the output in “output descriptor” notation. This format is described in BIP380 and the next BIPs, and Bitcoin Core documentation about it may be present in its doc listing: And certainly, pk() stands for public key, indicating a P2PK output with the argument as public key.

Related Articles


Please enter your comment!
Please enter your name here

Latest Articles