-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathscript_verify_success.json
More file actions
156 lines (156 loc) · 8.58 KB
/
script_verify_success.json
File metadata and controls
156 lines (156 loc) · 8.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
"name": "Successful Script Verification Cases",
"description": "Test cases where the script verification operation executes successfully and returns a boolean result (true for valid scripts, false for invalid scripts)",
"tests": [
{
"description": "Valid legacy P2PKH (Pay-to-PubKey-Hash) transaction verification",
"request": {
"id": "valid_p2pkh_legacy",
"method": "btck_script_pubkey_verify",
"params": {
"script_pubkey": "76a9144bfbaf6afb76cc5771bc6404810d1cc041a6933988ac",
"amount": 0,
"tx_to": "02000000013f7cebd65c27431a90bba7f796914fe8cc2ddfc3f2cbd6f7e5f2fc854534da95000000006b483045022100de1ac3bcdfb0332207c4a91f3832bd2c2915840165f876ab47c5f8996b971c3602201c6c053d750fadde599e6f5c4e1963df0f01fc0d97815e8157e3d59fe09ca30d012103699b464d1d8bc9e47d4fb1cdaa89a1c5783d68363c4dbc4b524ed3d857148617feffffff02836d3c01000000001976a914fc25d6d5c94003bf5b0c7b640a248e2c637fcfb088ac7ada8202000000001976a914fbed3d9b11183209a57999d54d59f67c019e756c88ac6acb0700",
"input_index": 0,
"flags": [
"btck_ScriptVerificationFlags_P2SH",
"btck_ScriptVerificationFlags_DERSIG",
"btck_ScriptVerificationFlags_NULLDUMMY",
"btck_ScriptVerificationFlags_CHECKLOCKTIMEVERIFY",
"btck_ScriptVerificationFlags_CHECKSEQUENCEVERIFY",
"btck_ScriptVerificationFlags_WITNESS"
],
"spent_outputs": []
}
},
"expected_response": {
"result": true
}
},
{
"description": "Valid P2SH-wrapped SegWit transaction verification",
"request": {
"id": "valid_p2sh_wrapped_segwit",
"method": "btck_script_pubkey_verify",
"params": {
"script_pubkey": "a91434c06f8c87e355e123bdc6dda4ffabc64b6989ef87",
"amount": 1900000,
"tx_to": "01000000000101d9fd94d0ff0026d307c994d0003180a5f248146efb6371d040c5973f5f66d9df0400000017160014b31b31a6cb654cfab3c50567bcf124f48a0beaecffffffff012cbd1c000000000017a914233b74bf0823fa58bbbd26dfc3bb4ae715547167870247304402206f60569cac136c114a58aedd80f6fa1c51b49093e7af883e605c212bdafcd8d202200e91a55f408a021ad2631bc29a67bd6915b2d7e9ef0265627eabd7f7234455f6012103e7e802f50344303c76d12c089c8724c1b230e3b745693bbe16aad536293d15e300000000",
"input_index": 0,
"flags": [
"btck_ScriptVerificationFlags_P2SH",
"btck_ScriptVerificationFlags_DERSIG",
"btck_ScriptVerificationFlags_NULLDUMMY",
"btck_ScriptVerificationFlags_CHECKLOCKTIMEVERIFY",
"btck_ScriptVerificationFlags_CHECKSEQUENCEVERIFY",
"btck_ScriptVerificationFlags_WITNESS"
],
"spent_outputs": []
}
},
"expected_response": {
"result": true
}
},
{
"description": "Valid native SegWit (P2WPKH) transaction verification",
"request": {
"id": "valid_native_segwit_p2wpkh",
"method": "btck_script_pubkey_verify",
"params": {
"script_pubkey": "0020701a8d401c84fb13e6baf169d59684e17abd9fa216c8cc5b9fc63d622ff8c58d",
"amount": 18393430,
"tx_to": "010000000001011f97548fbbe7a0db7588a66e18d803d0089315aa7d4cc28360b6ec50ef36718a0100000000ffffffff02df1776000000000017a9146c002a686959067f4866b8fb493ad7970290ab728757d29f0000000000220020701a8d401c84fb13e6baf169d59684e17abd9fa216c8cc5b9fc63d622ff8c58d04004730440220565d170eed95ff95027a69b313758450ba84a01224e1f7f130dda46e94d13f8602207bdd20e307f062594022f12ed5017bbf4a055a06aea91c10110a0e3bb23117fc014730440220647d2dc5b15f60bc37dc42618a370b2a1490293f9e5c8464f53ec4fe1dfe067302203598773895b4b16d37485cbe21b337f4e4b650739880098c592553add7dd4355016952210375e00eb72e29da82b89367947f29ef34afb75e8654f6ea368e0acdfd92976b7c2103a1b26313f430c4b15bb1fdce663207659d8cac749a0e53d70eff01874496feff2103c96d495bfdd5ba4145e3e046fee45e84a8a48ad05bd8dbb395c011a32cf9f88053ae00000000",
"input_index": 0,
"flags": [
"btck_ScriptVerificationFlags_P2SH",
"btck_ScriptVerificationFlags_DERSIG",
"btck_ScriptVerificationFlags_NULLDUMMY",
"btck_ScriptVerificationFlags_CHECKLOCKTIMEVERIFY",
"btck_ScriptVerificationFlags_CHECKSEQUENCEVERIFY",
"btck_ScriptVerificationFlags_WITNESS"
],
"spent_outputs": []
}
},
"expected_response": {
"result": true
}
},
{
"description": "P2PKH script verification fails due to wrong signature (malformed final opcode)",
"request": {
"id": "error_invalid_p2pkh_wrong_signature",
"method": "btck_script_pubkey_verify",
"params": {
"script_pubkey": "76a9144bfbaf6afb76cc5771bc6404810d1cc041a6933988ff",
"amount": 0,
"tx_to": "02000000013f7cebd65c27431a90bba7f796914fe8cc2ddfc3f2cbd6f7e5f2fc854534da95000000006b483045022100de1ac3bcdfb0332207c4a91f3832bd2c2915840165f876ab47c5f8996b971c3602201c6c053d750fadde599e6f5c4e1963df0f01fc0d97815e8157e3d59fe09ca30d012103699b464d1d8bc9e47d4fb1cdaa89a1c5783d68363c4dbc4b524ed3d857148617feffffff02836d3c01000000001976a914fc25d6d5c94003bf5b0c7b640a248e2c637fcfb088ac7ada8202000000001976a914fbed3d9b11183209a57999d54d59f67c019e756c88ac6acb0700",
"input_index": 0,
"flags": [
"btck_ScriptVerificationFlags_P2SH",
"btck_ScriptVerificationFlags_DERSIG",
"btck_ScriptVerificationFlags_NULLDUMMY",
"btck_ScriptVerificationFlags_CHECKLOCKTIMEVERIFY",
"btck_ScriptVerificationFlags_CHECKSEQUENCEVERIFY",
"btck_ScriptVerificationFlags_WITNESS"
],
"spent_outputs": []
}
},
"expected_response": {
"result": false
}
},
{
"description": "P2SH-wrapped SegWit verification fails due to incorrect amount",
"request": {
"id": "error_invalid_p2sh_segwit_wrong_amount",
"method": "btck_script_pubkey_verify",
"params": {
"script_pubkey": "a91434c06f8c87e355e123bdc6dda4ffabc64b6989ef87",
"amount": 900000,
"tx_to": "01000000000101d9fd94d0ff0026d307c994d0003180a5f248146efb6371d040c5973f5f66d9df0400000017160014b31b31a6cb654cfab3c50567bcf124f48a0beaecffffffff012cbd1c000000000017a914233b74bf0823fa58bbbd26dfc3bb4ae715547167870247304402206f60569cac136c114a58aedd80f6fa1c51b49093e7af883e605c212bdafcd8d202200e91a55f408a021ad2631bc29a67bd6915b2d7e9ef0265627eabd7f7234455f6012103e7e802f50344303c76d12c089c8724c1b230e3b745693bbe16aad536293d15e300000000",
"input_index": 0,
"flags": [
"btck_ScriptVerificationFlags_P2SH",
"btck_ScriptVerificationFlags_DERSIG",
"btck_ScriptVerificationFlags_NULLDUMMY",
"btck_ScriptVerificationFlags_CHECKLOCKTIMEVERIFY",
"btck_ScriptVerificationFlags_CHECKSEQUENCEVERIFY",
"btck_ScriptVerificationFlags_WITNESS"
],
"spent_outputs": []
}
},
"expected_response": {
"result": false
}
},
{
"description": "Native SegWit verification fails due to malformed witness script hash",
"request": {
"id": "error_invalid_native_segwit_wrong_script",
"method": "btck_script_pubkey_verify",
"params": {
"script_pubkey": "0020701a8d401c84fb13e6baf169d59684e17abd9fa216c8cc5b9fc63d622ff8c58f",
"amount": 18393430,
"tx_to": "010000000001011f97548fbbe7a0db7588a66e18d803d0089315aa7d4cc28360b6ec50ef36718a0100000000ffffffff02df1776000000000017a9146c002a686959067f4866b8fb493ad7970290ab728757d29f0000000000220020701a8d401c84fb13e6baf169d59684e17abd9fa216c8cc5b9fc63d622ff8c58d04004730440220565d170eed95ff95027a69b313758450ba84a01224e1f7f130dda46e94d13f8602207bdd20e307f062594022f12ed5017bbf4a055a06aea91c10110a0e3bb23117fc014730440220647d2dc5b15f60bc37dc42618a370b2a1490293f9e5c8464f53ec4fe1dfe067302203598773895b4b16d37485cbe21b337f4e4b650739880098c592553add7dd4355016952210375e00eb72e29da82b89367947f29ef34afb75e8654f6ea368e0acdfd92976b7c2103a1b26313f430c4b15bb1fdce663207659d8cac749a0e53d70eff01874496feff2103c96d495bfdd5ba4145e3e046fee45e84a8a48ad05bd8dbb395c011a32cf9f88053ae00000000",
"input_index": 0,
"flags": [
"btck_ScriptVerificationFlags_P2SH",
"btck_ScriptVerificationFlags_DERSIG",
"btck_ScriptVerificationFlags_NULLDUMMY",
"btck_ScriptVerificationFlags_CHECKLOCKTIMEVERIFY",
"btck_ScriptVerificationFlags_CHECKSEQUENCEVERIFY",
"btck_ScriptVerificationFlags_WITNESS"
],
"spent_outputs": []
}
},
"expected_response": {
"result": false
}
}
]
}