diff --git a/test/fixtures/embed.json b/test/fixtures/embed.json index ccc0e70..40e43cd 100644 --- a/test/fixtures/embed.json +++ b/test/fixtures/embed.json @@ -5,6 +5,7 @@ "arguments": { "output": "OP_RETURN a3b147dbe4a85579fc4b5a1811e76620560e07267e62b9a0d6858f9127735cadd82f67e06c24dbc4" }, + "options": {}, "expected": { "data": [ "a3b147dbe4a85579fc4b5a1811e76620560e07267e62b9a0d6858f9127735cadd82f67e06c24dbc4" @@ -35,6 +36,14 @@ { "exception": "Not enough data", "arguments": {} + }, + { + "description": "First OP is not OP_RETURN", + "exception": "Output is invalid", + "options": {}, + "arguments": { + "output": "OP_1 OP_2 OP_ADD" + } } ], "dynamic": { diff --git a/test/fixtures/p2ms.json b/test/fixtures/p2ms.json index d5bb0c8..8ea033e 100644 --- a/test/fixtures/p2ms.json +++ b/test/fixtures/p2ms.json @@ -5,6 +5,7 @@ "arguments": { "output": "OP_2 030000000000000000000000000000000000000000000000000000000000000001 030000000000000000000000000000000000000000000000000000000000000002 OP_2 OP_CHECKMULTISIG" }, + "options": {}, "expected": { "m": 2, "n": 2, @@ -239,6 +240,7 @@ { "description": "n !== output pubkeys", "exception": "Output is invalid", + "options": {}, "arguments": { "output": "OP_1 030000000000000000000000000000000000000000000000000000000000000001 OP_2 OP_CHECKMULTISIG" } @@ -266,6 +268,7 @@ }, { "exception": "Pubkeys mismatch", + "options": {}, "arguments": { "pubkeys": [ "030000000000000000000000000000000000000000000000000000000000000001" @@ -325,6 +328,7 @@ { "description": "Missing OP_0", "exception": "Input is invalid", + "options": {}, "arguments": { "m": 2, "pubkeys": [ diff --git a/test/fixtures/p2pk.json b/test/fixtures/p2pk.json index a9e1063..58f51cb 100644 --- a/test/fixtures/p2pk.json +++ b/test/fixtures/p2pk.json @@ -5,6 +5,7 @@ "arguments": { "output": "030000000000000000000000000000000000000000000000000000000000000001 OP_CHECKSIG" }, + "options": {}, "expected": { "pubkey": "030000000000000000000000000000000000000000000000000000000000000001", "signature": null, @@ -97,6 +98,7 @@ }, { "exception": "Pubkey mismatch", + "options": {}, "arguments": { "pubkey": "030000000000000000000000000000000000000000000000000000000000000001", "output": "030000000000000000000000000000000000000000000000000000000000000002 OP_CHECKSIG" diff --git a/test/fixtures/p2pkh.json b/test/fixtures/p2pkh.json index 118111d..44c20fe 100644 --- a/test/fixtures/p2pkh.json +++ b/test/fixtures/p2pkh.json @@ -5,6 +5,7 @@ "arguments": { "address": "134D6gYy8DsR5m4416BnmgASuMBqKvogQh" }, + "options": {}, "expected": { "hash": "168b992bcfc44050310b3a94bd0771136d0b28d1", "output": "OP_DUP OP_HASH160 168b992bcfc44050310b3a94bd0771136d0b28d1 OP_EQUALVERIFY OP_CHECKSIG", @@ -103,6 +104,7 @@ { "description": "Unexpected OP_DUP", "exception": "Output is invalid", + "options": {}, "arguments": { "output": "OP_DUP OP_DUP 168b992bcfc44050310b3a94bd0771136d0b28d137 OP_EQUALVERIFY" } diff --git a/test/fixtures/p2sh.json b/test/fixtures/p2sh.json index 44611a5..e6fe2ae 100644 --- a/test/fixtures/p2sh.json +++ b/test/fixtures/p2sh.json @@ -5,6 +5,7 @@ "arguments": { "address": "3GETYP4cuSesh2zsPEEYVZqnRedwe4FwUT" }, + "options": {}, "expected": { "hash": "9f840a5fc02407ef0ad499c2ec0eb0b942fb0086", "output": "OP_HASH160 9f840a5fc02407ef0ad499c2ec0eb0b942fb0086 OP_EQUAL", @@ -182,6 +183,7 @@ { "description": "Expected OP_HASH160", "exception": "Output is invalid", + "options": {}, "arguments": { "output": "OP_HASH256 ffffffffffffffffffffffffffffffffffffffff OP_EQUAL" } diff --git a/test/fixtures/p2wpkh.json b/test/fixtures/p2wpkh.json index 7341907..f667bdc 100644 --- a/test/fixtures/p2wpkh.json +++ b/test/fixtures/p2wpkh.json @@ -5,6 +5,7 @@ "arguments": { "address": "bc1qafk4yhqvj4wep57m62dgrmutldusqde8adh20d" }, + "options": {}, "expected": { "hash": "ea6d525c0c955d90d3dbd29a81ef8bfb79003727", "output": "OP_0 ea6d525c0c955d90d3dbd29a81ef8bfb79003727", @@ -108,6 +109,7 @@ }, { "exception": "Pubkey mismatch", + "options": {}, "arguments": { "pubkey": "030000000000000000000000000000000000000000000000000000000000000001", "witness": [ diff --git a/test/fixtures/p2wsh.json b/test/fixtures/p2wsh.json index 2f7b9cc..0870278 100644 --- a/test/fixtures/p2wsh.json +++ b/test/fixtures/p2wsh.json @@ -5,6 +5,7 @@ "arguments": { "address": "bc1q6rgl33d3s9dugudw7n68yrryajkr3ha9q8q24j20zs62se4q9tsqdy0t2q" }, + "options": {}, "expected": { "hash": "d0d1f8c5b1815bc471aef4f4720c64ecac38dfa501c0aac94f1434a866a02ae0", "output": "OP_0 d0d1f8c5b1815bc471aef4f4720c64ecac38dfa501c0aac94f1434a866a02ae0", @@ -221,6 +222,7 @@ }, { "exception": "Output is invalid", + "options": {}, "arguments": { "output": "OP_HASH256 ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff OP_EQUAL" } diff --git a/test/transaction_builder.js b/test/transaction_builder.js index 34ec9da..05dbbe3 100644 --- a/test/transaction_builder.js +++ b/test/transaction_builder.js @@ -477,7 +477,7 @@ describe('TransactionBuilder', function () { redeem: payments.p2ms({ output: redeemScript, signatures - }, { allowIncomplete: true }) + }, { allowIncomplete: true, validate: false }) }).input assert.strictEqual(bscript.toASM(replacement), sign.scriptSigFiltered)