Better test vectors for witness serialization (available on testnet)

This commit is contained in:
Thomas Kerin 2016-11-05 20:52:49 +01:00 committed by Daniel Cousens
parent c1d6a5c0d7
commit 035ec47868
2 changed files with 412 additions and 51 deletions

View file

@ -366,100 +366,453 @@
],
"witness": [
{
"description": "P2SH(P2WSH) Multisig",
"id": "bd38915e2aa04b8efa307e0e29ab95582954738a7062cf88730a6276224bd917",
"hash": "17d94b2276620a7388cf62708a7354295895ab290e7e30fa8e4ba02a5e9138bd",
"hex": "0100000000010113ae35a2063ba413c3a1bb9b3820c76291e40e83bd3f23c8ff83333f0c64d623000000002322002086b2dcecbf2e0f0e4095ef11bc8834e2e148d245f844f0b8091389fef91b69ffffffffff0180969800000000001976a914b1ae3ceac136e4bdb733663e7a1e2f0961198a1788ac03004730440220121a629bb5fee3ecaf3e7a0b111101c51de816f427eaedd992b57f49b69b228e0220402ecd144a7321b4bad6ba3bfa5876b755b9c52a8c8ab17a33830d5929a76cbe0125512103b848ab6ac853cd69baaa750c70eb352ebeadb07da0ff5bbd642cb285895ee43f51ae00000000",
"description": "P2PK",
"id": "8d4733995be9b3331a65eeb31bce24b213d4fabcbadf7f6634a8fea442c13e6a",
"hash": "6a3ec142a4fea834667fdfbabcfad413b224ce1bb3ee651a33b3e95b9933478d",
"hex": "010000000193aef40ae141694895e99e18e49d0181b086dd7c011c0241175c6eaf320099970000000049483045022100e57eba5380dcc8a7bdb5370b423dadd43070e1ca268f94bc97b2ded55ca45e9502206a43151c8af03a00f0ac86526d07981e303fc0daea8c6ed435abe8961533046d01ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": false,
"witnessHex": "",
"raw": {
"version": "1",
"version": 1,
"ins": [
{
"hash": "23d6640c3f3383ffc8233fbd830ee49162c720389bbba1c313a43b06a235ae13",
"index": "0",
"script": "002086b2dcecbf2e0f0e4095ef11bc8834e2e148d245f844f0b8091389fef91b69ff"
"hash": "97990032af6e5c1741021c017cdd86b081019de4189ee995486941e10af4ae93",
"index": 0,
"sigHash": "8d590cd3c3622f1cc22b17967abfeac8aa72e5b64f80d9ca7a61c59f07a47a8f",
"script": "3045022100e57eba5380dcc8a7bdb5370b423dadd43070e1ca268f94bc97b2ded55ca45e9502206a43151c8af03a00f0ac86526d07981e303fc0daea8c6ed435abe8961533046d01",
"scriptHex": "483045022100e57eba5380dcc8a7bdb5370b423dadd43070e1ca268f94bc97b2ded55ca45e9502206a43151c8af03a00f0ac86526d07981e303fc0daea8c6ed435abe8961533046d01",
"sequence": 4294967295,
"witness": []
}
],
"outs": [
{
"value": "10000000",
"script": "OP_DUP OP_HASH160 b1ae3ceac136e4bdb733663e7a1e2f0961198a17 OP_EQUALVERIFY OP_CHECKSIG"
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": "0"
},
"coinbase": false
"locktime": 0
}
},
{
"description": "P2SH(Multisig)",
"id": "128f7d5f2b213bf496ebae1990800475d7c448f980e29a82bd99e83e14638e85",
"hash": "858e63143ee899bd829ae280f948c4d77504809019aeeb96f43b212b5f7d8f12",
"hex": "0100000000010113ae35a2063ba413c3a1bb9b3820c76291e40e83bd3f23c8ff83333f0c64d623000000007000483045022100e332e8367d5fee22c205ce1bf4e01e39f1a8decb3ba20d1336770cf38b8ee72d022076b5f83b3ee15390133b7ebf526ec189eb73cc6ee0a726f70b939bc51fa18d800125512103b848ab6ac853cd69baaa750c70eb352ebeadb07da0ff5bbd642cb285895ee43f51aeffffffff0180969800000000001976a914b1ae3ceac136e4bdb733663e7a1e2f0961198a1788ac0000000000",
"description": "P2SH P2PK",
"id": "d4ebb5e09c06dd375f265b51eb7f1a14d12deba71329500e2a00a905fdfdc27d",
"hash": "7dc2fdfd05a9002a0e502913a7eb2dd1141a7feb515b265f37dd069ce0b5ebd4",
"hex": "0100000001a30e865fa60f6c25a8b218bb5a6b9acc7cf3f1db2f2e3a7114b51af5d6ae811f000000006c473044022026d2b56b6cb0269bf4e80dd655b9e917019e2ccef57f4b858d03bb45a2da59d9022010519a7f327f03e7c9613e0694f929544af29d3682e7ec8f19147e7a86651ecd012321038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2bacffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": false,
"witnessHex": "",
"raw": {
"version": "1",
"version": 1,
"ins": [
{
"hash": "23d6640c3f3383ffc8233fbd830ee49162c720389bbba1c313a43b06a235ae13",
"index": "0",
"script": " 3045022100e332e8367d5fee22c205ce1bf4e01e39f1a8decb3ba20d1336770cf38b8ee72d022076b5f83b3ee15390133b7ebf526ec189eb73cc6ee0a726f70b939bc51fa18d8001 512103b848ab6ac853cd69baaa750c70eb352ebeadb07da0ff5bbd642cb285895ee43f51ae"
"hash": "1f81aed6f51ab514713a2e2fdbf1f37ccc9a6b5abb18b2a8256c0fa65f860ea3",
"index": 0,
"sigHash": "e5a339f87c44b443de94b28c1c2a5fe5acedd9ffd2d25ca194cd1d89284b08ed",
"script": "3044022026d2b56b6cb0269bf4e80dd655b9e917019e2ccef57f4b858d03bb45a2da59d9022010519a7f327f03e7c9613e0694f929544af29d3682e7ec8f19147e7a86651ecd01 21038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2bac",
"scriptHex": "473044022026d2b56b6cb0269bf4e80dd655b9e917019e2ccef57f4b858d03bb45a2da59d9022010519a7f327f03e7c9613e0694f929544af29d3682e7ec8f19147e7a86651ecd012321038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2bac",
"sequence": 4294967295,
"witness": []
}
],
"outs": [
{
"value": "10000000",
"script": "OP_DUP OP_HASH160 b1ae3ceac136e4bdb733663e7a1e2f0961198a17 OP_EQUALVERIFY OP_CHECKSIG"
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": "0"
},
"coinbase": false
"locktime": 0
}
},
{
"description": "P2WSH P2PK",
"id": "60f04167a0c94d6439102f7fde9ad77c08a8716419805e77ef66b286cc5c7f87",
"hash": "877f5ccc86b266ef775e80196471a8087cd79ade7f2f1039644dc9a06741f060",
"hex": "01000000014533a3bc1e039bd787656068e135aaee10aee95a64776bfc047ee6a7c1ebdd2f0000000000ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": true,
"witnessHex": "010000000001014533a3bc1e039bd787656068e135aaee10aee95a64776bfc047ee6a7c1ebdd2f0000000000ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac02473044022039725bb7291a14dd182dafdeaf3ea0d5c05c34f4617ccbaa46522ca913995c4e02203b170d072ed2e489e7424ad96d8fa888deb530be2d4c5d9aaddf111a7efdb2d3012321038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2bac00000000",
"raw": {
"version": 1,
"ins": [
{
"hash": "2fddebc1a7e67e04fc6b77645ae9ae10eeaa35e168606587d79b031ebca33345",
"index": 0,
"sigHash": "52601433fe6032a7de9afd72703ab6042015128b04472f8f896609ad274ae0f3",
"script": "",
"scriptHex": "",
"sequence": 4294967295,
"witness": [
"3044022039725bb7291a14dd182dafdeaf3ea0d5c05c34f4617ccbaa46522ca913995c4e02203b170d072ed2e489e7424ad96d8fa888deb530be2d4c5d9aaddf111a7efdb2d301",
"21038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2bac"
]
}
],
"outs": [
{
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": 0
}
},
{
"description": "P2SH P2WSH P2PK",
"id": "da24fd5a422f72e3bde593628c2b47ff9ca7454e1f3ba5fb916344c218d31052",
"hash": "5210d318c2446391fba53b1f4e45a79cff472b8c6293e5bde3722f425afd24da",
"hex": "0100000001e0779d448aaa203a96b3de14d0482e26dd75a4278ae5bb6d7cc18e6874f3866000000000232200200f9ea7bae7166c980169059e39443ed13324495b0d6678ce716262e879591210ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": true,
"witnessHex": "01000000000101e0779d448aaa203a96b3de14d0482e26dd75a4278ae5bb6d7cc18e6874f3866000000000232200200f9ea7bae7166c980169059e39443ed13324495b0d6678ce716262e879591210ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac024730440220014207a5f0601ed7b3c3f9d82309b32e8f76dd6776a55cb5f8684b9ff029e0850220693afd7b69471b51d9354cc1a956b68b8d48e32f6b0ad7a19bb5dd3e4499179a012321038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2bac00000000",
"raw": {
"version": 1,
"ins": [
{
"hash": "6086f374688ec17c6dbbe58a27a475dd262e48d014deb3963a20aa8a449d77e0",
"index": 0,
"sigHash": "b3caa13417b83a07e4684c5f1b5f4563936cd66791ca106b1770aeeaae682794",
"script": "00200f9ea7bae7166c980169059e39443ed13324495b0d6678ce716262e879591210",
"scriptHex": "2200200f9ea7bae7166c980169059e39443ed13324495b0d6678ce716262e879591210",
"sequence": 4294967295,
"witness": [
"30440220014207a5f0601ed7b3c3f9d82309b32e8f76dd6776a55cb5f8684b9ff029e0850220693afd7b69471b51d9354cc1a956b68b8d48e32f6b0ad7a19bb5dd3e4499179a01",
"21038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2bac"
]
}
],
"outs": [
{
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": 0
}
},
{
"description": "P2PKH",
"id": "c7a77aeadf529759c8db9b3f205d690cdaed3df0eaf441ead648086e85a6a280",
"hash": "80a2a6856e0848d6ea41f4eaf03dedda0c695d203f9bdbc8599752dfea7aa7c7",
"hex": "010000000176d7b05b96e69d9760bacf14e496ea01085eff32be8f4e08b299eb92057826e5000000006b4830450221009bd6ff2561437155913c289923175d3f114cca1c0e2bc5989315d5261502c2c902201b71ad90dce076a5eb872330ed729e7c2c4bc2d0513efff099dbefb3b62eab4f0121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2bffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": false,
"witnessHex": "",
"raw": {
"version": 1,
"ins": [
{
"hash": "e526780592eb99b2084e8fbe32ff5e0801ea96e414cfba60979de6965bb0d776",
"index": 0,
"sigHash": "b01334b1f522b3d824960b2ce215031b392b084eca649a6bd1efdf4caa841e7b",
"script": "30450221009bd6ff2561437155913c289923175d3f114cca1c0e2bc5989315d5261502c2c902201b71ad90dce076a5eb872330ed729e7c2c4bc2d0513efff099dbefb3b62eab4f01 038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b",
"scriptHex": "4830450221009bd6ff2561437155913c289923175d3f114cca1c0e2bc5989315d5261502c2c902201b71ad90dce076a5eb872330ed729e7c2c4bc2d0513efff099dbefb3b62eab4f0121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b",
"sequence": 4294967295,
"witness": []
}
],
"outs": [
{
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": 0
}
},
{
"description": "P2SH P2PKH",
"id": "0b8fa64f89b95666a23e424fe94e9114806726be9753e140dbd74c0d673c9593",
"hash": "93953c670d4cd7db40e15397be26678014914ee94f423ea26656b9894fa68f0b",
"hex": "01000000014b9ffc17c3cce03ee66980bf32d36aaa13462980c3af9d9d29ec6b97ab1c91650000000084473044022003d738d855d0c54a419ac62ebe1a1c0bf2dc6993c9585adb9a8666736658107002204d57ff62ee7efae6df73430bba62494faeba8c125a4abcf2488757a4f8877dd50121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b1976a914851a33a5ef0d4279bd5854949174e2c65b1d450088acffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": false,
"witnessHex": "",
"raw": {
"version": 1,
"ins": [
{
"hash": "65911cab976bec299d9dafc380294613aa6ad332bf8069e63ee0ccc317fc9f4b",
"index": 0,
"sigHash": "40c2576db2ad631c5799d344dcb5efd05eef3c52aacb51585af327f8efb3bcde",
"script": "3044022003d738d855d0c54a419ac62ebe1a1c0bf2dc6993c9585adb9a8666736658107002204d57ff62ee7efae6df73430bba62494faeba8c125a4abcf2488757a4f8877dd501 038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b 76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac",
"scriptHex": "473044022003d738d855d0c54a419ac62ebe1a1c0bf2dc6993c9585adb9a8666736658107002204d57ff62ee7efae6df73430bba62494faeba8c125a4abcf2488757a4f8877dd50121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b1976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac",
"sequence": 4294967295,
"witness": []
}
],
"outs": [
{
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": 0
}
},
{
"description": "P2WSH P2PKH",
"id": "62c62316f80beb10d9b1ce9183eb66e7e18a18324ca5f5e6f839be03f64aba83",
"hash": "83ba4af603be39f8e6f5a54c32188ae1e766eb8391ceb1d910eb0bf81623c662",
"hex": "010000000123539877e39a273819006de1c433e09f9e9af201fc178dd0f2cf2eaa5ad53b480000000000ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": true,
"witnessHex": "0100000000010123539877e39a273819006de1c433e09f9e9af201fc178dd0f2cf2eaa5ad53b480000000000ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac03483045022100f02a82b0a94a5d5dc4d2127ac34be62cb066713d71d56bdf5ef7810ab57a157302205f24abdde1dab554a02edcf378e98828024e57272e5e474a5b04accdca080a030121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b1976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"raw": {
"version": 1,
"ins": [
{
"hash": "483bd55aaa2ecff2d08d17fc01f29a9e9fe033c4e16d001938279ae377985323",
"index": 0,
"sigHash": "b0197f4cd027b33ebb2ef54e02a7008dc29ec807ec2de58843fffbdf07ceb2c3",
"script": "",
"scriptHex": "",
"sequence": 4294967295,
"witness": [
"3045022100f02a82b0a94a5d5dc4d2127ac34be62cb066713d71d56bdf5ef7810ab57a157302205f24abdde1dab554a02edcf378e98828024e57272e5e474a5b04accdca080a0301",
"038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b",
"76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
]
}
],
"outs": [
{
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": 0
}
},
{
"description": "P2SH P2WSH P2PKH",
"id": "2ef1431ec41a75791b75d16526f23534ae66d8d4abfb483d98d14bcb259311c0",
"hash": "c0119325cb4bd1983d48fbabd4d866ae3435f22665d1751b79751ac41e43f12e",
"hex": "0100000001363dfbfe2566db77e3b1195bedf1d0daeb9ce526cd7611ba81759b2654ce415c0000000023220020578db4b54a6961060b71385c17d3280379a557224c52b11b19a3a1c1eef606a0ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": true,
"witnessHex": "01000000000101363dfbfe2566db77e3b1195bedf1d0daeb9ce526cd7611ba81759b2654ce415c0000000023220020578db4b54a6961060b71385c17d3280379a557224c52b11b19a3a1c1eef606a0ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac03483045022100c8bd5ebb26ba6719158650c3e7c5e80be4c886ba025c44cc41f5149b3114705a02203ac6e1f38f6c081d506f28f1b5e38ebec9e0f0fa911d0e3f68d48d8b0e77b34b0121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b1976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"raw": {
"version": 1,
"ins": [
{
"hash": "5c41ce54269b7581ba1176cd26e59cebdad0f1ed5b19b1e377db6625fefb3d36",
"index": 0,
"sigHash": "9580096496f72ae9fed63e6701b2a9df3c8d212d8accd4b1966d3239c33a859f",
"script": "0020578db4b54a6961060b71385c17d3280379a557224c52b11b19a3a1c1eef606a0",
"scriptHex": "220020578db4b54a6961060b71385c17d3280379a557224c52b11b19a3a1c1eef606a0",
"sequence": 4294967295,
"witness": [
"3045022100c8bd5ebb26ba6719158650c3e7c5e80be4c886ba025c44cc41f5149b3114705a02203ac6e1f38f6c081d506f28f1b5e38ebec9e0f0fa911d0e3f68d48d8b0e77b34b01",
"038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b",
"76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
]
}
],
"outs": [
{
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": 0
}
},
{
"description": "Multisig",
"id": "3cd3dfe7312d34798b87351d9b72b3356e6ec109d841919cec510f3efa5d291f",
"hash": "1f295dfa3e0f51ec9c9141d809c16e6e35b3729b1d35878b79342d31e7dfd33c",
"hex": "0100000000010113ae35a2063ba413c3a1bb9b3820c76291e40e83bd3f23c8ff83333f0c64d623000000004a00483045022100e332e8367d5fee22c205ce1bf4e01e39f1a8decb3ba20d1336770cf38b8ee72d022076b5f83b3ee15390133b7ebf526ec189eb73cc6ee0a726f70b939bc51fa18d8001ffffffff0180969800000000001976a914b1ae3ceac136e4bdb733663e7a1e2f0961198a1788ac0000000000",
"id": "7f5d96a866a815f5a1896fcd3b49cd00ac4c366a371fe8555f124e628e977a5e",
"hash": "5e7a978e624e125f55e81f376a364cac00cd493bcd6f89a1f515a866a8965d7f",
"hex": "010000000179310ec46e734b3490ee839c5ae4a09d28561ee9fff2d051f733d201f958d6d2000000004a00483045022100d269531f120f377ed2f94f42bef893ff2fe6544ac97fb477fa291bc6cfb7647e02200983f6a5bbd4ce6cf97f571995634805a7324cc5d8353ed954fa62477b0fcd0901ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": false,
"witnessHex": "",
"raw": {
"version": "1",
"version": 1,
"ins": [
{
"hash": "23d6640c3f3383ffc8233fbd830ee49162c720389bbba1c313a43b06a235ae13",
"index": "0",
"script": " 3045022100e332e8367d5fee22c205ce1bf4e01e39f1a8decb3ba20d1336770cf38b8ee72d022076b5f83b3ee15390133b7ebf526ec189eb73cc6ee0a726f70b939bc51fa18d8001"
"hash": "d2d658f901d233f751d0f2ffe91e56289da0e45a9c83ee90344b736ec40e3179",
"index": 0,
"sigHash": "1c68226955e39aed91eb7f35fa106240951208138b584caeb05b44f367078b09",
"script": "OP_0 3045022100d269531f120f377ed2f94f42bef893ff2fe6544ac97fb477fa291bc6cfb7647e02200983f6a5bbd4ce6cf97f571995634805a7324cc5d8353ed954fa62477b0fcd0901",
"scriptHex": "00483045022100d269531f120f377ed2f94f42bef893ff2fe6544ac97fb477fa291bc6cfb7647e02200983f6a5bbd4ce6cf97f571995634805a7324cc5d8353ed954fa62477b0fcd0901",
"sequence": 4294967295,
"witness": []
}
],
"outs": [
{
"value": "10000000",
"script": "OP_DUP OP_HASH160 b1ae3ceac136e4bdb733663e7a1e2f0961198a17 OP_EQUALVERIFY OP_CHECKSIG"
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": "0"
},
"coinbase": false
"locktime": 0
}
},
{
"description": "P2PK",
"id": "6cf3688270c95846d3ced68b7fcf90f30daddd63e951ed04791cbf1f8c731c77",
"hash": "771c738c1fbf1c7904ed51e963ddad0df390cf7f8bd6ced34658c9708268f36c",
"hex": "0100000000010113ae35a2063ba413c3a1bb9b3820c76291e40e83bd3f23c8ff83333f0c64d623000000006a47304402203f965bdf792ea80c1f96e4292d1edb52ca62f22c7511aefca967fb9f3067063402204acbfaa4e7f1d5631227d491426d89d954d5e2abfed6f0dbc300216f01916baa012103b848ab6ac853cd69baaa750c70eb352ebeadb07da0ff5bbd642cb285895ee43fffffffff0100000000000000001976a914b1ae3ceac136e4bdb733663e7a1e2f0961198a1788ac0000000000",
"description": "P2SH Multisig",
"id": "3aef827e4306bab01f118a8eccad74713bcd1695362caf9fed55202ed54ef88b",
"hash": "8bf84ed52e2055ed9faf2c369516cd3b7174adcc8e8a111fb0ba06437e82ef3a",
"hex": "010000000152882c661c49dd2f53bd9ced7e9f44b184888ad2fe7d86737f0efaa7aecdced1000000006f00473044022025f2e161f0a97888df948f4dcc7c04fe502510b8d8260ca9920f38d55e4d17720220271b6843224b3a34542a4df31781d048da56ee46b8c5fb99043e30abd527b2d801255121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b51aeffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": false,
"witnessHex": "",
"raw": {
"version": "1",
"version": 1,
"ins": [
{
"hash": "23d6640c3f3383ffc8233fbd830ee49162c720389bbba1c313a43b06a235ae13",
"index": "0",
"script": "304402203f965bdf792ea80c1f96e4292d1edb52ca62f22c7511aefca967fb9f3067063402204acbfaa4e7f1d5631227d491426d89d954d5e2abfed6f0dbc300216f01916baa01 03b848ab6ac853cd69baaa750c70eb352ebeadb07da0ff5bbd642cb285895ee43f"
"hash": "d1cecdaea7fa0e7f73867dfed28a8884b1449f7eed9cbd532fdd491c662c8852",
"index": 0,
"sigHash": "a1b982ea4d57c3255268a801885ea8ee8b785d52bf7dd024997a5111c9295f5a",
"script": "OP_0 3044022025f2e161f0a97888df948f4dcc7c04fe502510b8d8260ca9920f38d55e4d17720220271b6843224b3a34542a4df31781d048da56ee46b8c5fb99043e30abd527b2d801 5121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b51ae",
"scriptHex": "00473044022025f2e161f0a97888df948f4dcc7c04fe502510b8d8260ca9920f38d55e4d17720220271b6843224b3a34542a4df31781d048da56ee46b8c5fb99043e30abd527b2d801255121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b51ae",
"sequence": 4294967295,
"witness": []
}
],
"outs": [
{
"value": "0",
"script": "OP_DUP OP_HASH160 b1ae3ceac136e4bdb733663e7a1e2f0961198a17 OP_EQUALVERIFY OP_CHECKSIG"
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": "0"
},
"coinbase": false
"locktime": 0
}
},
{
"description": "P2WSH Multisig",
"id": "03e6b741d25cbd061b8d0999a521788ef90263dd8ba96d91c2136a4386afdf8e",
"hash": "8edfaf86436a13c2916da98bdd6302f98e7821a599098d1b06bd5cd241b7e603",
"hex": "0100000001c1eced6216de0889d4629ff64a8af8e8ec6d0b414de0c57b46c02cc303d321fe0000000000ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": true,
"witnessHex": "01000000000101c1eced6216de0889d4629ff64a8af8e8ec6d0b414de0c57b46c02cc303d321fe0000000000ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac0300483045022100d4c0cbdb45915b8a3162362fa5f74556de919aeda5337fc44a7fb000e833460d022017742c37d7a061e2ae3a086c7c585c9c85e5d31af468d3e00045c0f35b8f8eb601255121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b51ae00000000",
"raw": {
"version": 1,
"ins": [
{
"hash": "fe21d303c32cc0467bc5e04d410b6dece8f88a4af69f62d48908de1662edecc1",
"index": 0,
"sigHash": "c57f8489d77552631b10fc703de3d2a72e473590b8b8283f4a1134855c6e4368",
"script": "",
"scriptHex": "",
"sequence": 4294967295,
"witness": [
"",
"3045022100d4c0cbdb45915b8a3162362fa5f74556de919aeda5337fc44a7fb000e833460d022017742c37d7a061e2ae3a086c7c585c9c85e5d31af468d3e00045c0f35b8f8eb601",
"5121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b51ae"
]
}
],
"outs": [
{
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": 0
}
},
{
"description": "P2SH P2WSH Multisig",
"id": "e77fd9ea35346e295e1e15de9724fff42b5c127da4c5447a4ffddd361f66b1c1",
"hash": "c1b1661f36ddfd4f7a44c5a47d125c2bf4ff2497de151e5e296e3435ead97fe7",
"hex": "01000000013a5a2ab0223d3b504b52af76d650329750666fbf1be13d4cb08d0d9fc550a47d00000000232200201b8c0c2878c5634c3ce738cdc568c592e99783dbd28ff4c6cb5b7b4675d9ee99ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": true,
"witnessHex": "010000000001013a5a2ab0223d3b504b52af76d650329750666fbf1be13d4cb08d0d9fc550a47d00000000232200201b8c0c2878c5634c3ce738cdc568c592e99783dbd28ff4c6cb5b7b4675d9ee99ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac0300483045022100c97a5e205ce0023d3d44f846abf1f0e21b6f2646bd2496bbe92e4333fe4401be02201247e047d669f713582713e35d2eba430abc3d75a924bb500362bf47d6234ed501255121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b51ae00000000",
"raw": {
"version": 1,
"ins": [
{
"hash": "7da450c59f0d8db04c3de11bbf6f6650973250d676af524b503b3d22b02a5a3a",
"index": 0,
"sigHash": "90ced36a2a53e986837407ec5b34fca11c68b477fa51806715186595372c0b37",
"script": "00201b8c0c2878c5634c3ce738cdc568c592e99783dbd28ff4c6cb5b7b4675d9ee99",
"scriptHex": "2200201b8c0c2878c5634c3ce738cdc568c592e99783dbd28ff4c6cb5b7b4675d9ee99",
"sequence": 4294967295,
"witness": [
"",
"3045022100c97a5e205ce0023d3d44f846abf1f0e21b6f2646bd2496bbe92e4333fe4401be02201247e047d669f713582713e35d2eba430abc3d75a924bb500362bf47d6234ed501",
"5121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b51ae"
]
}
],
"outs": [
{
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": 0
}
},
{
"description": "P2WKH",
"id": "10bbdf7e9301bc21f1da8684f25fd66bc1314904c30da25a8ebf967c58c89269",
"hash": "6992c8587c96bf8e5aa20dc3044931c16bd65ff28486daf121bc01937edfbb10",
"hex": "010000000133defbe3e28860007ff3e21222774c220cb35d554fa3e3796d25bf8ee983e1080000000000ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": true,
"witnessHex": "0100000000010133defbe3e28860007ff3e21222774c220cb35d554fa3e3796d25bf8ee983e1080000000000ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac0248304502210097c3006f0b390982eb47f762b2853773c6cedf83668a22d710f4c13c4fd6b15502205e26ef16a81fc818a37f3a34fc6d0700e61100ea6c6773907c9c046042c440340121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b00000000",
"raw": {
"version": 1,
"ins": [
{
"hash": "08e183e98ebf256d79e3a34f555db30c224c772212e2f37f006088e2e3fbde33",
"index": 0,
"sigHash": "8ef2f4892fdbb44a7859ac059cdacf20903566a1472fae38ba37443c44b66202",
"script": "",
"scriptHex": "",
"sequence": 4294967295,
"witness": [
"304502210097c3006f0b390982eb47f762b2853773c6cedf83668a22d710f4c13c4fd6b15502205e26ef16a81fc818a37f3a34fc6d0700e61100ea6c6773907c9c046042c4403401",
"038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b"
]
}
],
"outs": [
{
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": 0
}
},
{
"description": "P2SH P2WKH",
"id": "a0dd6714722a577c5db08f740cd1525f5383f8771dd0ebecd9ae96eb6623408a",
"hash": "8a402366eb96aed9ecebd01d77f883535f52d10c748fb05d7c572a721467dda0",
"hex": "01000000015df9a0b9ade2d835881704e0f53b51a4b19ecfc794ea1f3555783dd7f68659ce0000000017160014851a33a5ef0d4279bd5854949174e2c65b1d4500ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac00000000",
"hasWitness": true,
"witnessHex": "010000000001015df9a0b9ade2d835881704e0f53b51a4b19ecfc794ea1f3555783dd7f68659ce0000000017160014851a33a5ef0d4279bd5854949174e2c65b1d4500ffffffff0160ea0000000000001976a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac02483045022100cb3929c128fec5108071b662e5af58e39ac8708882753a421455ca80462956f6022030c0f4738dd1a13fc7a34393002d25c6e8a6399f29c7db4b98f53a9475d94ca20121038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b00000000",
"raw": {
"version": 1,
"ins": [
{
"hash": "ce5986f6d73d7855351fea94c7cf9eb1a4513bf5e004178835d8e2adb9a0f95d",
"index": 0,
"sigHash": "b9d9a395dbd84365e93016a3ba1ffe2c373b85e245598597b2f8cd6eb0706252",
"script": "0014851a33a5ef0d4279bd5854949174e2c65b1d4500",
"scriptHex": "160014851a33a5ef0d4279bd5854949174e2c65b1d4500",
"sequence": 4294967295,
"witness": [
"3045022100cb3929c128fec5108071b662e5af58e39ac8708882753a421455ca80462956f6022030c0f4738dd1a13fc7a34393002d25c6e8a6399f29c7db4b98f53a9475d94ca201",
"038de63cf582d058a399a176825c045672d5ff8ea25b64d28d4375dcdb14c02b2b"
]
}
],
"outs": [
{
"value": 60000,
"script": "OP_DUP OP_HASH160 851a33a5ef0d4279bd5854949174e2c65b1d4500 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914851a33a5ef0d4279bd5854949174e2c65b1d450088ac"
}
],
"locktime": 0
}
}
]
}

View file

@ -46,6 +46,14 @@ describe('Transaction', function () {
var id = f.id || f.hash
var txHex = f.hex || f.txHex
if (f.hasWitness) {
it('imports ' + f.description + ' (' + id + ') as witness', function () {
var actual = Transaction.fromHex(f.witnessHex)
assert.strictEqual(actual.toHex(), f.witnessHex, actual.toHex())
})
}
it('imports ' + f.description + ' (' + id + ')', function () {
var actual = Transaction.fromHex(txHex)