limenka-util-test.json raw
1 [
2 { "exec": "./limenka-util",
3 "args": ["foo"],
4 "return_code": 1,
5 "error_txt": "Error parsing command line arguments: Invalid command 'foo'",
6 "description": ""
7 },
8 { "exec": "./limenka-util",
9 "args": ["help"],
10 "return_code": 1,
11 "error_txt": "Error parsing command line arguments: Invalid command 'help'",
12 "description": "`help` raises an error. Use `-help`"
13 },
14 { "exec": "./limenka-util",
15 "args": ["grind"],
16 "return_code": 1,
17 "error_txt": "Must specify block header to grind",
18 "description": ""
19 },
20 { "exec": "./limenka-util",
21 "args": ["grind", "1", "2"],
22 "return_code": 1,
23 "error_txt": "Must specify block header to grind",
24 "description": ""
25 },
26 { "exec": "./limenka-util",
27 "args": ["grind", "aa"],
28 "return_code": 1,
29 "error_txt": "Could not decode block header",
30 "description": ""
31 },
32 { "exec": "./limenka-tx",
33 "args": ["-create", "nversion=1"],
34 "output_cmp": "blanktxv1.hex",
35 "description": "Creates a blank v1 transaction"
36 },
37 { "exec": "./limenka-tx",
38 "args": ["-json","-create", "nversion=1"],
39 "output_cmp": "blanktxv1.json",
40 "description": "Creates a blank v1 transaction (output in json)"
41 },
42 { "exec": "./limenka-tx",
43 "args": ["-"],
44 "input": "blanktxv2.hex",
45 "output_cmp": "blanktxv2.hex",
46 "description": "Creates a blank transaction when nothing is piped into limenka-tx"
47 },
48 { "exec": "./limenka-tx",
49 "args": ["-json","-create"],
50 "output_cmp": "blanktxv2.json",
51 "description": "Creates a blank transaction (output in json)"
52 },
53 { "exec": "./limenka-tx",
54 "args": ["-json","-"],
55 "input": "blanktxv2.hex",
56 "output_cmp": "blanktxv2.json",
57 "description": "Creates a blank transaction when nothing is piped into limenka-tx (output in json)"
58 },
59 { "exec": "./limenka-tx",
60 "args": ["-create", "nversion=1foo"],
61 "return_code": 1,
62 "error_txt": "error: Invalid TX version requested",
63 "description": "Tests the check for invalid nversion value"
64 },
65 { "exec": "./limenka-tx",
66 "args": ["-", "delin=1"],
67 "input": "tx394b54bb.hex",
68 "output_cmp": "tt-delin1-out.hex",
69 "description": "Deletes a single input from a transaction"
70 },
71 { "exec": "./limenka-tx",
72 "args": ["-json", "-", "delin=1"],
73 "input": "tx394b54bb.hex",
74 "output_cmp": "tt-delin1-out.json",
75 "description": "Deletes a single input from a transaction (output in json)"
76 },
77 { "exec": "./limenka-tx",
78 "args": ["-", "delin=31"],
79 "input": "tx394b54bb.hex",
80 "return_code": 1,
81 "error_txt": "error: Invalid TX input index '31'",
82 "description": "Attempts to delete an input with a bad index from a transaction. Expected to fail."
83 },
84 { "exec": "./limenka-tx",
85 "args": ["-", "delin=1foo"],
86 "input": "tx394b54bb.hex",
87 "return_code": 1,
88 "error_txt": "error: Invalid TX input index",
89 "description": "Tests the check for an invalid input index with delin"
90 },
91 { "exec": "./limenka-tx",
92 "args": ["-", "delout=1"],
93 "input": "tx394b54bb.hex",
94 "output_cmp": "tt-delout1-out.hex",
95 "description": "Deletes a single output from a transaction"
96 },
97 { "exec": "./limenka-tx",
98 "args": ["-json", "-", "delout=1"],
99 "input": "tx394b54bb.hex",
100 "output_cmp": "tt-delout1-out.json",
101 "description": "Deletes a single output from a transaction (output in json)"
102 },
103 { "exec": "./limenka-tx",
104 "args": ["-", "delout=2"],
105 "input": "tx394b54bb.hex",
106 "return_code": 1,
107 "error_txt": "error: Invalid TX output index '2'",
108 "description": "Attempts to delete an output with a bad index from a transaction. Expected to fail."
109 },
110 { "exec": "./limenka-tx",
111 "args": ["-", "delout=1foo"],
112 "input": "tx394b54bb.hex",
113 "return_code": 1,
114 "error_txt": "error: Invalid TX output index",
115 "description": "Tests the check for an invalid output index with delout"
116 },
117 { "exec": "./limenka-tx",
118 "args": ["-", "locktime=317000"],
119 "input": "tx394b54bb.hex",
120 "output_cmp": "tt-locktime317000-out.hex",
121 "description": "Adds an nlocktime to a transaction"
122 },
123 { "exec": "./limenka-tx",
124 "args": ["-json", "-", "locktime=317000"],
125 "input": "tx394b54bb.hex",
126 "output_cmp": "tt-locktime317000-out.json",
127 "description": "Adds an nlocktime to a transaction (output in json)"
128 },
129 { "exec": "./limenka-tx",
130 "args": ["-create", "locktime=317000foo"],
131 "return_code": 1,
132 "error_txt": "error: Invalid TX locktime requested",
133 "description": "Tests the check for invalid locktime value"
134 },
135 { "exec": "./limenka-tx",
136 "args":
137 ["-create",
138 "in=Z897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0"],
139 "return_code": 1,
140 "error_txt": "error: invalid TX input txid",
141 "description": "Tests the check for an invalid txid invalid hex"
142 },
143 { "exec": "./limenka-tx",
144 "args":
145 ["-create",
146 "in=5897de6bd6:0"],
147 "return_code": 1,
148 "error_txt": "error: invalid TX input txid",
149 "description": "Tests the check for an invalid txid valid hex but too short"
150 },
151 { "exec": "./limenka-tx",
152 "args":
153 ["-create",
154 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f12:0"],
155 "return_code": 1,
156 "error_txt": "error: invalid TX input txid",
157 "description": "Tests the check for an invalid txid valid hex but too long"
158 },
159 { "exec": "./limenka-tx",
160 "args":
161 ["-create",
162 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
163 "replaceable=0foo"],
164 "return_code": 1,
165 "error_txt": "error: Invalid TX input index",
166 "description": "Tests the check for an invalid string input index with replaceable"
167 },
168 {
169 "exec": "./limenka-tx",
170 "args":
171 ["-create",
172 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
173 "replaceable=-1"],
174 "return_code": 1,
175 "error_txt": "error: Invalid TX input index",
176 "description": "Tests the check for an invalid negative input index with replaceable"
177 },
178 {
179 "exec": "./limenka-tx",
180 "args":
181 ["-create",
182 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
183 "replaceable=1"],
184 "return_code": 1,
185 "error_txt": "error: Invalid TX input index",
186 "description": "Tests the check for an invalid positive out-of-bounds input index with replaceable"
187 },
188 {
189 "exec": "./limenka-tx",
190 "args":
191 ["-create",
192 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
193 "replaceable=0"],
194 "output_cmp": "txreplacesingleinput.hex",
195 "description": "Tests that the 'SEQUENCE' value for a single input is set to fdffffff for single input"
196 },
197 {
198 "exec": "./limenka-tx",
199 "args":
200 ["-create",
201 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
202 "replaceable="],
203 "output_cmp": "txreplacesingleinput.hex",
204 "description": "Tests that the 'SEQUENCE' value for a single input is set to fdffffff when N omitted"
205 },
206 {
207 "exec": "./limenka-tx",
208 "args":
209 ["-create",
210 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
211 "in=bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c:18",
212 "in=22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc:1",
213 "replaceable=1"],
214 "output_cmp": "txreplace1.hex",
215 "description": "Tests that only the 'SEQUENCE' value of input[1] is set to fdffffff"
216 },
217 {
218 "exec": "./limenka-tx",
219 "args":
220 ["-create",
221 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
222 "in=bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c:18",
223 "in=22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc:1",
224 "replaceable="],
225 "output_cmp": "txreplaceomittedn.hex",
226 "description": "Tests that the 'SEQUENCE' value for each input is set to fdffffff when N omitted"
227 },
228 {
229 "exec": "./limenka-tx",
230 "args":
231 ["-create",
232 "replaceable="],
233 "output_cmp": "txreplacenoinputs.hex",
234 "description": "Tests behavior when no inputs are provided in the transaction"
235 },
236 {
237 "exec": "./limenka-tx",
238 "args":
239 ["-create",
240 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:abcdef00",
241 "replaceable="],
242 "return_code": 1,
243 "error_txt": "error: invalid TX sequence id 'abcdef00'",
244 "description": "Try to make invalid input replaceable"
245 },
246 { "exec": "./limenka-tx",
247 "args":
248 ["-create",
249 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0x"],
250 "return_code": 1,
251 "error_txt": "error: invalid TX input vout",
252 "description": "Tests the check for an invalid vout value when adding an input"
253 },
254 { "exec": "./limenka-tx",
255 "args":
256 ["-create",
257 "outaddr=1"],
258 "return_code": 1,
259 "error_txt": "error: TX output missing or too many separators",
260 "description": "Malformed outaddr argument (no address specified). Expected to fail."
261 },
262 { "exec": "./limenka-tx",
263 "args":
264 ["-create",
265 "outaddr=1:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o:garbage"],
266 "return_code": 1,
267 "error_txt": "error: TX output missing or too many separators",
268 "description": "Malformed outaddr argument (too many separators). Expected to fail."
269 },
270 { "exec": "./limenka-tx",
271 "args":
272 ["-create",
273 "outpubkey=0"],
274 "return_code": 1,
275 "error_txt": "error: TX output missing or too many separators",
276 "description": "Malformed outpubkey argument (no pubkey specified). Expected to fail."
277 },
278 { "exec": "./limenka-tx",
279 "args":
280 ["-create",
281 "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W:non53nse"],
282 "return_code": 1,
283 "error_txt": "error: TX output missing or too many separators",
284 "description": "Malformed outpubkey argument (too many separators). Expected to fail."
285 },
286 { "exec": "./limenka-tx",
287 "args":
288 ["-create",
289 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
290 "in=bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c:18",
291 "in=22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc:1",
292 "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
293 "outaddr=4:1P8yWvZW8jVihP1bzHeqfE4aoXNX8AVa46"],
294 "output_cmp": "txcreate1.hex",
295 "description": "Creates a new transaction with three inputs and two outputs"
296 },
297 { "exec": "./limenka-tx",
298 "args":
299 ["-json",
300 "-create",
301 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
302 "in=bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c:18",
303 "in=22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc:1",
304 "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
305 "outaddr=4:1P8yWvZW8jVihP1bzHeqfE4aoXNX8AVa46"],
306 "output_cmp": "txcreate1.json",
307 "description": "Creates a new transaction with three inputs and two outputs (output in json)"
308 },
309 { "exec": "./limenka-tx",
310 "args": ["-create", "outscript=0:"],
311 "output_cmp": "txcreate2.hex",
312 "description": "Creates a new transaction with a single empty output script"
313 },
314 { "exec": "./limenka-tx",
315 "args": ["-json", "-create", "outscript=0:"],
316 "output_cmp": "txcreate2.json",
317 "description": "Creates a new transaction with a single empty output script (output in json)"
318 },
319 { "exec": "./limenka-tx",
320 "args": ["02000000000100000000000000000000000000"],
321 "output_cmp": "txcreate2.hex",
322 "description": "Parses a transaction with no inputs and a single output script"
323 },
324 { "exec": "./limenka-tx",
325 "args": ["-json", "02000000000100000000000000000000000000"],
326 "output_cmp": "txcreate2.json",
327 "description": "Parses a transaction with no inputs and a single output script (output in json)"
328 },
329 { "exec": "./limenka-tx",
330 "args": ["-create", "outscript=0:123badscript"],
331 "return_code": 1,
332 "error_txt": "error: script parse error: unknown opcode",
333 "description": "Create a new transaction with an invalid output script"
334 },
335 { "exec": "./limenka-tx",
336 "args": ["-create", "outscript=0:OP_DROP", "nversion=1"],
337 "output_cmp": "txcreatescript1.hex",
338 "description": "Create a new transaction with a single output script (OP_DROP)"
339 },
340 { "exec": "./limenka-tx",
341 "args": ["-json", "-create", "outscript=0:OP_DROP", "nversion=1"],
342 "output_cmp": "txcreatescript1.json",
343 "description": "Create a new transaction with a single output script (OP_DROP) (output as json)"
344 },
345 { "exec": "./limenka-tx",
346 "args": ["-create", "outscript=0:OP_DROP:S", "nversion=1"],
347 "output_cmp": "txcreatescript2.hex",
348 "description": "Create a new transaction with a single output script (OP_DROP) in a P2SH"
349 },
350 { "exec": "./limenka-tx",
351 "args": ["-json", "-create", "outscript=0:OP_DROP:S", "nversion=1"],
352 "output_cmp": "txcreatescript2.json",
353 "description": "Create a new transaction with a single output script (OP_DROP) in a P2SH (output as json)"
354 },
355 { "exec": "./limenka-tx",
356 "args": ["-create", "outscript=0:OP_DROP:W", "nversion=1"],
357 "output_cmp": "txcreatescript3.hex",
358 "description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH"
359 },
360 { "exec": "./limenka-tx",
361 "args": ["-json", "-create", "outscript=0:OP_DROP:W", "nversion=1"],
362 "output_cmp": "txcreatescript3.json",
363 "description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH (output as json)"
364 },
365 { "exec": "./limenka-tx",
366 "args": ["-create", "outscript=0:OP_DROP:WS", "nversion=1"],
367 "output_cmp": "txcreatescript4.hex",
368 "description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH, wrapped in a P2SH"
369 },
370 { "exec": "./limenka-tx",
371 "args": ["-json", "-create", "outscript=0:OP_DROP:WS", "nversion=1"],
372 "output_cmp": "txcreatescript4.json",
373 "description": "Create a new transaction with a single output script (OP_DROP) in a P2SH, wrapped in a P2SH (output as json)"
374 },
375 { "exec": "./limenka-tx",
376 "args": ["-create", "outscript=0:999999999999999999999999999999"],
377 "return_code": 1,
378 "error_txt": "error: script parse error: decimal numeric value only allowed in the range -0xFFFFFFFF...0xFFFFFFFF",
379 "description": "Try to parse an output script with a decimal number above the allowed range"
380 },
381 { "exec": "./limenka-tx",
382 "args": ["-create", "outscript=0:9999999999"],
383 "return_code": 1,
384 "error_txt": "error: script parse error: decimal numeric value only allowed in the range -0xFFFFFFFF...0xFFFFFFFF",
385 "description": "Try to parse an output script with a decimal number above the allowed range"
386 },
387 { "exec": "./limenka-tx",
388 "args": ["-create", "outscript=0:4294967296"],
389 "return_code": 1,
390 "error_txt": "error: script parse error: decimal numeric value only allowed in the range -0xFFFFFFFF...0xFFFFFFFF",
391 "description": "Try to parse an output script with a decimal number just above the allowed range"
392 },
393 { "exec": "./limenka-tx",
394 "args": ["-create", "outscript=0:4294967295"],
395 "output_cmp": "txcreatescript5.hex",
396 "description": "Try to parse an output script with a decimal number at the upper limit of the allowed range"
397 },
398 { "exec": "./limenka-tx",
399 "args": ["-create", "outscript=0:-9999999999"],
400 "return_code": 1,
401 "error_txt": "error: script parse error: decimal numeric value only allowed in the range -0xFFFFFFFF...0xFFFFFFFF",
402 "description": "Try to parse an output script with a decimal number below the allowed range"
403 },
404 { "exec": "./limenka-tx",
405 "args": ["-create", "outscript=0:-4294967296"],
406 "return_code": 1,
407 "error_txt": "error: script parse error: decimal numeric value only allowed in the range -0xFFFFFFFF...0xFFFFFFFF",
408 "description": "Try to parse an output script with a decimal number just below the allowed range"
409 },
410 { "exec": "./limenka-tx",
411 "args": ["-create", "outscript=0:-4294967295"],
412 "output_cmp": "txcreatescript6.hex",
413 "description": "Try to parse an output script with a decimal number at the lower limit of the allowed range"
414 },
415 { "exec": "./limenka-tx",
416 "args":
417 ["-create", "nversion=1",
418 "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
419 "set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
420 "set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
421 "sign=ALL",
422 "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
423 "output_cmp": "txcreatesignv1.hex",
424 "description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction"
425 },
426 { "exec": "./limenka-tx",
427 "args":
428 ["-json",
429 "-create", "nversion=1",
430 "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
431 "set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
432 "set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
433 "sign=ALL",
434 "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
435 "output_cmp": "txcreatesignv1.json",
436 "description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction (output in json)"
437 },
438 { "exec": "./limenka-tx",
439 "args":
440 ["-create",
441 "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
442 "set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
443 "set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
444 "sign=ALL",
445 "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
446 "output_cmp": "txcreatesignv2.hex",
447 "description": "Creates a new transaction with a single input and a single output, and then signs the transaction"
448 },
449 { "exec": "./limenka-tx",
450 "args":
451 ["-create",
452 "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
453 "set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
454 "set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":\"0foo\",\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
455 "sign=ALL",
456 "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
457 "return_code": 1,
458 "error_txt": "error: prevtxs internal object typecheck fail",
459 "description": "Tests the check for invalid vout index in prevtxs for sign"
460 },
461 { "exec": "./limenka-tx",
462 "args":
463 ["-create",
464 "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
465 "set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
466 "set=prevtxs:[{\"txid\":\"Zd49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59412\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
467 "sign=ALL",
468 "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
469 "return_code": 1,
470 "error_txt": "error: txid must be hexadecimal string (not 'Zd49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59412')",
471 "description": "Tests the check for invalid txid due to invalid hex"
472 },
473 { "exec": "./limenka-tx",
474 "args":
475 ["-create",
476 "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
477 "set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
478 "set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc594\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
479 "sign=ALL",
480 "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
481 "return_code": 1,
482 "error_txt": "error: txid must be hexadecimal string (not '4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc594')",
483 "description": "Tests the check for invalid txid valid hex, but too short"
484 },
485 { "exec": "./limenka-tx",
486 "args":
487 ["-create",
488 "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
489 "set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
490 "set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc5948512\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
491 "sign=ALL",
492 "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
493 "return_code": 1,
494 "error_txt": "error: txid must be hexadecimal string (not '4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc5948512')",
495 "description": "Tests the check for invalid txid valid hex, but too long"
496 },
497 { "exec": "./limenka-tx",
498 "args":
499 ["-create",
500 "in=00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff:0",
501 "set=privatekeys:[\"KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn\"]",
502 "set=prevtxs:[{\"txid\":\"00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\",\"vout\":0,\"amount\":\"0\", \"scriptPubKey\":\"0014751e76e8199196d454941c45d1b3a323f1433bd6\"}]",
503 "sign=ALL",
504 "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
505 "output_cmp": "txcreatesignsegwit1.hex",
506 "description": "Creates a new transaction with a single witness input and a single output, and then signs the transaction"
507 },
508 { "exec": "./limenka-tx",
509 "args":
510 ["-create",
511 "in=00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff:0",
512 "set=privatekeys:[\"KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn\"]",
513 "set=prevtxs:[{\"txid\":\"00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff\",\"vout\":0,\"scriptPubKey\":\"0014751e76e8199196d454941c45d1b3a323f1433bd6\"}]",
514 "sign=ALL",
515 "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
516 "return_code": 1,
517 "error_txt": "Missing amount for CTxOut with scriptPubKey=0014751e76e8199196d454941c45d1b3a323f1433bd6",
518 "description": "Tests the check for missing input amount for witness transactions"
519 },
520 { "exec": "./limenka-tx",
521 "args":
522 ["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],
523 "output_cmp": "txcreateoutpubkey1.hex",
524 "description": "Creates a new transaction with a single pay-to-pubkey output"
525 },
526 { "exec": "./limenka-tx",
527 "args":
528 ["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],
529 "output_cmp": "txcreateoutpubkey1.json",
530 "description": "Creates a new transaction with a single pay-to-pubkey output (output as json)"
531 },
532 { "exec": "./limenka-tx",
533 "args":
534 ["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
535 "output_cmp": "txcreateoutpubkey2.hex",
536 "description": "Creates a new transaction with a single pay-to-witness-pubkey output"
537 },
538 { "exec": "./limenka-tx",
539 "args":
540 ["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
541 "output_cmp": "txcreateoutpubkey2.json",
542 "description": "Creates a new transaction with a single pay-to-witness-pubkey output (output as json)"
543 },
544 { "exec": "./limenka-tx",
545 "args":
546 ["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
547 "output_cmp": "txcreateoutpubkey3.hex",
548 "description": "Creates a new transaction with a single pay-to-witness-pubkey, wrapped in P2SH output"
549 },
550 { "exec": "./limenka-tx",
551 "args":
552 ["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
553 "output_cmp": "txcreateoutpubkey3.json",
554 "description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"
555 },
556 { "exec": "./limenka-tx",
557 "args":
558 ["-json", "-create", "outpubkey=0:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:WS", "nversion=1"],
559 "return_code": 1,
560 "error_txt": "error: Uncompressed pubkeys are not useable for SegWit outputs",
561 "description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"
562 },
563 { "exec": "./limenka-tx",
564 "args":
565 ["-create",
566 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
567 "outdata=4:badhexdata"],
568 "return_code": 1,
569 "error_txt": "error: invalid TX output data",
570 "description": "Attempts to create a new transaction with one input and an output with malformed hex data. Expected to fail"
571 },
572 { "exec": "./limenka-tx",
573 "args":
574 ["-create",
575 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
576 "outdata=badhexdata"],
577 "return_code": 1,
578 "error_txt": "error: invalid TX output data",
579 "description": "Attempts to create a new transaction with one input and an output with no value and malformed hex data. Expected to fail"
580 },
581 { "exec": "./limenka-tx",
582 "args":
583 ["-create",
584 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
585 "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
586 "outdata=4:54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],
587 "output_cmp": "txcreatedata1.hex",
588 "description": "Creates a new transaction with one input, one address output and one data output"
589 },
590 { "exec": "./limenka-tx",
591 "args":
592 ["-json",
593 "-create", "nversion=1",
594 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
595 "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
596 "outdata=4:54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],
597 "output_cmp": "txcreatedata1.json",
598 "description": "Creates a new v1 transaction with one input, one address output and one data output (output in json)"
599 },
600 { "exec": "./limenka-tx",
601 "args":
602 ["-create",
603 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
604 "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
605 "outdata=54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],
606 "output_cmp": "txcreatedata2.hex",
607 "description": "Creates a new transaction with one input, one address output and one data (zero value) output"
608 },
609 { "exec": "./limenka-tx",
610 "args":
611 ["-json",
612 "-create",
613 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
614 "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
615 "outdata=54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],
616 "output_cmp": "txcreatedata2.json",
617 "description": "Creates a new transaction with one input, one address output and one data (zero value) output (output in json)"
618 },
619 { "exec": "./limenka-tx",
620 "args":
621 ["-create",
622 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:11aa"],
623 "return_code": 1,
624 "error_txt": "error: invalid TX sequence id '11aa'",
625 "description": "Try to parse a sequence number outside the allowed range"
626 },
627 { "exec": "./limenka-tx",
628 "args":
629 ["-create",
630 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:-1"],
631 "return_code": 1,
632 "error_txt": "error: invalid TX sequence id '-1'",
633 "description": "Try to parse a sequence number outside the allowed range"
634 },
635 { "exec": "./limenka-tx",
636 "args":
637 ["-create",
638 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967296"],
639 "return_code": 1,
640 "error_txt": "error: invalid TX sequence id '4294967296'",
641 "description": "Try to parse a sequence number outside the allowed range"
642 },
643 { "exec": "./limenka-tx",
644 "args":
645 ["-create",
646 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293",
647 "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o"],
648 "output_cmp": "txcreatedata_seq0.hex",
649 "description": "Creates a new transaction with one input with sequence number and one address output"
650 },
651 { "exec": "./limenka-tx",
652 "args":
653 ["-create",
654 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0: 4294967293 ",
655 "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o"],
656 "output_cmp": "txcreatedata_seq0.hex",
657 "description": "Creates a new transaction with one input with sequence number (+whitespace) and one address output"
658 },
659 { "exec": "./limenka-tx",
660 "args":
661 ["-json",
662 "-create",
663 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293",
664 "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o"],
665 "output_cmp": "txcreatedata_seq0.json",
666 "description": "Creates a new transaction with one input with sequence number and one address output (output in json)"
667 },
668 { "exec": "./limenka-tx",
669 "args":
670 ["01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000",
671 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:1"],
672 "output_cmp": "txcreatedata_seq1.hex",
673 "description": "Adds a new input with sequence number to a transaction"
674 },
675 { "exec": "./limenka-tx",
676 "args":
677 ["-json",
678 "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000",
679 "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:1"],
680 "output_cmp": "txcreatedata_seq1.json",
681 "description": "Adds a new input with sequence number to a transaction (output in json)"
682 },
683 { "exec": "./limenka-tx",
684 "args": ["-create", "outmultisig=1:-2:3:02a5:021:02df", "nversion=1"],
685 "return_code": 1,
686 "error_txt": "error: invalid multisig required number '-2'",
687 "description": "Try to parse a multisig number outside the allowed range"
688 },
689 { "exec": "./limenka-tx",
690 "args": ["-create", "outmultisig=1:2:3a:02a5:021:02df", "nversion=1"],
691 "return_code": 1,
692 "error_txt": "error: invalid multisig total number '3a'",
693 "description": "Try to parse a multisig number outside the allowed range"
694 },
695 { "exec": "./limenka-tx",
696 "args": ["-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485", "nversion=1"],
697 "output_cmp": "txcreatemultisig1.hex",
698 "description": "Creates a new transaction with a single 2-of-3 multisig output"
699 },
700 { "exec": "./limenka-tx",
701 "args": ["-json", "-create", "outmultisig=1: 2 : 3 :02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485", "nversion=1"],
702 "output_cmp": "txcreatemultisig1.json",
703 "description": "Creates a new transaction with a single 2-of-3 multisig output (with whitespace, output in json)"
704 },
705 { "exec": "./limenka-tx",
706 "args": ["-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:S", "nversion=1"],
707 "output_cmp": "txcreatemultisig2.hex",
708 "description": "Creates a new transaction with a single 2-of-3 multisig in a P2SH output"
709 },
710 { "exec": "./limenka-tx",
711 "args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:S", "nversion=1"],
712 "output_cmp": "txcreatemultisig2.json",
713 "description": "Creates a new transaction with a single 2-of-3 multisig in a P2SH output (output in json)"
714 },
715 { "exec": "./limenka-tx",
716 "args": ["-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
717 "output_cmp": "txcreatemultisig3.hex",
718 "description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output"
719 },
720 { "exec": "./limenka-tx",
721 "args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
722 "output_cmp": "txcreatemultisig3.json",
723 "description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output (output in json)"
724 },
725 { "exec": "./limenka-tx",
726 "args": ["-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
727 "output_cmp": "txcreatemultisig4.hex",
728 "description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH"
729 },
730 { "exec": "./limenka-tx",
731 "args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
732 "output_cmp": "txcreatemultisig4.json",
733 "description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH (output in json)"
734 },
735 { "exec": "./limenka-tx",
736 "args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:S"],
737 "output_cmp": "txcreatemultisig5.json",
738 "description": "Uncompressed pubkeys should work just fine for non-witness outputs"
739 },
740 { "exec": "./limenka-tx",
741 "args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:WS"],
742 "return_code": 1,
743 "error_txt": "error: Uncompressed pubkeys are not useable for SegWit outputs",
744 "description": "Ensure adding witness outputs with uncompressed pubkeys fails"
745 }
746 ]
747