bitcoinjs-lib/test/fixtures/p2pk.json
2018-06-26 21:25:05 +10:00

140 lines
4.2 KiB
JSON

{
"valid": [
{
"description": "output from output",
"arguments": {
"output": "030000000000000000000000000000000000000000000000000000000000000001 OP_CHECKSIG"
},
"expected": {
"pubkey": "030000000000000000000000000000000000000000000000000000000000000001",
"signatures": null,
"input": null,
"witness": null
}
},
{
"description": "output from pubkey",
"arguments": {
"pubkey": "030000000000000000000000000000000000000000000000000000000000000001"
},
"expected": {
"output": "030000000000000000000000000000000000000000000000000000000000000001 OP_CHECKSIG",
"signatures": null,
"input": null,
"witness": null
}
},
{
"description": "input/output from output/signature",
"arguments": {
"output": "030000000000000000000000000000000000000000000000000000000000000001 OP_CHECKSIG",
"signature": "300602010002010001"
},
"expected": {
"pubkey": "030000000000000000000000000000000000000000000000000000000000000001",
"input": "300602010002010001",
"witness": []
}
},
{
"description": "input/output from pubkey/signature",
"arguments": {
"pubkey": "030000000000000000000000000000000000000000000000000000000000000001",
"signature": "300602010002010001"
},
"expected": {
"output": "030000000000000000000000000000000000000000000000000000000000000001 OP_CHECKSIG",
"input": "300602010002010001",
"witness": []
}
},
{
"description": "input/output from input/output",
"arguments": {
"output": "030000000000000000000000000000000000000000000000000000000000000001 OP_CHECKSIG",
"input": "300602010002010001"
},
"expected": {
"pubkey": "030000000000000000000000000000000000000000000000000000000000000001",
"signature": "300602010002010001",
"witness": []
}
}
],
"invalid": [
{
"exception": "Not enough data",
"arguments": {}
},
{
"description": "Non-canonical signature",
"exception": "Expected property \"signature\" of type \\?isCanonicalScriptSignature, got Buffer",
"arguments": {
"pubkey": "030000000000000000000000000000000000000000000000000000000000000001",
"signature": "3044"
}
},
{
"description": "Unexpected OP_RESERVED",
"exception": "Output is invalid",
"arguments": {
"output": "OP_RESERVED"
}
},
{
"description": "Non-canonical output public key",
"exception": "Output pubkey is invalid",
"arguments": {
"output": "ffff OP_CHECKSIG"
}
},
{
"description": "Unexpected OP_0 (at end)",
"exception": "Output is invalid",
"arguments": {
"output": "030000000000000000000000000000000000000000000000000000000000000001 OP_CHECKSIG OP_0"
}
},
{
"exception": "Pubkey mismatch",
"arguments": {
"pubkey": "030000000000000000000000000000000000000000000000000000000000000001",
"output": "030000000000000000000000000000000000000000000000000000000000000002 OP_CHECKSIG"
}
},
{
"description": "Too many chunks",
"exception": "Input is invalid",
"arguments": {
"pubkey": "030000000000000000000000000000000000000000000000000000000000000001",
"input": "300602010002010001 OP_RESERVED"
}
},
{
"exception": "Input has invalid signature",
"arguments": {
"pubkey": "030000000000000000000000000000000000000000000000000000000000000001",
"input": "ffffffffffffffff"
}
}
],
"dynamic": {
"depends": {
"output": [ "pubkey" ],
"pubkey": [ "output" ],
"signature": [ ["input", "output"] ],
"input": [ ["signature", "output"] ],
"witness": [ ["input", "output"] ]
},
"details": [
{
"description": "p2pk",
"output": "030000000000000000000000000000000000000000000000000000000000000001 OP_CHECKSIG",
"pubkey": "030000000000000000000000000000000000000000000000000000000000000001",
"signature": "300602010002010001",
"input": "300602010002010001",
"witness": []
}
]
}
}