Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bip-0360/ref-impl/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
rust-bitcoin
rust-miniscript
libbitcoinpqc
target
.btcdeb_history
*.swp
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
"version": 1,
"test_vectors": [
{
"id": "p2qrh_missing_leaf_script_tree_error",
"objective": "Tests P2QRH with missing leaf script tree",
"id": "p2tsh_missing_leaf_script_tree_error",
"objective": "Tests P2TSH with missing leaf script tree",
"given": {
"script_tree": ""
},
"intermediary": {
},
"expected": {
"error": "P2QRH requires a script tree with at least one leaf"
"error": "P2TSH requires a script tree with at least one leaf"
}
},
{
"id": "p2qrh_single_leaf_script_tree",
"objective": "Tests P2QRH with single leaf script tree",
"id": "p2tsh_single_leaf_script_tree",
"objective": "Tests P2TSH with single leaf script tree",
"given": {
"scriptTree": {
"id": 0,
Expand All @@ -28,19 +28,19 @@
"leafHashes": [
"c525714a7f49c28aedbbba78c005931a81c234b2f6c99a73e4d06082adc8bf2b"
],
"quantumRoot": "27e8a6af1f05d3dbfebfc4073a8391cf8db28746767c2b34d606900ad721127b"
"merkleRoot": "c525714a7f49c28aedbbba78c005931a81c234b2f6c99a73e4d06082adc8bf2b"
},
"expected": {
"scriptPubKey": "532027e8a6af1f05d3dbfebfc4073a8391cf8db28746767c2b34d606900ad721127b",
"bip350Address": "bc1ryl52dtclqhfahl4lcsrn4qu3e7xm9p6xwe7zkdxkq6gq44epzfasklalkw",
"scriptPubKey": "5220c525714a7f49c28aedbbba78c005931a81c234b2f6c99a73e4d06082adc8bf2b",
"bip350Address": "bc1zc5jhzjnlf8pg4mdmhfuvqpvnr2quyd9j7mye5uly6psg9twghu4ssr0v9k",
"scriptPathControlBlocks": [
"c1"
]
}
},
{
"id": "p2qrh_different_version_leaves",
"objective": "Tests P2QRH with two script leaves of different versions. TO-DO: currently ignores given leaf version and over-rides. Probably better to throw error",
"id": "p2tsh_different_version_leaves",
"objective": "Tests P2TSH with two script leaves of different versions. TO-DO: currently ignores given leaf version and over-rides. Probably better to throw error",
"given": {
"scriptTree": [
{
Expand All @@ -63,20 +63,20 @@
"8ad69ec7cf41c2a4001fd1f738bf1e505ce2277acdcaa63fe4765192497f47a7",
"f224a923cd0021ab202ab139cc56802ddb92dcfc172b9212261a539df79a112a"
],
"quantumRoot": "af8e7912e4794d9234f22ae3c03905d50d1015572617efc74f482aa6c8ba0376"
"merkleRoot": "6c2dc106ab816b73f9d07e3cd1ef2c8c1256f519748e0813e4edd2405d277bef"
},
"expected": {
"scriptPubKey": "5320af8e7912e4794d9234f22ae3c03905d50d1015572617efc74f482aa6c8ba0376",
"bip350Address": "bc1r4788jyhy09xeyd8j9t3uqwg965x3q92hyct7l360fq42dj96qdmqtpftcg",
"scriptPubKey": "52206c2dc106ab816b73f9d07e3cd1ef2c8c1256f519748e0813e4edd2405d277bef",
"bip350Address": "bc1zdskuzp4ts94h87ws0c7drmev3sf9dagewj8qsylyahfyqhf800hsam4d6e",
"scriptPathControlBlocks": [
"c1f224a923cd0021ab202ab139cc56802ddb92dcfc172b9212261a539df79a112a",
"c18ad69ec7cf41c2a4001fd1f738bf1e505ce2277acdcaa63fe4765192497f47a7"
]
}
},
{
"id": "p2qrh_simple_lightning_contract",
"objective": "Tests P2QRH with two script leaves that simulate a simple lightning network contract. Reference: https://github.com/bitcoin-core/btcdeb/blob/master/doc/tapscript-example-with-tap.md",
"id": "p2tsh_simple_lightning_contract",
"objective": "Tests P2TSH with two script leaves that simulate a simple lightning network contract. Reference: https://github.com/bitcoin-core/btcdeb/blob/master/doc/tapscript-example-with-tap.md",
"given": {
"scriptTree": [
{
Expand All @@ -100,20 +100,20 @@
"c81451874bd9ebd4b6fd4bba1f84cdfb533c532365d22a0a702205ff658b17c9",
"632c8632b4f29c6291416e23135cf78ecb82e525788ea5ed6483e3c6ce943b42"
],
"quantumRoot": "04b74fb166133f6700927ce4f83ad08cbef5209bdc253b6e727b0206a78fbfd9"
"merkleRoot": "41646f8c1fe2a96ddad7f5471bc4fee7da98794ef8c45a4f4fc6a559d60c9f6b"
},
"expected": {
"scriptPubKey": "532004b74fb166133f6700927ce4f83ad08cbef5209bdc253b6e727b0206a78fbfd9",
"bip350Address": "bc1rqjm5lvtxzvlkwqyj0nj0swks3jl02gymmsjnkmnj0vpqdfu0hlvsn5j95l",
"scriptPubKey": "522041646f8c1fe2a96ddad7f5471bc4fee7da98794ef8c45a4f4fc6a559d60c9f6b",
"bip350Address": "bc1zg9jxlrqlu25kmkkh74r3h387uldfs72wlrz95n60c6j4n4svna4s4lhfhe",
"scriptPathControlBlocks": [
"c1c81451874bd9ebd4b6fd4bba1f84cdfb533c532365d22a0a702205ff658b17c9",
"c1632c8632b4f29c6291416e23135cf78ecb82e525788ea5ed6483e3c6ce943b42"
]
}
},
{
"id": "p2qrh_two_leaf_same_version",
"objective": "Tests P2QRH with two script leaves of same version",
"id": "p2tsh_two_leaf_same_version",
"objective": "Tests P2TSH with two script leaves of same version",
"given": {
"scriptTree": [
{
Expand All @@ -136,20 +136,20 @@
"64512fecdb5afa04f98839b50e6f0cb7b1e539bf6f205f67934083cdcc3c8d89",
"2cb2b90daa543b544161530c925f285b06196940d6085ca9474d41dc3822c5cb"
],
"quantumRoot": "f2916fd14cd711482f5262fef02d61647602493e94a3b5ec48d2cc1beee78fa5"
"merkleRoot": "ab179431c28d3b68fb798957faf5497d69c883c6fb1e1cd9f81483d87bac90cc"
},
"expected": {
"scriptPubKey": "5320f2916fd14cd711482f5262fef02d61647602493e94a3b5ec48d2cc1beee78fa5",
"bip350Address": "bc1r72gkl52v6ug5st6jvtl0qttpv3mqyjf7jj3mtmzg6txphmh837jsv2ydgs",
"scriptPubKey": "5220ab179431c28d3b68fb798957faf5497d69c883c6fb1e1cd9f81483d87bac90cc",
"bip350Address": "bc1z4vtegvwz35ak37me39tl4a2f045u3q7xlv0pek0czjpas7avjrxqz20g2y",
"scriptPathControlBlocks": [
"c12cb2b90daa543b544161530c925f285b06196940d6085ca9474d41dc3822c5cb",
"c164512fecdb5afa04f98839b50e6f0cb7b1e539bf6f205f67934083cdcc3c8d89"
]
}
},
{
"id": "p2qrh_three_leaf_complex",
"objective": "Tests P2QRH with a complex three-leaf script tree structure, demonstrating nested script paths and multiple verification options",
"id": "p2tsh_three_leaf_complex",
"objective": "Tests P2TSH with a complex three-leaf script tree structure, demonstrating nested script paths and multiple verification options",
"given": {
"internalPubkey": "e0dfe2300b0dd746a3f8674dfd4525623639042569d829c7f0eed9602d263e6f",
"scriptTree": [
Expand Down Expand Up @@ -181,11 +181,11 @@
"ba982a91d4fc552163cb1c0da03676102d5b7a014304c01f0c77b2b8e888de1c",
"9e31407bffa15fefbf5090b149d53959ecdf3f62b1246780238c24501d5ceaf6"
],
"quantumRoot": "6035c881af058a8135592c019cab755a0b41692e408eebe3ca9f0ee32d1b020c"
"merkleRoot": "ccbd66c6f7e8fdab47b3a486f59d28262be857f30d4773f2d5ea47f7761ce0e2"
},
"expected": {
"scriptPubKey": "53206035c881af058a8135592c019cab755a0b41692e408eebe3ca9f0ee32d1b020c",
"bip350Address": "bc1rvq6u3qd0qk9gzd2e9sqee2m4tg95z6fwgz8whc72nu8wxtgmqgxqu3r6wq",
"scriptPubKey": "5220ccbd66c6f7e8fdab47b3a486f59d28262be857f30d4773f2d5ea47f7761ce0e2",
"bip350Address": "bc1zej7kd3hhar76k3an5jr0t8fgyc47s4lnp4rh8uk4afrlwasuur3qzgewqq",
"scriptPathControlBlocks": [
"c1ffe578e9ea769027e4f5a3de40732f75a88a6353a09d767ddeb66accef85e553",
"c1ba982a91d4fc552163cb1c0da03676102d5b7a014304c01f0c77b2b8e888de1c2645a02e0aac1fe69d69755733a9b7621b694bb5b5cde2bbfc94066ed62b9817",
Expand All @@ -194,8 +194,8 @@
}
},
{
"id": "p2qrh_three_leaf_alternative",
"objective": "Tests another variant of P2QRH with three leaves arranged in a different tree structure, showing alternative script path spending options",
"id": "p2tsh_three_leaf_alternative",
"objective": "Tests another variant of P2TSH with three leaves arranged in a different tree structure, showing alternative script path spending options",
"given": {
"internalPubkey": "55adf4e8967fbd2e29f20ac896e60c3b0f1d5b0efa9d34941b5958c7b0a0312d",
"scriptTree": [
Expand Down Expand Up @@ -227,11 +227,11 @@
"737ed1fe30bc42b8022d717b44f0d93516617af64a64753b7a06bf16b26cd711",
"d7485025fceb78b9ed667db36ed8b8dc7b1f0b307ac167fa516fe4352b9f4ef7"
],
"quantumRoot": "4de1ac7ff4cef472d80e44e1873ff7e4c61cc109f8cf87b49aa5309d3f2b8994"
"merkleRoot": "2f6b2c5397b6d68ca18e09a3f05161668ffe93a988582d55c6f07bd5b3329def"
},
"expected": {
"scriptPubKey": "53204de1ac7ff4cef472d80e44e1873ff7e4c61cc109f8cf87b49aa5309d3f2b8994",
"bip350Address": "bc1rfhs6cll5em689kqwgnscw0lhunrpesgflr8c0dy655cf60et3x2q2vmn2f",
"scriptPubKey": "52202f6b2c5397b6d68ca18e09a3f05161668ffe93a988582d55c6f07bd5b3329def",
"bip350Address": "bc1z9a4jc5uhkmtgegvwpx3lq5tpv68layaf3pvz64wx7paatvejnhhsv52lcv",
"scriptPathControlBlocks": [
"c13cd369a528b326bc9d2133cbd2ac21451acb31681a410434672c8e34fe757e91",
"c1737ed1fe30bc42b8022d717b44f0d93516617af64a64753b7a06bf16b26cd711f154e8e8e17c31d3462d7132589ed29353c6fafdb884c5a6e04ea938834f0d9d",
Expand Down
Loading