0

Here is an output from getrawtransaction:

{
  ...
  "vout": [
    {
      "value": 12.50000000,
      "n": 0,
      "scriptPubKey": {
    "asm": "03d81b3d2ac76e322dcb2e713cb8fdeaf68cb83406c0e4d28dcd10a880ef172a6a OP_CHECKSIG",
    "hex": "2103d81b3d2ac76e322dcb2e713cb8fdeaf68cb83406c0e4d28dcd10a880ef172a6aac",
    "reqSigs": 1,
    "type": "pubkey",
    "addresses": [
      "mwzWcEU4kBkJPSTgB8LSBfvyaEjdXmyGh7"
    ]
      }
    }, 
    ...
  ],
  ...
}

What is a pubkey type? I could not find any reference to this.

Here is the output of decodescript on the script:

{
    "result": {
        "asm": "03d81b3d2ac76e322dcb2e713cb8fdeaf68cb83406c0e4d28dcd10a880ef172a6a OP_CHECKSIG",
        "reqSigs": 1,
        "type": "pubkey",
        "addresses": [
            "1HUZKBP5wAK3cKz4TZN4MkieiF8vbyNvpE"
        ],
        "p2sh": "3469piMXSTikVAdrSC791pQGxQb8pNXhua"
    },
    "error": null,
    "id": null
}
2

The script for an output describes the condition that must be satisfied for the money to move.

It means that the public key is contained in the scriptPubKey. Usually, the scriptPubKey only contains a hash of the public key, and relies on the scriptSig to supply the public key.

Explanation of the asm field in decodescript:

"asm": "03d81b3d2ac76e322dcb2e713cb8fdeaf68cb83406c0e4d28dcd10a880ef172a6a OP_CHECKSIG",

The first element is a compressed public key. The second element is OP_CHECKSIG. To spend this output, someone must put a signature in a scriptSig.

See also the P2PK bullet point here: https://bitcoin.stackexchange.com/a/35458/2306

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.