From b0c367a8fe4c606341e29c03d3d7723e622eb0e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoe=20Faltib=C3=A0?= Date: Tue, 11 Jun 2024 18:33:46 +0200 Subject: [PATCH 1/2] add validation tests --- ...undles_pubWitness_data_input_sequence.yaml | 1138 ++++++++++++++++ tests/fixtures/attack_chain.yaml | 1138 ++++++++++++++++ tests/fixtures/attack_genesis_schema_id.yaml | 1149 +++++++++++++++++ tests/fixtures/attack_genesis_testnet.yaml | 1149 +++++++++++++++++ tests/fixtures/attack_resolver_error.yaml | 1127 ++++++++++++++++ ...e46f46daca1fdd7199dd043e04c7841b2ff40.yaml | 16 + ...62e23a6ede1276c12ccd426c530cd531e4cfa.yaml | 14 + ...a73e5988a96235b84e943a0c4e0fd05a8ca66.yaml | 16 + ...f56dec505a719c2564743b1bebe0289c7d893.yaml | 14 + ...6cbba1f132c67a2b6d8c6c88bbcc0f83afe1b.yaml | 16 + ...b129960f2ca86bbdbca338df3b3c7234544dc.yaml | 14 + tests/fixtures/consignment_A.yaml | 1138 ++++++++++++++++ tests/fixtures/consignment_B.yaml | 1149 +++++++++++++++++ tests/utils/mod.rs | 5 +- tests/validation.rs | 392 ++++++ 15 files changed, 8472 insertions(+), 3 deletions(-) create mode 100644 tests/fixtures/attack_bundles_pubWitness_data_input_sequence.yaml create mode 100644 tests/fixtures/attack_chain.yaml create mode 100644 tests/fixtures/attack_genesis_schema_id.yaml create mode 100644 tests/fixtures/attack_genesis_testnet.yaml create mode 100644 tests/fixtures/attack_resolver_error.yaml create mode 100644 tests/fixtures/bc:222f1a35bb96a02831930dcdd02e46f46daca1fdd7199dd043e04c7841b2ff40.yaml create mode 100644 tests/fixtures/bc:3b9c8836e09cdf08d225b8e9f7862e23a6ede1276c12ccd426c530cd531e4cfa.yaml create mode 100644 tests/fixtures/bc:5abbca66698ef17ab5e5794adc5a73e5988a96235b84e943a0c4e0fd05a8ca66.yaml create mode 100644 tests/fixtures/bc:97b4c906fafad952e7b68784d38f56dec505a719c2564743b1bebe0289c7d893.yaml create mode 100644 tests/fixtures/bc:b9703e716d01de771d443c5cbf06cbba1f132c67a2b6d8c6c88bbcc0f83afe1b.yaml create mode 100644 tests/fixtures/bc:f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc.yaml create mode 100644 tests/fixtures/consignment_A.yaml create mode 100644 tests/fixtures/consignment_B.yaml create mode 100644 tests/validation.rs diff --git a/tests/fixtures/attack_bundles_pubWitness_data_input_sequence.yaml b/tests/fixtures/attack_bundles_pubWitness_data_input_sequence.yaml new file mode 100644 index 0000000..9bf1b81 --- /dev/null +++ b/tests/fixtures/attack_bundles_pubWitness_data_input_sequence.yaml @@ -0,0 +1,1138 @@ +version: v2 +transfer: true +terminals: + 73f48813952cc85227ceca63d6502a87b9626f7a8055f7861f3e4de2142f8da6: + chain: bitcoin + data: e7db1cdbb0b180b6065453f678cd18b0e72bf9164f18063da492ea87c0b9ebf1 +genesis: + ffv: 0 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + flags: null + timestamp: 1726062101 + issuer: ssi:anonymous + testnet: true + altLayers1: [] + assetTags: + 4000: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + metadata: {} + globals: + 2000: + - 074e494154434b520e4e4941206173736574206e616d650002 + 2001: + - 09004e4941207465726d7300 + 2010: + - 9a02000000000000 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: b14a4a75c431963603604cc22eef43490a4ebfa467dfdd95268b4189469e40a3 + vout: 1 + blinding: 16661440592927853019 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null +extensions: [] +bundles: +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: b14a4a75c431963603604cc22eef43490a4ebfa467dfdd95268b4189469e40a3:1 + sigScript: '' + sequence: 1 + witness: [] + outputs: + - value: 99999600 + scriptPubkey: 001453cbf24ae868c3a35152173c490c782ea9b6e1e6 + - value: 0 + scriptPubkey: 6a209b9c0f2079ec987c6ac75a5929e3a158dbb07830468cec5e99682123c72d22e9 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - fec9c249d0abe6afe779ab25ca1d58b7d9774e57417a3c5afff5064b44dc51a1 + - a7dd80ab148acea29c82f140b1c957b9b493113ccee7610ead8e8acd496d4154 + - 8db0f6cbb5bd7909119a9978a73cbe67c82e918dac75c8fdc6b8b987828bf1ae + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678 + knownTransitions: + 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 65535 + metadata: {} + globals: {} + inputs: + - prevOut: + op: a65598039a39a052b065251c7a846da5d3c44c259daa5af120c30c7040e2fddc + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 16734970205036440893 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: 97b4c906fafad952e7b68784d38f56dec505a719c2564743b1bebe0289c7d893:0 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 99999200 + scriptPubkey: 0014e812ba00edc55b6f1a775d06bc777967b44b9ca9 + - value: 0 + scriptPubkey: 6a2084412f08192e3f0afeac2d6395cd36b535383b97d4676d4a2b765648f2517a26 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - fce547df72ce13e5030eb3dd1157f3d69bc0a27a2d69b2db29d5567d1776c2cf + - f94839df364232e38ee05f2014122019a3ed50d8a19391922867d17c6eff4c6f + - e8de5343de750860fbeca3d7b5cafbb6f5972f1be2951f5afbc0c75ffaf1bf6f + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65 + knownTransitions: + 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678 + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 7179609303082705751 + state: + value: 616 + blinding: 2654e3553f7c17fe8ab955cc84ce02a81135c0d6ad96c776950df35812ec948b + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + - seal: + chain: bitcoin + data: da2ca87d91edadde873cef8ac850c9601b1a200183bbc1d5d44a44a4603d6d3b + state: + value: 50 + blinding: 58299b293f02667ff3c528b1f9b07bd66d48bda7d0e7b707e9708b266b91e9f3 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc:0 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 99998800 + scriptPubkey: 00140aa0ef9fc250c3302e50e7109cf4a1edf7b35a3e + - value: 0 + scriptPubkey: 6a20ea249b07fca7ce1bb28c608ac5a4d6aa83d45580e1f23eeab6f9fe35bf04b464 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - 0e5d954e45be6e0774890ac31ab14a50d583edf7584c27f6a33a533c0b352a0b + - 671afbc968036449cc8e3d0064a6b07191220a7b131c525c9d09d462263995b4 + - ac6bc5f3d995abc937dbf2c4aa35874f191e0bd6f825a852718e4247c394bdda + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 0fe0a5da70d5feb6f69e5145a34915f1dced10074b745ad8a55cffa6c5835226 + knownTransitions: + 0fe0a5da70d5feb6f69e5145a34915f1dced10074b745ad8a55cffa6c5835226: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65 + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 7526231348918810717 + state: + value: 539 + blinding: 9ac1a0a9fc74bc2f010795f5091593cedd550ef0b80e505ff92820f1daf26c45 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + - seal: + chain: bitcoin + data: e7db1cdbb0b180b6065453f678cd18b0e72bf9164f18063da492ea87c0b9ebf1 + state: + value: 77 + blinding: 8b9342ab43075bcf89b1bfd77bb86ed7ee8f8ecca4d117525bb830f308306987 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +schema: + ffv: 0 + flags: null + name: NonInflatableAsset + timestamp: 1713343888 + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + metaTypes: {} + globalTypes: + 2000: + reserved: null + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + maxItems: 1 + 2001: + reserved: null + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + maxItems: 1 + 2010: + reserved: null + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + maxItems: 1 + ownedTypes: + 4000: !fungible unsigned64Bit + valencyTypes: [] + genesis: + metadata: [] + globals: + 2000: once + 2001: once + 2010: once + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 9 + extensions: {} + transitions: + 10000: + metadata: [] + globals: {} + inputs: + 4000: onceOrMore + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 0 + reserved: null +ifaces: + ? version: v1 + name: RGB20Fixed + inherits: + - rgb:ifc:Vk9c4$Ny-Fv0J6tg-pDF05CE-312oCWh-fENNuia-GYbEu18#adios-alert-never + - rgb:ifc:13N6PRwT-T68!FGY-lBwX2cm-qesgJ11-j0nQkM1-WSCJFj4#ariel-gizmo-evita + - rgb:ifc:naFrAfgG-Kfu$A!c-3L!bC$4-s1LWJQV-4Iv!62u-4B3ab8Y#mailbox-dialog-iron + - rgb:ifc:w3Lk9Mt3-gKt$n5y-TYpVGg0-IDpK0p9-sHQ!hb6-m2Qr3a0#unicorn-reward-ladder + timestamp: 1711405444 + metadata: {} + globalState: + issuedSupply: + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + required: true + multiple: false + spec: + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + required: true + multiple: false + terms: + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + required: true + multiple: false + assignments: + assetOwner: + ownedState: amount + public: false + required: true + multiple: true + valencies: {} + genesis: + modifier: abstract + metadata: [] + globals: + issuedSupply: once + spec: once + terms: once + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - issuedMismatch + transitions: + transfer: + modifier: abstract + optional: false + metadata: [] + globals: {} + inputs: + assetOwner: onceOrMore + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - nonEqualAmounts + defaultAssignment: assetOwner + extensions: {} + defaultOperation: transfer + errors: + issuedMismatch: supply specified as a global parameter doesn't match the issued supply allocated to the asset owners + nonEqualAmounts: the sum of spent assets doesn't equal to the sum of assets in outputs + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + : version: v1 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + ifaceId: rgb:ifc:$iUnO9aO-1xhqUd6-1Jm5S5!-wM3ngby-5GVEylQ-ZTAMYDk#tornado-pioneer-bucket + timestamp: 1713343888 + metadata: [] + globalState: + - id: 2000 + name: spec + reserved: null + - id: 2001 + name: terms + reserved: null + - id: 2010 + name: issuedSupply + reserved: null + assignments: + - id: 4000 + name: assetOwner + reserved: null + valencies: [] + transitions: + - id: 10000 + name: transfer + reserved: null + extensions: [] + errors: + - id: 0 + name: nonEqualAmounts + reserved: null + - id: 1 + name: issuedMismatch + reserved: null + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w +supplements: [] +types: + 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751: !List + - 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355 + - min: 0 + max: 7 + 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01: !Tuple + - 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154 + 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042: !Primitive 64 + 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb: !Tuple + - ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90 + 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd: !Array + - 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042 + - 32 + 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997 + 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73: !Enum + - name: excl + tag: 33 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: amp + tag: 38 + - name: plus + tag: 43 + - name: dash + tag: 45 + - name: dot + tag: 46 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4: !Tuple + - 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a + 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a: !Struct + - name: type + ty: b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660 + - name: digest + ty: 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd + 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7 + 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8: !Enum + - name: space + tag: 32 + - name: excl + tag: 33 + - name: quotes + tag: 34 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: percent + tag: 37 + - name: ampersand + tag: 38 + - name: apostrophe + tag: 39 + - name: bracketL + tag: 40 + - name: bracketR + tag: 41 + - name: asterisk + tag: 42 + - name: plus + tag: 43 + - name: comma + tag: 44 + - name: minus + tag: 45 + - name: dot + tag: 46 + - name: slash + tag: 47 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: colon + tag: 58 + - name: semiColon + tag: 59 + - name: less + tag: 60 + - name: equal + tag: 61 + - name: greater + tag: 62 + - name: question + tag: 63 + - name: at + tag: 64 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: sqBracketL + tag: 91 + - name: backSlash + tag: 92 + - name: sqBracketR + tag: 93 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: backtick + tag: 96 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + - name: cBracketL + tag: 123 + - name: pipe + tag: 124 + - name: cBracketR + tag: 125 + - name: tilde + tag: 126 + 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 0 + max: 65535 + 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa: !Tuple + - 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f + 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7: !Struct + - name: text + ty: 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01 + - name: media + ty: e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81 + 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f: !Primitive 8 + 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22: !Enum + - name: indivisible + tag: 0 + - name: deci + tag: 1 + - name: centi + tag: 2 + - name: milli + tag: 3 + - name: deciMilli + tag: 4 + - name: centiMilli + tag: 5 + - name: micro + tag: 6 + - name: deciMicro + tag: 7 + - name: centiMicro + tag: 8 + - name: nano + tag: 9 + - name: deciNano + tag: 10 + - name: centiNano + tag: 11 + - name: pico + tag: 12 + - name: deciPico + tag: 13 + - name: centiPico + tag: 14 + - name: femto + tag: 15 + - name: deciFemto + tag: 16 + - name: centiFemto + tag: 17 + - name: atto + tag: 18 + 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f: !Tuple + - 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2 + - 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751 + 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355: !Enum + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 1 + max: 255 + 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d: !Tuple + - c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4 + 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2: !Enum + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84: !Tuple + - 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f + b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997: !Tuple + - 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660: !Struct + - name: type + ty: 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + - name: subtype + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + - name: charset + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46: !List + - 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73 + - min: 0 + max: 63 + c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4: !Tuple + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc + caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7: !Tuple + - 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4 + ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90: !Tuple + - f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1 + - bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46 + d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01: !Struct + - name: ticker + ty: 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa + - name: name + ty: 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d + - name: details + ty: 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888 + - name: precision + ty: 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22 + d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c: !Primitive 0 + dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548: !Tuple + - 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a + e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548 + f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc: !List + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - min: 0 + max: 39 + f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1: !Enum + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78: UnicodeChar +scripts: +- isae: + - ALU + - BPDIGEST + - RGB + code: + - 11 + - 0 + - 0 + - 0 + - 208 + - 160 + - 15 + - 1 + - 7 + - 11 + - 0 + - 1 + - 0 + - 11 + - 8 + - 0 + - 0 + - 11 + - 1 + - 2 + - 0 + - 200 + - 218 + - 7 + - 1 + - 57 + - 48 + - 0 + - 209 + - 160 + - 15 + - 1 + - 7 + data: + - 0 + - 1 + - 0 + - 0 + libs: [] +attachments: {} +signatures: {} diff --git a/tests/fixtures/attack_chain.yaml b/tests/fixtures/attack_chain.yaml new file mode 100644 index 0000000..0e8040d --- /dev/null +++ b/tests/fixtures/attack_chain.yaml @@ -0,0 +1,1138 @@ +version: v2 +transfer: true +terminals: + 73f48813952cc85227ceca63d6502a87b9626f7a8055f7861f3e4de2142f8da6: + chain: liquid + data: e7db1cdbb0b180b6065453f678cd18b0e72bf9164f18063da492ea87c0b9ebf1 +genesis: + ffv: 0 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + flags: null + timestamp: 1726062101 + issuer: ssi:anonymous + testnet: true + altLayers1: [] + assetTags: + 4000: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + metadata: {} + globals: + 2000: + - 074e494154434b520e4e4941206173736574206e616d650002 + 2001: + - 09004e4941207465726d7300 + 2010: + - 9a02000000000000 + assignments: + 4000: + type: fungible + items: + - seal: + chain: liquid + data: + method: opretFirst + txid: b14a4a75c431963603604cc22eef43490a4ebfa467dfdd95268b4189469e40a3 + vout: 1 + blinding: 16661440592927853019 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null +extensions: [] +bundles: +- pubWitness: + chain: liquid + data: !tx + version: 2 + inputs: + - prevOutput: b14a4a75c431963603604cc22eef43490a4ebfa467dfdd95268b4189469e40a3:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 99999600 + scriptPubkey: 001453cbf24ae868c3a35152173c490c782ea9b6e1e6 + - value: 0 + scriptPubkey: 6a209b9c0f2079ec987c6ac75a5929e3a158dbb07830468cec5e99682123c72d22e9 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - fec9c249d0abe6afe779ab25ca1d58b7d9774e57417a3c5afff5064b44dc51a1 + - a7dd80ab148acea29c82f140b1c957b9b493113ccee7610ead8e8acd496d4154 + - 8db0f6cbb5bd7909119a9978a73cbe67c82e918dac75c8fdc6b8b987828bf1ae + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678 + knownTransitions: + 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 65535 + metadata: {} + globals: {} + inputs: + - prevOut: + op: a65598039a39a052b065251c7a846da5d3c44c259daa5af120c30c7040e2fddc + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: liquid + data: + method: opretFirst + txid: null + vout: 0 + blinding: 16734970205036440893 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: liquid + data: !tx + version: 2 + inputs: + - prevOutput: 97b4c906fafad952e7b68784d38f56dec505a719c2564743b1bebe0289c7d893:0 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 99999200 + scriptPubkey: 0014e812ba00edc55b6f1a775d06bc777967b44b9ca9 + - value: 0 + scriptPubkey: 6a2084412f08192e3f0afeac2d6395cd36b535383b97d4676d4a2b765648f2517a26 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - fce547df72ce13e5030eb3dd1157f3d69bc0a27a2d69b2db29d5567d1776c2cf + - f94839df364232e38ee05f2014122019a3ed50d8a19391922867d17c6eff4c6f + - e8de5343de750860fbeca3d7b5cafbb6f5972f1be2951f5afbc0c75ffaf1bf6f + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65 + knownTransitions: + 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678 + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: liquid + data: + method: opretFirst + txid: null + vout: 0 + blinding: 7179609303082705751 + state: + value: 616 + blinding: 2654e3553f7c17fe8ab955cc84ce02a81135c0d6ad96c776950df35812ec948b + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + - seal: + chain: liquid + data: da2ca87d91edadde873cef8ac850c9601b1a200183bbc1d5d44a44a4603d6d3b + state: + value: 50 + blinding: 58299b293f02667ff3c528b1f9b07bd66d48bda7d0e7b707e9708b266b91e9f3 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: liquid + data: !tx + version: 2 + inputs: + - prevOutput: f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc:0 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 99998800 + scriptPubkey: 00140aa0ef9fc250c3302e50e7109cf4a1edf7b35a3e + - value: 0 + scriptPubkey: 6a20ea249b07fca7ce1bb28c608ac5a4d6aa83d45580e1f23eeab6f9fe35bf04b464 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - 0e5d954e45be6e0774890ac31ab14a50d583edf7584c27f6a33a533c0b352a0b + - 671afbc968036449cc8e3d0064a6b07191220a7b131c525c9d09d462263995b4 + - ac6bc5f3d995abc937dbf2c4aa35874f191e0bd6f825a852718e4247c394bdda + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 0fe0a5da70d5feb6f69e5145a34915f1dced10074b745ad8a55cffa6c5835226 + knownTransitions: + 0fe0a5da70d5feb6f69e5145a34915f1dced10074b745ad8a55cffa6c5835226: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65 + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: liquid + data: + method: opretFirst + txid: null + vout: 0 + blinding: 7526231348918810717 + state: + value: 539 + blinding: 9ac1a0a9fc74bc2f010795f5091593cedd550ef0b80e505ff92820f1daf26c45 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + - seal: + chain: liquid + data: e7db1cdbb0b180b6065453f678cd18b0e72bf9164f18063da492ea87c0b9ebf1 + state: + value: 77 + blinding: 8b9342ab43075bcf89b1bfd77bb86ed7ee8f8ecca4d117525bb830f308306987 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +schema: + ffv: 0 + flags: null + name: NonInflatableAsset + timestamp: 1713343888 + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + metaTypes: {} + globalTypes: + 2000: + reserved: null + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + maxItems: 1 + 2001: + reserved: null + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + maxItems: 1 + 2010: + reserved: null + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + maxItems: 1 + ownedTypes: + 4000: !fungible unsigned64Bit + valencyTypes: [] + genesis: + metadata: [] + globals: + 2000: once + 2001: once + 2010: once + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 9 + extensions: {} + transitions: + 10000: + metadata: [] + globals: {} + inputs: + 4000: onceOrMore + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 0 + reserved: null +ifaces: + ? version: v1 + name: RGB20Fixed + inherits: + - rgb:ifc:Vk9c4$Ny-Fv0J6tg-pDF05CE-312oCWh-fENNuia-GYbEu18#adios-alert-never + - rgb:ifc:13N6PRwT-T68!FGY-lBwX2cm-qesgJ11-j0nQkM1-WSCJFj4#ariel-gizmo-evita + - rgb:ifc:naFrAfgG-Kfu$A!c-3L!bC$4-s1LWJQV-4Iv!62u-4B3ab8Y#mailbox-dialog-iron + - rgb:ifc:w3Lk9Mt3-gKt$n5y-TYpVGg0-IDpK0p9-sHQ!hb6-m2Qr3a0#unicorn-reward-ladder + timestamp: 1711405444 + metadata: {} + globalState: + issuedSupply: + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + required: true + multiple: false + spec: + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + required: true + multiple: false + terms: + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + required: true + multiple: false + assignments: + assetOwner: + ownedState: amount + public: false + required: true + multiple: true + valencies: {} + genesis: + modifier: abstract + metadata: [] + globals: + issuedSupply: once + spec: once + terms: once + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - issuedMismatch + transitions: + transfer: + modifier: abstract + optional: false + metadata: [] + globals: {} + inputs: + assetOwner: onceOrMore + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - nonEqualAmounts + defaultAssignment: assetOwner + extensions: {} + defaultOperation: transfer + errors: + issuedMismatch: supply specified as a global parameter doesn't match the issued supply allocated to the asset owners + nonEqualAmounts: the sum of spent assets doesn't equal to the sum of assets in outputs + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + : version: v1 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + ifaceId: rgb:ifc:$iUnO9aO-1xhqUd6-1Jm5S5!-wM3ngby-5GVEylQ-ZTAMYDk#tornado-pioneer-bucket + timestamp: 1713343888 + metadata: [] + globalState: + - id: 2000 + name: spec + reserved: null + - id: 2001 + name: terms + reserved: null + - id: 2010 + name: issuedSupply + reserved: null + assignments: + - id: 4000 + name: assetOwner + reserved: null + valencies: [] + transitions: + - id: 10000 + name: transfer + reserved: null + extensions: [] + errors: + - id: 0 + name: nonEqualAmounts + reserved: null + - id: 1 + name: issuedMismatch + reserved: null + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w +supplements: [] +types: + 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751: !List + - 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355 + - min: 0 + max: 7 + 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01: !Tuple + - 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154 + 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042: !Primitive 64 + 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb: !Tuple + - ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90 + 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd: !Array + - 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042 + - 32 + 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997 + 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73: !Enum + - name: excl + tag: 33 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: amp + tag: 38 + - name: plus + tag: 43 + - name: dash + tag: 45 + - name: dot + tag: 46 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4: !Tuple + - 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a + 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a: !Struct + - name: type + ty: b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660 + - name: digest + ty: 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd + 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7 + 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8: !Enum + - name: space + tag: 32 + - name: excl + tag: 33 + - name: quotes + tag: 34 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: percent + tag: 37 + - name: ampersand + tag: 38 + - name: apostrophe + tag: 39 + - name: bracketL + tag: 40 + - name: bracketR + tag: 41 + - name: asterisk + tag: 42 + - name: plus + tag: 43 + - name: comma + tag: 44 + - name: minus + tag: 45 + - name: dot + tag: 46 + - name: slash + tag: 47 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: colon + tag: 58 + - name: semiColon + tag: 59 + - name: less + tag: 60 + - name: equal + tag: 61 + - name: greater + tag: 62 + - name: question + tag: 63 + - name: at + tag: 64 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: sqBracketL + tag: 91 + - name: backSlash + tag: 92 + - name: sqBracketR + tag: 93 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: backtick + tag: 96 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + - name: cBracketL + tag: 123 + - name: pipe + tag: 124 + - name: cBracketR + tag: 125 + - name: tilde + tag: 126 + 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 0 + max: 65535 + 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa: !Tuple + - 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f + 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7: !Struct + - name: text + ty: 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01 + - name: media + ty: e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81 + 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f: !Primitive 8 + 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22: !Enum + - name: indivisible + tag: 0 + - name: deci + tag: 1 + - name: centi + tag: 2 + - name: milli + tag: 3 + - name: deciMilli + tag: 4 + - name: centiMilli + tag: 5 + - name: micro + tag: 6 + - name: deciMicro + tag: 7 + - name: centiMicro + tag: 8 + - name: nano + tag: 9 + - name: deciNano + tag: 10 + - name: centiNano + tag: 11 + - name: pico + tag: 12 + - name: deciPico + tag: 13 + - name: centiPico + tag: 14 + - name: femto + tag: 15 + - name: deciFemto + tag: 16 + - name: centiFemto + tag: 17 + - name: atto + tag: 18 + 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f: !Tuple + - 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2 + - 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751 + 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355: !Enum + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 1 + max: 255 + 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d: !Tuple + - c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4 + 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2: !Enum + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84: !Tuple + - 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f + b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997: !Tuple + - 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660: !Struct + - name: type + ty: 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + - name: subtype + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + - name: charset + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46: !List + - 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73 + - min: 0 + max: 63 + c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4: !Tuple + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc + caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7: !Tuple + - 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4 + ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90: !Tuple + - f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1 + - bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46 + d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01: !Struct + - name: ticker + ty: 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa + - name: name + ty: 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d + - name: details + ty: 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888 + - name: precision + ty: 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22 + d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c: !Primitive 0 + dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548: !Tuple + - 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a + e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548 + f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc: !List + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - min: 0 + max: 39 + f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1: !Enum + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78: UnicodeChar +scripts: +- isae: + - ALU + - BPDIGEST + - RGB + code: + - 11 + - 0 + - 0 + - 0 + - 208 + - 160 + - 15 + - 1 + - 7 + - 11 + - 0 + - 1 + - 0 + - 11 + - 8 + - 0 + - 0 + - 11 + - 1 + - 2 + - 0 + - 200 + - 218 + - 7 + - 1 + - 57 + - 48 + - 0 + - 209 + - 160 + - 15 + - 1 + - 7 + data: + - 0 + - 1 + - 0 + - 0 + libs: [] +attachments: {} +signatures: {} diff --git a/tests/fixtures/attack_genesis_schema_id.yaml b/tests/fixtures/attack_genesis_schema_id.yaml new file mode 100644 index 0000000..02914f5 --- /dev/null +++ b/tests/fixtures/attack_genesis_schema_id.yaml @@ -0,0 +1,1149 @@ +version: v2 +transfer: true +terminals: {} +genesis: + ffv: 0 + schemaId: rgb:sch:cJjPZfUpkOqIWhpCTqYJtFYzLfz$AB3JNxIEOJZYn28#circus-version-silence + flags: null + timestamp: 1726062412 + issuer: ssi:anonymous + testnet: true + altLayers1: [] + assetTags: + 4000: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + metadata: {} + globals: + 2000: + - 074e494154434b520e4e4941206173736574206e616d650002 + 2001: + - 09004e4941207465726d7300 + 2010: + - 9a02000000000000 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: 927329dc8751665a3a2d2c78e9d66515a4dbeb7fba859737fbbf452543781aec + vout: 1 + blinding: 11467157366413583830 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null +extensions: [] +bundles: +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: 927329dc8751665a3a2d2c78e9d66515a4dbeb7fba859737fbbf452543781aec:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 + - value: 99990600 + scriptPubkey: 00140e8ccaca10e1b6015b592d3aaee28d4168663da0 + - value: 0 + scriptPubkey: 6a20d2dbaa97fba2bddf77c722ddd973a2830911034b7b3786697b02bb233aba2133 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 4 + cofactor: 0 + path: + - 0f4ce3ec3c99c7b857be9875e4ab8fe1c011adfce58a5425c19223aff3984646 + - 09ce4bdf9481e1dfba7668c747cd9a9b65cac756876a6ba89700eaf94f68741f + - ae1f4bae9105309dbe2769aaac9d2d83680d2fab5ab3cf523451f9143713e894 + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: f9df80b1b45ecb7f2a23843f870021c7a21c9bb1c40aeb1fa5126d6e9b1297dc + knownTransitions: + f9df80b1b45ecb7f2a23843f870021c7a21c9bb1c40aeb1fa5126d6e9b1297dc: + ffv: 0 + contractId: rgb:PEtdy79N-77uzcrR-a5ubfFP-z0Ur8XV-UsGTJii-AM4!rqk + nonce: 18446744073709551615 + transitionType: 65535 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 3c4b5dcbbf4defbbb372b45ae6e6df14fcf452bf17554b064c98a200ce3eaea9 + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 1 + blinding: 11216164658922862307 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: 5abbca66698ef17ab5e5794adc5a73e5988a96235b84e943a0c4e0fd05a8ca66:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 + - value: 99971800 + scriptPubkey: 0014da062b565b2a277dd99c384bdceb37db0afbae57 + - value: 0 + scriptPubkey: 6a2015a480b1fb11bff88b859d42c84c62d4b60b07869ea0280399e4c5cb886afd47 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 4 + cofactor: 0 + path: + - b1a7a23116b6b031d7e3ecd250aeaeb105517168454e065d52fcd416f4e11eb6 + - 19655ba753410fb7e144100c0a74813242ce4831006afdda6f4e7af561787314 + - 7632914a2bbbe56601ce7aaa6bb88513e295bf8d06add06341caa52cc975519d + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: c1cf9a4e6a1c1344a361aff8db7b1066247e321c319d8194cb235e51550c47f9 + knownTransitions: + c1cf9a4e6a1c1344a361aff8db7b1066247e321c319d8194cb235e51550c47f9: + ffv: 0 + contractId: rgb:PEtdy79N-77uzcrR-a5ubfFP-z0Ur8XV-UsGTJii-AM4!rqk + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 260b5333d226fa888410a95d1e7c300bddbc36dedde9e7220a179c961bd486a4 + ty: 4000 + no: 1 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 1615717160682137474 + state: + value: 77 + blinding: de7cfaee327232d2f75de0aa9d794bbf886f67b84023a758cae51aa5e6f26f6c + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 1 + blinding: 4827724045805003310 + state: + value: 539 + blinding: 4936917819bcaaee2910a97d2ef4ddee5cc254e5a49a4e9ba25abbf07578ba59 + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: b9703e716d01de771d443c5cbf06cbba1f132c67a2b6d8c6c88bbcc0f83afe1b:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 + - value: 99981200 + scriptPubkey: 001464d4d392dcab68e59333dacfe1f6e69a3d454efc + - value: 0 + scriptPubkey: 6a20adeaf1c7dcd6adb6d0ef5a7de8df29bbd8c5c6524a6b88a2c6947f1a6ce286fa + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 4 + cofactor: 0 + path: + - 9e585d26d0e23aedc79c823947c8db2f27a81dc8387482c5c465886ab0084afb + - ded94af9a3451e37398ad93aca7fe7ec9464284f4613660abb06a469b4ff3d75 + - e3b7c02e6fa045102f7c23bfabe1975190e9993e4c786d5e1de812d8edefac47 + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 260b5333d226fa888410a95d1e7c300bddbc36dedde9e7220a179c961bd486a4 + knownTransitions: + 260b5333d226fa888410a95d1e7c300bddbc36dedde9e7220a179c961bd486a4: + ffv: 0 + contractId: rgb:PEtdy79N-77uzcrR-a5ubfFP-z0Ur8XV-UsGTJii-AM4!rqk + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: f9df80b1b45ecb7f2a23843f870021c7a21c9bb1c40aeb1fa5126d6e9b1297dc + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 11304041884603674327 + state: + value: 50 + blinding: 56caf218324fa0bd5e0ff456b21054cf53fb9ec7490928c5d1110674f24995fa + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 1 + blinding: 5070018436051936767 + state: + value: 616 + blinding: 27b38c664c2eddc1206e8a27cc6e29af2a82dfb7357555b8ad6d78098c34e884 + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null + witness: null +schema: + ffv: 0 + flags: null + name: NonInflatableAsset + timestamp: 1713343888 + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + metaTypes: {} + globalTypes: + 2000: + reserved: null + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + maxItems: 1 + 2001: + reserved: null + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + maxItems: 1 + 2010: + reserved: null + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + maxItems: 1 + ownedTypes: + 4000: !fungible unsigned64Bit + valencyTypes: [] + genesis: + metadata: [] + globals: + 2000: once + 2001: once + 2010: once + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 9 + extensions: {} + transitions: + 10000: + metadata: [] + globals: {} + inputs: + 4000: onceOrMore + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 0 + reserved: null +ifaces: + ? version: v1 + name: RGB20Fixed + inherits: + - rgb:ifc:Vk9c4$Ny-Fv0J6tg-pDF05CE-312oCWh-fENNuia-GYbEu18#adios-alert-never + - rgb:ifc:13N6PRwT-T68!FGY-lBwX2cm-qesgJ11-j0nQkM1-WSCJFj4#ariel-gizmo-evita + - rgb:ifc:naFrAfgG-Kfu$A!c-3L!bC$4-s1LWJQV-4Iv!62u-4B3ab8Y#mailbox-dialog-iron + - rgb:ifc:w3Lk9Mt3-gKt$n5y-TYpVGg0-IDpK0p9-sHQ!hb6-m2Qr3a0#unicorn-reward-ladder + timestamp: 1711405444 + metadata: {} + globalState: + issuedSupply: + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + required: true + multiple: false + spec: + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + required: true + multiple: false + terms: + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + required: true + multiple: false + assignments: + assetOwner: + ownedState: amount + public: false + required: true + multiple: true + valencies: {} + genesis: + modifier: abstract + metadata: [] + globals: + issuedSupply: once + spec: once + terms: once + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - issuedMismatch + transitions: + transfer: + modifier: abstract + optional: false + metadata: [] + globals: {} + inputs: + assetOwner: onceOrMore + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - nonEqualAmounts + defaultAssignment: assetOwner + extensions: {} + defaultOperation: transfer + errors: + issuedMismatch: supply specified as a global parameter doesn't match the issued supply allocated to the asset owners + nonEqualAmounts: the sum of spent assets doesn't equal to the sum of assets in outputs + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + : version: v1 + schemaId: rgb:sch:cJjPZfUpkOqIWhpCTqYJtFYzLfz$AB3JNxIEOJZYn28#circus-version-silence + ifaceId: rgb:ifc:$iUnO9aO-1xhqUd6-1Jm5S5!-wM3ngby-5GVEylQ-ZTAMYDk#tornado-pioneer-bucket + timestamp: 1713343888 + metadata: [] + globalState: + - id: 2000 + name: spec + reserved: null + - id: 2001 + name: terms + reserved: null + - id: 2010 + name: issuedSupply + reserved: null + assignments: + - id: 4000 + name: assetOwner + reserved: null + valencies: [] + transitions: + - id: 10000 + name: transfer + reserved: null + extensions: [] + errors: + - id: 0 + name: nonEqualAmounts + reserved: null + - id: 1 + name: issuedMismatch + reserved: null + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w +supplements: [] +types: + 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751: !List + - 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355 + - min: 0 + max: 7 + 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01: !Tuple + - 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154 + 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042: !Primitive 64 + 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb: !Tuple + - ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90 + 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd: !Array + - 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042 + - 32 + 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997 + 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73: !Enum + - name: excl + tag: 33 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: amp + tag: 38 + - name: plus + tag: 43 + - name: dash + tag: 45 + - name: dot + tag: 46 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4: !Tuple + - 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a + 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a: !Struct + - name: type + ty: b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660 + - name: digest + ty: 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd + 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7 + 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8: !Enum + - name: space + tag: 32 + - name: excl + tag: 33 + - name: quotes + tag: 34 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: percent + tag: 37 + - name: ampersand + tag: 38 + - name: apostrophe + tag: 39 + - name: bracketL + tag: 40 + - name: bracketR + tag: 41 + - name: asterisk + tag: 42 + - name: plus + tag: 43 + - name: comma + tag: 44 + - name: minus + tag: 45 + - name: dot + tag: 46 + - name: slash + tag: 47 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: colon + tag: 58 + - name: semiColon + tag: 59 + - name: less + tag: 60 + - name: equal + tag: 61 + - name: greater + tag: 62 + - name: question + tag: 63 + - name: at + tag: 64 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: sqBracketL + tag: 91 + - name: backSlash + tag: 92 + - name: sqBracketR + tag: 93 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: backtick + tag: 96 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + - name: cBracketL + tag: 123 + - name: pipe + tag: 124 + - name: cBracketR + tag: 125 + - name: tilde + tag: 126 + 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 0 + max: 65535 + 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa: !Tuple + - 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f + 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7: !Struct + - name: text + ty: 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01 + - name: media + ty: e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81 + 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f: !Primitive 8 + 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22: !Enum + - name: indivisible + tag: 0 + - name: deci + tag: 1 + - name: centi + tag: 2 + - name: milli + tag: 3 + - name: deciMilli + tag: 4 + - name: centiMilli + tag: 5 + - name: micro + tag: 6 + - name: deciMicro + tag: 7 + - name: centiMicro + tag: 8 + - name: nano + tag: 9 + - name: deciNano + tag: 10 + - name: centiNano + tag: 11 + - name: pico + tag: 12 + - name: deciPico + tag: 13 + - name: centiPico + tag: 14 + - name: femto + tag: 15 + - name: deciFemto + tag: 16 + - name: centiFemto + tag: 17 + - name: atto + tag: 18 + 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f: !Tuple + - 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2 + - 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751 + 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355: !Enum + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 1 + max: 255 + 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d: !Tuple + - c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4 + 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2: !Enum + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84: !Tuple + - 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f + b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997: !Tuple + - 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660: !Struct + - name: type + ty: 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + - name: subtype + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + - name: charset + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46: !List + - 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73 + - min: 0 + max: 63 + c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4: !Tuple + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc + caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7: !Tuple + - 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4 + ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90: !Tuple + - f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1 + - bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46 + d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01: !Struct + - name: ticker + ty: 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa + - name: name + ty: 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d + - name: details + ty: 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888 + - name: precision + ty: 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22 + d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c: !Primitive 0 + dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548: !Tuple + - 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a + e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548 + f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc: !List + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - min: 0 + max: 39 + f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1: !Enum + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78: UnicodeChar +scripts: +- isae: + - ALU + - BPDIGEST + - RGB + code: + - 11 + - 0 + - 0 + - 0 + - 208 + - 160 + - 15 + - 1 + - 7 + - 11 + - 0 + - 1 + - 0 + - 11 + - 8 + - 0 + - 0 + - 11 + - 1 + - 2 + - 0 + - 200 + - 218 + - 7 + - 1 + - 57 + - 48 + - 0 + - 209 + - 160 + - 15 + - 1 + - 7 + data: + - 0 + - 1 + - 0 + - 0 + libs: [] +attachments: {} +signatures: {} diff --git a/tests/fixtures/attack_genesis_testnet.yaml b/tests/fixtures/attack_genesis_testnet.yaml new file mode 100644 index 0000000..22d61b5 --- /dev/null +++ b/tests/fixtures/attack_genesis_testnet.yaml @@ -0,0 +1,1149 @@ +version: v2 +transfer: true +terminals: {} +genesis: + ffv: 0 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + flags: null + timestamp: 1726062412 + issuer: ssi:anonymous + testnet: false + altLayers1: [] + assetTags: + 4000: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + metadata: {} + globals: + 2000: + - 074e494154434b520e4e4941206173736574206e616d650002 + 2001: + - 09004e4941207465726d7300 + 2010: + - 9a02000000000000 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: 927329dc8751665a3a2d2c78e9d66515a4dbeb7fba859737fbbf452543781aec + vout: 1 + blinding: 11467157366413583830 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null +extensions: [] +bundles: +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: 927329dc8751665a3a2d2c78e9d66515a4dbeb7fba859737fbbf452543781aec:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 + - value: 99990600 + scriptPubkey: 00140e8ccaca10e1b6015b592d3aaee28d4168663da0 + - value: 0 + scriptPubkey: 6a20d2dbaa97fba2bddf77c722ddd973a2830911034b7b3786697b02bb233aba2133 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 4 + cofactor: 0 + path: + - 0f4ce3ec3c99c7b857be9875e4ab8fe1c011adfce58a5425c19223aff3984646 + - 09ce4bdf9481e1dfba7668c747cd9a9b65cac756876a6ba89700eaf94f68741f + - ae1f4bae9105309dbe2769aaac9d2d83680d2fab5ab3cf523451f9143713e894 + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: f9df80b1b45ecb7f2a23843f870021c7a21c9bb1c40aeb1fa5126d6e9b1297dc + knownTransitions: + f9df80b1b45ecb7f2a23843f870021c7a21c9bb1c40aeb1fa5126d6e9b1297dc: + ffv: 0 + contractId: rgb:PEtdy79N-77uzcrR-a5ubfFP-z0Ur8XV-UsGTJii-AM4!rqk + nonce: 18446744073709551615 + transitionType: 65535 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 3c4b5dcbbf4defbbb372b45ae6e6df14fcf452bf17554b064c98a200ce3eaea9 + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 1 + blinding: 11216164658922862307 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: 5abbca66698ef17ab5e5794adc5a73e5988a96235b84e943a0c4e0fd05a8ca66:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 + - value: 99971800 + scriptPubkey: 0014da062b565b2a277dd99c384bdceb37db0afbae57 + - value: 0 + scriptPubkey: 6a2015a480b1fb11bff88b859d42c84c62d4b60b07869ea0280399e4c5cb886afd47 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 4 + cofactor: 0 + path: + - b1a7a23116b6b031d7e3ecd250aeaeb105517168454e065d52fcd416f4e11eb6 + - 19655ba753410fb7e144100c0a74813242ce4831006afdda6f4e7af561787314 + - 7632914a2bbbe56601ce7aaa6bb88513e295bf8d06add06341caa52cc975519d + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: c1cf9a4e6a1c1344a361aff8db7b1066247e321c319d8194cb235e51550c47f9 + knownTransitions: + c1cf9a4e6a1c1344a361aff8db7b1066247e321c319d8194cb235e51550c47f9: + ffv: 0 + contractId: rgb:PEtdy79N-77uzcrR-a5ubfFP-z0Ur8XV-UsGTJii-AM4!rqk + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 260b5333d226fa888410a95d1e7c300bddbc36dedde9e7220a179c961bd486a4 + ty: 4000 + no: 1 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 1615717160682137474 + state: + value: 77 + blinding: de7cfaee327232d2f75de0aa9d794bbf886f67b84023a758cae51aa5e6f26f6c + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 1 + blinding: 4827724045805003310 + state: + value: 539 + blinding: 4936917819bcaaee2910a97d2ef4ddee5cc254e5a49a4e9ba25abbf07578ba59 + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: b9703e716d01de771d443c5cbf06cbba1f132c67a2b6d8c6c88bbcc0f83afe1b:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 + - value: 99981200 + scriptPubkey: 001464d4d392dcab68e59333dacfe1f6e69a3d454efc + - value: 0 + scriptPubkey: 6a20adeaf1c7dcd6adb6d0ef5a7de8df29bbd8c5c6524a6b88a2c6947f1a6ce286fa + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 4 + cofactor: 0 + path: + - 9e585d26d0e23aedc79c823947c8db2f27a81dc8387482c5c465886ab0084afb + - ded94af9a3451e37398ad93aca7fe7ec9464284f4613660abb06a469b4ff3d75 + - e3b7c02e6fa045102f7c23bfabe1975190e9993e4c786d5e1de812d8edefac47 + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 260b5333d226fa888410a95d1e7c300bddbc36dedde9e7220a179c961bd486a4 + knownTransitions: + 260b5333d226fa888410a95d1e7c300bddbc36dedde9e7220a179c961bd486a4: + ffv: 0 + contractId: rgb:PEtdy79N-77uzcrR-a5ubfFP-z0Ur8XV-UsGTJii-AM4!rqk + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: f9df80b1b45ecb7f2a23843f870021c7a21c9bb1c40aeb1fa5126d6e9b1297dc + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 11304041884603674327 + state: + value: 50 + blinding: 56caf218324fa0bd5e0ff456b21054cf53fb9ec7490928c5d1110674f24995fa + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 1 + blinding: 5070018436051936767 + state: + value: 616 + blinding: 27b38c664c2eddc1206e8a27cc6e29af2a82dfb7357555b8ad6d78098c34e884 + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null + witness: null +schema: + ffv: 0 + flags: null + name: NonInflatableAsset + timestamp: 1713343888 + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + metaTypes: {} + globalTypes: + 2000: + reserved: null + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + maxItems: 1 + 2001: + reserved: null + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + maxItems: 1 + 2010: + reserved: null + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + maxItems: 1 + ownedTypes: + 4000: !fungible unsigned64Bit + valencyTypes: [] + genesis: + metadata: [] + globals: + 2000: once + 2001: once + 2010: once + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 9 + extensions: {} + transitions: + 10000: + metadata: [] + globals: {} + inputs: + 4000: onceOrMore + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 0 + reserved: null +ifaces: + ? version: v1 + name: RGB20Fixed + inherits: + - rgb:ifc:Vk9c4$Ny-Fv0J6tg-pDF05CE-312oCWh-fENNuia-GYbEu18#adios-alert-never + - rgb:ifc:13N6PRwT-T68!FGY-lBwX2cm-qesgJ11-j0nQkM1-WSCJFj4#ariel-gizmo-evita + - rgb:ifc:naFrAfgG-Kfu$A!c-3L!bC$4-s1LWJQV-4Iv!62u-4B3ab8Y#mailbox-dialog-iron + - rgb:ifc:w3Lk9Mt3-gKt$n5y-TYpVGg0-IDpK0p9-sHQ!hb6-m2Qr3a0#unicorn-reward-ladder + timestamp: 1711405444 + metadata: {} + globalState: + issuedSupply: + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + required: true + multiple: false + spec: + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + required: true + multiple: false + terms: + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + required: true + multiple: false + assignments: + assetOwner: + ownedState: amount + public: false + required: true + multiple: true + valencies: {} + genesis: + modifier: abstract + metadata: [] + globals: + issuedSupply: once + spec: once + terms: once + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - issuedMismatch + transitions: + transfer: + modifier: abstract + optional: false + metadata: [] + globals: {} + inputs: + assetOwner: onceOrMore + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - nonEqualAmounts + defaultAssignment: assetOwner + extensions: {} + defaultOperation: transfer + errors: + issuedMismatch: supply specified as a global parameter doesn't match the issued supply allocated to the asset owners + nonEqualAmounts: the sum of spent assets doesn't equal to the sum of assets in outputs + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + : version: v1 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + ifaceId: rgb:ifc:$iUnO9aO-1xhqUd6-1Jm5S5!-wM3ngby-5GVEylQ-ZTAMYDk#tornado-pioneer-bucket + timestamp: 1713343888 + metadata: [] + globalState: + - id: 2000 + name: spec + reserved: null + - id: 2001 + name: terms + reserved: null + - id: 2010 + name: issuedSupply + reserved: null + assignments: + - id: 4000 + name: assetOwner + reserved: null + valencies: [] + transitions: + - id: 10000 + name: transfer + reserved: null + extensions: [] + errors: + - id: 0 + name: nonEqualAmounts + reserved: null + - id: 1 + name: issuedMismatch + reserved: null + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w +supplements: [] +types: + 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751: !List + - 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355 + - min: 0 + max: 7 + 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01: !Tuple + - 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154 + 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042: !Primitive 64 + 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb: !Tuple + - ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90 + 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd: !Array + - 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042 + - 32 + 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997 + 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73: !Enum + - name: excl + tag: 33 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: amp + tag: 38 + - name: plus + tag: 43 + - name: dash + tag: 45 + - name: dot + tag: 46 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4: !Tuple + - 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a + 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a: !Struct + - name: type + ty: b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660 + - name: digest + ty: 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd + 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7 + 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8: !Enum + - name: space + tag: 32 + - name: excl + tag: 33 + - name: quotes + tag: 34 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: percent + tag: 37 + - name: ampersand + tag: 38 + - name: apostrophe + tag: 39 + - name: bracketL + tag: 40 + - name: bracketR + tag: 41 + - name: asterisk + tag: 42 + - name: plus + tag: 43 + - name: comma + tag: 44 + - name: minus + tag: 45 + - name: dot + tag: 46 + - name: slash + tag: 47 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: colon + tag: 58 + - name: semiColon + tag: 59 + - name: less + tag: 60 + - name: equal + tag: 61 + - name: greater + tag: 62 + - name: question + tag: 63 + - name: at + tag: 64 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: sqBracketL + tag: 91 + - name: backSlash + tag: 92 + - name: sqBracketR + tag: 93 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: backtick + tag: 96 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + - name: cBracketL + tag: 123 + - name: pipe + tag: 124 + - name: cBracketR + tag: 125 + - name: tilde + tag: 126 + 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 0 + max: 65535 + 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa: !Tuple + - 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f + 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7: !Struct + - name: text + ty: 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01 + - name: media + ty: e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81 + 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f: !Primitive 8 + 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22: !Enum + - name: indivisible + tag: 0 + - name: deci + tag: 1 + - name: centi + tag: 2 + - name: milli + tag: 3 + - name: deciMilli + tag: 4 + - name: centiMilli + tag: 5 + - name: micro + tag: 6 + - name: deciMicro + tag: 7 + - name: centiMicro + tag: 8 + - name: nano + tag: 9 + - name: deciNano + tag: 10 + - name: centiNano + tag: 11 + - name: pico + tag: 12 + - name: deciPico + tag: 13 + - name: centiPico + tag: 14 + - name: femto + tag: 15 + - name: deciFemto + tag: 16 + - name: centiFemto + tag: 17 + - name: atto + tag: 18 + 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f: !Tuple + - 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2 + - 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751 + 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355: !Enum + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 1 + max: 255 + 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d: !Tuple + - c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4 + 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2: !Enum + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84: !Tuple + - 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f + b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997: !Tuple + - 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660: !Struct + - name: type + ty: 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + - name: subtype + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + - name: charset + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46: !List + - 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73 + - min: 0 + max: 63 + c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4: !Tuple + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc + caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7: !Tuple + - 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4 + ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90: !Tuple + - f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1 + - bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46 + d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01: !Struct + - name: ticker + ty: 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa + - name: name + ty: 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d + - name: details + ty: 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888 + - name: precision + ty: 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22 + d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c: !Primitive 0 + dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548: !Tuple + - 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a + e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548 + f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc: !List + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - min: 0 + max: 39 + f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1: !Enum + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78: UnicodeChar +scripts: +- isae: + - ALU + - BPDIGEST + - RGB + code: + - 11 + - 0 + - 0 + - 0 + - 208 + - 160 + - 15 + - 1 + - 7 + - 11 + - 0 + - 1 + - 0 + - 11 + - 8 + - 0 + - 0 + - 11 + - 1 + - 2 + - 0 + - 200 + - 218 + - 7 + - 1 + - 57 + - 48 + - 0 + - 209 + - 160 + - 15 + - 1 + - 7 + data: + - 0 + - 1 + - 0 + - 0 + libs: [] +attachments: {} +signatures: {} diff --git a/tests/fixtures/attack_resolver_error.yaml b/tests/fixtures/attack_resolver_error.yaml new file mode 100644 index 0000000..91a477e --- /dev/null +++ b/tests/fixtures/attack_resolver_error.yaml @@ -0,0 +1,1127 @@ +version: v2 +transfer: true +terminals: + 73f48813952cc85227ceca63d6502a87b9626f7a8055f7861f3e4de2142f8da6: + chain: bitcoin + data: e7db1cdbb0b180b6065453f678cd18b0e72bf9164f18063da492ea87c0b9ebf1 +genesis: + ffv: 0 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + flags: null + timestamp: 1726062101 + issuer: ssi:anonymous + testnet: true + altLayers1: [] + assetTags: + 4000: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + metadata: {} + globals: + 2000: + - 074e494154434b520e4e4941206173736574206e616d650002 + 2001: + - 09004e4941207465726d7300 + 2010: + - 9a02000000000000 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: b14a4a75c431963603604cc22eef43490a4ebfa467dfdd95268b4189469e40a3 + vout: 1 + blinding: 16661440592927853019 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null +extensions: [] +bundles: +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: b14a4a75c431963603604cc22eef43490a4ebfa467dfdd95268b4189469e40a3:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 99999600 + scriptPubkey: 001453cbf24ae868c3a35152173c490c782ea9b6e1e6 + - value: 0 + scriptPubkey: 6a209b9c0f2079ec987c6ac75a5929e3a158dbb07830468cec5e99682123c72d22e9 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - fec9c249d0abe6afe779ab25ca1d58b7d9774e57417a3c5afff5064b44dc51a1 + - a7dd80ab148acea29c82f140b1c957b9b493113ccee7610ead8e8acd496d4154 + - 8db0f6cbb5bd7909119a9978a73cbe67c82e918dac75c8fdc6b8b987828bf1ae + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678 + knownTransitions: + 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 65535 + metadata: {} + globals: {} + inputs: + - prevOut: + op: a65598039a39a052b065251c7a846da5d3c44c259daa5af120c30c7040e2fddc + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 16734970205036440893 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !txid + f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - fce547df72ce13e5030eb3dd1157f3d69bc0a27a2d69b2db29d5567d1776c2cf + - f94839df364232e38ee05f2014122019a3ed50d8a19391922867d17c6eff4c6f + - e8de5343de750860fbeca3d7b5cafbb6f5972f1be2951f5afbc0c75ffaf1bf6f + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65 + knownTransitions: + 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678 + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 7179609303082705751 + state: + value: 616 + blinding: 2654e3553f7c17fe8ab955cc84ce02a81135c0d6ad96c776950df35812ec948b + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + - seal: + chain: bitcoin + data: da2ca87d91edadde873cef8ac850c9601b1a200183bbc1d5d44a44a4603d6d3b + state: + value: 50 + blinding: 58299b293f02667ff3c528b1f9b07bd66d48bda7d0e7b707e9708b266b91e9f3 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc:0 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 99998800 + scriptPubkey: 00140aa0ef9fc250c3302e50e7109cf4a1edf7b35a3e + - value: 0 + scriptPubkey: 6a20ea249b07fca7ce1bb28c608ac5a4d6aa83d45580e1f23eeab6f9fe35bf04b464 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - 0e5d954e45be6e0774890ac31ab14a50d583edf7584c27f6a33a533c0b352a0b + - 671afbc968036449cc8e3d0064a6b07191220a7b131c525c9d09d462263995b4 + - ac6bc5f3d995abc937dbf2c4aa35874f191e0bd6f825a852718e4247c394bdda + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 0fe0a5da70d5feb6f69e5145a34915f1dced10074b745ad8a55cffa6c5835226 + knownTransitions: + 0fe0a5da70d5feb6f69e5145a34915f1dced10074b745ad8a55cffa6c5835226: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65 + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 7526231348918810717 + state: + value: 539 + blinding: 9ac1a0a9fc74bc2f010795f5091593cedd550ef0b80e505ff92820f1daf26c45 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + - seal: + chain: bitcoin + data: e7db1cdbb0b180b6065453f678cd18b0e72bf9164f18063da492ea87c0b9ebf1 + state: + value: 77 + blinding: 8b9342ab43075bcf89b1bfd77bb86ed7ee8f8ecca4d117525bb830f308306987 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +schema: + ffv: 0 + flags: null + name: NonInflatableAsset + timestamp: 1713343888 + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + metaTypes: {} + globalTypes: + 2000: + reserved: null + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + maxItems: 1 + 2001: + reserved: null + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + maxItems: 1 + 2010: + reserved: null + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + maxItems: 1 + ownedTypes: + 4000: !fungible unsigned64Bit + valencyTypes: [] + genesis: + metadata: [] + globals: + 2000: once + 2001: once + 2010: once + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 9 + extensions: {} + transitions: + 10000: + metadata: [] + globals: {} + inputs: + 4000: onceOrMore + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 0 + reserved: null +ifaces: + ? version: v1 + name: RGB20Fixed + inherits: + - rgb:ifc:Vk9c4$Ny-Fv0J6tg-pDF05CE-312oCWh-fENNuia-GYbEu18#adios-alert-never + - rgb:ifc:13N6PRwT-T68!FGY-lBwX2cm-qesgJ11-j0nQkM1-WSCJFj4#ariel-gizmo-evita + - rgb:ifc:naFrAfgG-Kfu$A!c-3L!bC$4-s1LWJQV-4Iv!62u-4B3ab8Y#mailbox-dialog-iron + - rgb:ifc:w3Lk9Mt3-gKt$n5y-TYpVGg0-IDpK0p9-sHQ!hb6-m2Qr3a0#unicorn-reward-ladder + timestamp: 1711405444 + metadata: {} + globalState: + issuedSupply: + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + required: true + multiple: false + spec: + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + required: true + multiple: false + terms: + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + required: true + multiple: false + assignments: + assetOwner: + ownedState: amount + public: false + required: true + multiple: true + valencies: {} + genesis: + modifier: abstract + metadata: [] + globals: + issuedSupply: once + spec: once + terms: once + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - issuedMismatch + transitions: + transfer: + modifier: abstract + optional: false + metadata: [] + globals: {} + inputs: + assetOwner: onceOrMore + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - nonEqualAmounts + defaultAssignment: assetOwner + extensions: {} + defaultOperation: transfer + errors: + issuedMismatch: supply specified as a global parameter doesn't match the issued supply allocated to the asset owners + nonEqualAmounts: the sum of spent assets doesn't equal to the sum of assets in outputs + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + : version: v1 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + ifaceId: rgb:ifc:$iUnO9aO-1xhqUd6-1Jm5S5!-wM3ngby-5GVEylQ-ZTAMYDk#tornado-pioneer-bucket + timestamp: 1713343888 + metadata: [] + globalState: + - id: 2000 + name: spec + reserved: null + - id: 2001 + name: terms + reserved: null + - id: 2010 + name: issuedSupply + reserved: null + assignments: + - id: 4000 + name: assetOwner + reserved: null + valencies: [] + transitions: + - id: 10000 + name: transfer + reserved: null + extensions: [] + errors: + - id: 0 + name: nonEqualAmounts + reserved: null + - id: 1 + name: issuedMismatch + reserved: null + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w +supplements: [] +types: + 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751: !List + - 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355 + - min: 0 + max: 7 + 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01: !Tuple + - 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154 + 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042: !Primitive 64 + 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb: !Tuple + - ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90 + 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd: !Array + - 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042 + - 32 + 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997 + 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73: !Enum + - name: excl + tag: 33 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: amp + tag: 38 + - name: plus + tag: 43 + - name: dash + tag: 45 + - name: dot + tag: 46 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4: !Tuple + - 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a + 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a: !Struct + - name: type + ty: b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660 + - name: digest + ty: 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd + 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7 + 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8: !Enum + - name: space + tag: 32 + - name: excl + tag: 33 + - name: quotes + tag: 34 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: percent + tag: 37 + - name: ampersand + tag: 38 + - name: apostrophe + tag: 39 + - name: bracketL + tag: 40 + - name: bracketR + tag: 41 + - name: asterisk + tag: 42 + - name: plus + tag: 43 + - name: comma + tag: 44 + - name: minus + tag: 45 + - name: dot + tag: 46 + - name: slash + tag: 47 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: colon + tag: 58 + - name: semiColon + tag: 59 + - name: less + tag: 60 + - name: equal + tag: 61 + - name: greater + tag: 62 + - name: question + tag: 63 + - name: at + tag: 64 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: sqBracketL + tag: 91 + - name: backSlash + tag: 92 + - name: sqBracketR + tag: 93 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: backtick + tag: 96 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + - name: cBracketL + tag: 123 + - name: pipe + tag: 124 + - name: cBracketR + tag: 125 + - name: tilde + tag: 126 + 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 0 + max: 65535 + 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa: !Tuple + - 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f + 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7: !Struct + - name: text + ty: 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01 + - name: media + ty: e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81 + 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f: !Primitive 8 + 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22: !Enum + - name: indivisible + tag: 0 + - name: deci + tag: 1 + - name: centi + tag: 2 + - name: milli + tag: 3 + - name: deciMilli + tag: 4 + - name: centiMilli + tag: 5 + - name: micro + tag: 6 + - name: deciMicro + tag: 7 + - name: centiMicro + tag: 8 + - name: nano + tag: 9 + - name: deciNano + tag: 10 + - name: centiNano + tag: 11 + - name: pico + tag: 12 + - name: deciPico + tag: 13 + - name: centiPico + tag: 14 + - name: femto + tag: 15 + - name: deciFemto + tag: 16 + - name: centiFemto + tag: 17 + - name: atto + tag: 18 + 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f: !Tuple + - 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2 + - 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751 + 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355: !Enum + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 1 + max: 255 + 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d: !Tuple + - c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4 + 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2: !Enum + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84: !Tuple + - 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f + b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997: !Tuple + - 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660: !Struct + - name: type + ty: 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + - name: subtype + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + - name: charset + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46: !List + - 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73 + - min: 0 + max: 63 + c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4: !Tuple + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc + caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7: !Tuple + - 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4 + ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90: !Tuple + - f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1 + - bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46 + d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01: !Struct + - name: ticker + ty: 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa + - name: name + ty: 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d + - name: details + ty: 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888 + - name: precision + ty: 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22 + d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c: !Primitive 0 + dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548: !Tuple + - 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a + e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548 + f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc: !List + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - min: 0 + max: 39 + f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1: !Enum + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78: UnicodeChar +scripts: +- isae: + - ALU + - BPDIGEST + - RGB + code: + - 11 + - 0 + - 0 + - 0 + - 208 + - 160 + - 15 + - 1 + - 7 + - 11 + - 0 + - 1 + - 0 + - 11 + - 8 + - 0 + - 0 + - 11 + - 1 + - 2 + - 0 + - 200 + - 218 + - 7 + - 1 + - 57 + - 48 + - 0 + - 209 + - 160 + - 15 + - 1 + - 7 + data: + - 0 + - 1 + - 0 + - 0 + libs: [] +attachments: {} +signatures: {} diff --git a/tests/fixtures/bc:222f1a35bb96a02831930dcdd02e46f46daca1fdd7199dd043e04c7841b2ff40.yaml b/tests/fixtures/bc:222f1a35bb96a02831930dcdd02e46f46daca1fdd7199dd043e04c7841b2ff40.yaml new file mode 100644 index 0000000..fc6b7c9 --- /dev/null +++ b/tests/fixtures/bc:222f1a35bb96a02831930dcdd02e46f46daca1fdd7199dd043e04c7841b2ff40.yaml @@ -0,0 +1,16 @@ +version: 2 +inputs: +- prevOutput: 5abbca66698ef17ab5e5794adc5a73e5988a96235b84e943a0c4e0fd05a8ca66:1 + sigScript: '' + sequence: 0 + witness: + - 3045022100b960ed668be891939bf732b2627974b5cb264f9c47e9189a3dc8f6310615263702206015bf71d0dda7ac3fc6bbee6ef9e69ed756e21037e002cda2a3b264aa97645201 + - 03f749a602ca3e1c99feb165771072569a4b11d6a271c0baac33bf61cbba00f26c +outputs: +- value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 +- value: 99971800 + scriptPubkey: 0014da062b565b2a277dd99c384bdceb37db0afbae57 +- value: 0 + scriptPubkey: 6a2015a480b1fb11bff88b859d42c84c62d4b60b07869ea0280399e4c5cb886afd47 +lockTime: 0 diff --git a/tests/fixtures/bc:3b9c8836e09cdf08d225b8e9f7862e23a6ede1276c12ccd426c530cd531e4cfa.yaml b/tests/fixtures/bc:3b9c8836e09cdf08d225b8e9f7862e23a6ede1276c12ccd426c530cd531e4cfa.yaml new file mode 100644 index 0000000..c60cefa --- /dev/null +++ b/tests/fixtures/bc:3b9c8836e09cdf08d225b8e9f7862e23a6ede1276c12ccd426c530cd531e4cfa.yaml @@ -0,0 +1,14 @@ +version: 2 +inputs: +- prevOutput: f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc:0 + sigScript: '' + sequence: 0 + witness: + - 304402201ba399069bbdaa8c2c7a35395ce0dce29377380842309f39915c978d98285cf7022046c6a4fc30eeae3810a8e800a07874d856bd0d8c5bb40a7d4c914a9648dcaeb901 + - 03d92df9ca14bb141bae2c0f16c906ef858a9c07496e80e702f10f9ad79b1af64e +outputs: +- value: 99998800 + scriptPubkey: 00140aa0ef9fc250c3302e50e7109cf4a1edf7b35a3e +- value: 0 + scriptPubkey: 6a20ea249b07fca7ce1bb28c608ac5a4d6aa83d45580e1f23eeab6f9fe35bf04b464 +lockTime: 0 diff --git a/tests/fixtures/bc:5abbca66698ef17ab5e5794adc5a73e5988a96235b84e943a0c4e0fd05a8ca66.yaml b/tests/fixtures/bc:5abbca66698ef17ab5e5794adc5a73e5988a96235b84e943a0c4e0fd05a8ca66.yaml new file mode 100644 index 0000000..9f930a9 --- /dev/null +++ b/tests/fixtures/bc:5abbca66698ef17ab5e5794adc5a73e5988a96235b84e943a0c4e0fd05a8ca66.yaml @@ -0,0 +1,16 @@ +version: 2 +inputs: +- prevOutput: b9703e716d01de771d443c5cbf06cbba1f132c67a2b6d8c6c88bbcc0f83afe1b:1 + sigScript: '' + sequence: 0 + witness: + - 304402206e4b9d77112d55b29990c270a21cc1d50705fa33551f48153a5b791cb190a71002207437ae9a34310dd2ba701838358a99dad46fec4a16aed6a3637429ff95e9bf1201 + - 0229723f2de8d3c1422c60fffff6540dd75c4a7196ee2b30bf50f71dc76bc8bace +outputs: +- value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 +- value: 99981200 + scriptPubkey: 001464d4d392dcab68e59333dacfe1f6e69a3d454efc +- value: 0 + scriptPubkey: 6a20adeaf1c7dcd6adb6d0ef5a7de8df29bbd8c5c6524a6b88a2c6947f1a6ce286fa +lockTime: 0 diff --git a/tests/fixtures/bc:97b4c906fafad952e7b68784d38f56dec505a719c2564743b1bebe0289c7d893.yaml b/tests/fixtures/bc:97b4c906fafad952e7b68784d38f56dec505a719c2564743b1bebe0289c7d893.yaml new file mode 100644 index 0000000..13c11c8 --- /dev/null +++ b/tests/fixtures/bc:97b4c906fafad952e7b68784d38f56dec505a719c2564743b1bebe0289c7d893.yaml @@ -0,0 +1,14 @@ +version: 2 +inputs: +- prevOutput: b14a4a75c431963603604cc22eef43490a4ebfa467dfdd95268b4189469e40a3:1 + sigScript: '' + sequence: 0 + witness: + - 3045022100ca4da2497cc2768da10e7ca636463b506853f1617b2b6fcef70e860b67e6ab5f02200e45ce593356b3b6b53addbcf42b62cb17ff2d3e012a2871141d65f6846362f401 + - 022e2d5314f1f5c41e85152964802a503e443b9d2e99ffdd96272573a13e7ffc10 +outputs: +- value: 99999600 + scriptPubkey: 001453cbf24ae868c3a35152173c490c782ea9b6e1e6 +- value: 0 + scriptPubkey: 6a209b9c0f2079ec987c6ac75a5929e3a158dbb07830468cec5e99682123c72d22e9 +lockTime: 0 diff --git a/tests/fixtures/bc:b9703e716d01de771d443c5cbf06cbba1f132c67a2b6d8c6c88bbcc0f83afe1b.yaml b/tests/fixtures/bc:b9703e716d01de771d443c5cbf06cbba1f132c67a2b6d8c6c88bbcc0f83afe1b.yaml new file mode 100644 index 0000000..84d5af5 --- /dev/null +++ b/tests/fixtures/bc:b9703e716d01de771d443c5cbf06cbba1f132c67a2b6d8c6c88bbcc0f83afe1b.yaml @@ -0,0 +1,16 @@ +version: 2 +inputs: +- prevOutput: 927329dc8751665a3a2d2c78e9d66515a4dbeb7fba859737fbbf452543781aec:1 + sigScript: '' + sequence: 0 + witness: + - 304402207f3376b01ba9a9becc3b41d4eae472bad6785c261850e5489387a3724ab50ccc02207e9dcf0cdc7053b1349b48c9febf432b5cdbecb05df130b3f62d9943f83eded401 + - 020bf146a69df947856f1991d7e77d6b173942f5a41b11db9c9c521ed7a15b9aed +outputs: +- value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 +- value: 99990600 + scriptPubkey: 00140e8ccaca10e1b6015b592d3aaee28d4168663da0 +- value: 0 + scriptPubkey: 6a20d2dbaa97fba2bddf77c722ddd973a2830911034b7b3786697b02bb233aba2133 +lockTime: 0 diff --git a/tests/fixtures/bc:f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc.yaml b/tests/fixtures/bc:f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc.yaml new file mode 100644 index 0000000..345804b --- /dev/null +++ b/tests/fixtures/bc:f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc.yaml @@ -0,0 +1,14 @@ +version: 2 +inputs: +- prevOutput: 97b4c906fafad952e7b68784d38f56dec505a719c2564743b1bebe0289c7d893:0 + sigScript: '' + sequence: 0 + witness: + - 3044022023caad2c26d329ba84be13acb816a112e47498bb54ab3501073f12b21a6bd5890220588b3681b1e592ea4e825caa9cbfe644f0e18e1cd90f50d5c63e6230739dee6c01 + - 025b1441d5c3d76181eb4d972057fb24aa5f8e0184c0235085fcdb34a912ce922a +outputs: +- value: 99999200 + scriptPubkey: 0014e812ba00edc55b6f1a775d06bc777967b44b9ca9 +- value: 0 + scriptPubkey: 6a2084412f08192e3f0afeac2d6395cd36b535383b97d4676d4a2b765648f2517a26 +lockTime: 0 diff --git a/tests/fixtures/consignment_A.yaml b/tests/fixtures/consignment_A.yaml new file mode 100644 index 0000000..4344db9 --- /dev/null +++ b/tests/fixtures/consignment_A.yaml @@ -0,0 +1,1138 @@ +version: v2 +transfer: true +terminals: + 73f48813952cc85227ceca63d6502a87b9626f7a8055f7861f3e4de2142f8da6: + chain: bitcoin + data: e7db1cdbb0b180b6065453f678cd18b0e72bf9164f18063da492ea87c0b9ebf1 +genesis: + ffv: 0 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + flags: null + timestamp: 1726062101 + issuer: ssi:anonymous + testnet: true + altLayers1: [] + assetTags: + 4000: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + metadata: {} + globals: + 2000: + - 074e494154434b520e4e4941206173736574206e616d650002 + 2001: + - 09004e4941207465726d7300 + 2010: + - 9a02000000000000 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: b14a4a75c431963603604cc22eef43490a4ebfa467dfdd95268b4189469e40a3 + vout: 1 + blinding: 16661440592927853019 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null +extensions: [] +bundles: +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: b14a4a75c431963603604cc22eef43490a4ebfa467dfdd95268b4189469e40a3:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 99999600 + scriptPubkey: 001453cbf24ae868c3a35152173c490c782ea9b6e1e6 + - value: 0 + scriptPubkey: 6a209b9c0f2079ec987c6ac75a5929e3a158dbb07830468cec5e99682123c72d22e9 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - fec9c249d0abe6afe779ab25ca1d58b7d9774e57417a3c5afff5064b44dc51a1 + - a7dd80ab148acea29c82f140b1c957b9b493113ccee7610ead8e8acd496d4154 + - 8db0f6cbb5bd7909119a9978a73cbe67c82e918dac75c8fdc6b8b987828bf1ae + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678 + knownTransitions: + 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 65535 + metadata: {} + globals: {} + inputs: + - prevOut: + op: a65598039a39a052b065251c7a846da5d3c44c259daa5af120c30c7040e2fddc + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 16734970205036440893 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: 97b4c906fafad952e7b68784d38f56dec505a719c2564743b1bebe0289c7d893:0 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 99999200 + scriptPubkey: 0014e812ba00edc55b6f1a775d06bc777967b44b9ca9 + - value: 0 + scriptPubkey: 6a2084412f08192e3f0afeac2d6395cd36b535383b97d4676d4a2b765648f2517a26 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - fce547df72ce13e5030eb3dd1157f3d69bc0a27a2d69b2db29d5567d1776c2cf + - f94839df364232e38ee05f2014122019a3ed50d8a19391922867d17c6eff4c6f + - e8de5343de750860fbeca3d7b5cafbb6f5972f1be2951f5afbc0c75ffaf1bf6f + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65 + knownTransitions: + 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 0fd16bab2752c30fc30c19e634e8e64e973006e11c7fde4c19e54601db1ce678 + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 7179609303082705751 + state: + value: 616 + blinding: 2654e3553f7c17fe8ab955cc84ce02a81135c0d6ad96c776950df35812ec948b + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + - seal: + chain: bitcoin + data: da2ca87d91edadde873cef8ac850c9601b1a200183bbc1d5d44a44a4603d6d3b + state: + value: 50 + blinding: 58299b293f02667ff3c528b1f9b07bd66d48bda7d0e7b707e9708b266b91e9f3 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc:0 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 99998800 + scriptPubkey: 00140aa0ef9fc250c3302e50e7109cf4a1edf7b35a3e + - value: 0 + scriptPubkey: 6a20ea249b07fca7ce1bb28c608ac5a4d6aa83d45580e1f23eeab6f9fe35bf04b464 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 6 + cofactor: 0 + path: + - 0e5d954e45be6e0774890ac31ab14a50d583edf7584c27f6a33a533c0b352a0b + - 671afbc968036449cc8e3d0064a6b07191220a7b131c525c9d09d462263995b4 + - ac6bc5f3d995abc937dbf2c4aa35874f191e0bd6f825a852718e4247c394bdda + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 0fe0a5da70d5feb6f69e5145a34915f1dced10074b745ad8a55cffa6c5835226 + knownTransitions: + 0fe0a5da70d5feb6f69e5145a34915f1dced10074b745ad8a55cffa6c5835226: + ffv: 0 + contractId: rgb:plWYA5o5-oFKwZSU-ceoRtpd-PETCWdq-lrxIMMM-cEDi$dw + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 399f7ac26e4960e26a14d9fa0afed7c40fcd4ffa6970e0c0585cba0a8141fa65 + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 7526231348918810717 + state: + value: 539 + blinding: 9ac1a0a9fc74bc2f010795f5091593cedd550ef0b80e505ff92820f1daf26c45 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + - seal: + chain: bitcoin + data: e7db1cdbb0b180b6065453f678cd18b0e72bf9164f18063da492ea87c0b9ebf1 + state: + value: 77 + blinding: 8b9342ab43075bcf89b1bfd77bb86ed7ee8f8ecca4d117525bb830f308306987 + tag: 4a63dc81fc9cb4699d6ed0b0095a204d87a9ebfe718fc51cee551f7fc4188861 + lock: null + valencies: [] + validator: null + witness: null +schema: + ffv: 0 + flags: null + name: NonInflatableAsset + timestamp: 1713343888 + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + metaTypes: {} + globalTypes: + 2000: + reserved: null + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + maxItems: 1 + 2001: + reserved: null + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + maxItems: 1 + 2010: + reserved: null + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + maxItems: 1 + ownedTypes: + 4000: !fungible unsigned64Bit + valencyTypes: [] + genesis: + metadata: [] + globals: + 2000: once + 2001: once + 2010: once + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 9 + extensions: {} + transitions: + 10000: + metadata: [] + globals: {} + inputs: + 4000: onceOrMore + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 0 + reserved: null +ifaces: + ? version: v1 + name: RGB20Fixed + inherits: + - rgb:ifc:Vk9c4$Ny-Fv0J6tg-pDF05CE-312oCWh-fENNuia-GYbEu18#adios-alert-never + - rgb:ifc:13N6PRwT-T68!FGY-lBwX2cm-qesgJ11-j0nQkM1-WSCJFj4#ariel-gizmo-evita + - rgb:ifc:naFrAfgG-Kfu$A!c-3L!bC$4-s1LWJQV-4Iv!62u-4B3ab8Y#mailbox-dialog-iron + - rgb:ifc:w3Lk9Mt3-gKt$n5y-TYpVGg0-IDpK0p9-sHQ!hb6-m2Qr3a0#unicorn-reward-ladder + timestamp: 1711405444 + metadata: {} + globalState: + issuedSupply: + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + required: true + multiple: false + spec: + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + required: true + multiple: false + terms: + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + required: true + multiple: false + assignments: + assetOwner: + ownedState: amount + public: false + required: true + multiple: true + valencies: {} + genesis: + modifier: abstract + metadata: [] + globals: + issuedSupply: once + spec: once + terms: once + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - issuedMismatch + transitions: + transfer: + modifier: abstract + optional: false + metadata: [] + globals: {} + inputs: + assetOwner: onceOrMore + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - nonEqualAmounts + defaultAssignment: assetOwner + extensions: {} + defaultOperation: transfer + errors: + issuedMismatch: supply specified as a global parameter doesn't match the issued supply allocated to the asset owners + nonEqualAmounts: the sum of spent assets doesn't equal to the sum of assets in outputs + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + : version: v1 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + ifaceId: rgb:ifc:$iUnO9aO-1xhqUd6-1Jm5S5!-wM3ngby-5GVEylQ-ZTAMYDk#tornado-pioneer-bucket + timestamp: 1713343888 + metadata: [] + globalState: + - id: 2000 + name: spec + reserved: null + - id: 2001 + name: terms + reserved: null + - id: 2010 + name: issuedSupply + reserved: null + assignments: + - id: 4000 + name: assetOwner + reserved: null + valencies: [] + transitions: + - id: 10000 + name: transfer + reserved: null + extensions: [] + errors: + - id: 0 + name: nonEqualAmounts + reserved: null + - id: 1 + name: issuedMismatch + reserved: null + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w +supplements: [] +types: + 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751: !List + - 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355 + - min: 0 + max: 7 + 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01: !Tuple + - 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154 + 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042: !Primitive 64 + 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb: !Tuple + - ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90 + 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd: !Array + - 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042 + - 32 + 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997 + 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73: !Enum + - name: excl + tag: 33 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: amp + tag: 38 + - name: plus + tag: 43 + - name: dash + tag: 45 + - name: dot + tag: 46 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4: !Tuple + - 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a + 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a: !Struct + - name: type + ty: b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660 + - name: digest + ty: 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd + 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7 + 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8: !Enum + - name: space + tag: 32 + - name: excl + tag: 33 + - name: quotes + tag: 34 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: percent + tag: 37 + - name: ampersand + tag: 38 + - name: apostrophe + tag: 39 + - name: bracketL + tag: 40 + - name: bracketR + tag: 41 + - name: asterisk + tag: 42 + - name: plus + tag: 43 + - name: comma + tag: 44 + - name: minus + tag: 45 + - name: dot + tag: 46 + - name: slash + tag: 47 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: colon + tag: 58 + - name: semiColon + tag: 59 + - name: less + tag: 60 + - name: equal + tag: 61 + - name: greater + tag: 62 + - name: question + tag: 63 + - name: at + tag: 64 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: sqBracketL + tag: 91 + - name: backSlash + tag: 92 + - name: sqBracketR + tag: 93 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: backtick + tag: 96 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + - name: cBracketL + tag: 123 + - name: pipe + tag: 124 + - name: cBracketR + tag: 125 + - name: tilde + tag: 126 + 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 0 + max: 65535 + 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa: !Tuple + - 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f + 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7: !Struct + - name: text + ty: 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01 + - name: media + ty: e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81 + 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f: !Primitive 8 + 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22: !Enum + - name: indivisible + tag: 0 + - name: deci + tag: 1 + - name: centi + tag: 2 + - name: milli + tag: 3 + - name: deciMilli + tag: 4 + - name: centiMilli + tag: 5 + - name: micro + tag: 6 + - name: deciMicro + tag: 7 + - name: centiMicro + tag: 8 + - name: nano + tag: 9 + - name: deciNano + tag: 10 + - name: centiNano + tag: 11 + - name: pico + tag: 12 + - name: deciPico + tag: 13 + - name: centiPico + tag: 14 + - name: femto + tag: 15 + - name: deciFemto + tag: 16 + - name: centiFemto + tag: 17 + - name: atto + tag: 18 + 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f: !Tuple + - 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2 + - 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751 + 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355: !Enum + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 1 + max: 255 + 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d: !Tuple + - c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4 + 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2: !Enum + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84: !Tuple + - 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f + b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997: !Tuple + - 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660: !Struct + - name: type + ty: 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + - name: subtype + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + - name: charset + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46: !List + - 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73 + - min: 0 + max: 63 + c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4: !Tuple + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc + caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7: !Tuple + - 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4 + ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90: !Tuple + - f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1 + - bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46 + d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01: !Struct + - name: ticker + ty: 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa + - name: name + ty: 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d + - name: details + ty: 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888 + - name: precision + ty: 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22 + d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c: !Primitive 0 + dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548: !Tuple + - 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a + e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548 + f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc: !List + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - min: 0 + max: 39 + f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1: !Enum + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78: UnicodeChar +scripts: +- isae: + - ALU + - BPDIGEST + - RGB + code: + - 11 + - 0 + - 0 + - 0 + - 208 + - 160 + - 15 + - 1 + - 7 + - 11 + - 0 + - 1 + - 0 + - 11 + - 8 + - 0 + - 0 + - 11 + - 1 + - 2 + - 0 + - 200 + - 218 + - 7 + - 1 + - 57 + - 48 + - 0 + - 209 + - 160 + - 15 + - 1 + - 7 + data: + - 0 + - 1 + - 0 + - 0 + libs: [] +attachments: {} +signatures: {} diff --git a/tests/fixtures/consignment_B.yaml b/tests/fixtures/consignment_B.yaml new file mode 100644 index 0000000..b1981ed --- /dev/null +++ b/tests/fixtures/consignment_B.yaml @@ -0,0 +1,1149 @@ +version: v2 +transfer: true +terminals: {} +genesis: + ffv: 0 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + flags: null + timestamp: 1726062412 + issuer: ssi:anonymous + testnet: true + altLayers1: [] + assetTags: + 4000: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + metadata: {} + globals: + 2000: + - 074e494154434b520e4e4941206173736574206e616d650002 + 2001: + - 09004e4941207465726d7300 + 2010: + - 9a02000000000000 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: 927329dc8751665a3a2d2c78e9d66515a4dbeb7fba859737fbbf452543781aec + vout: 1 + blinding: 11467157366413583830 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null +extensions: [] +bundles: +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: 927329dc8751665a3a2d2c78e9d66515a4dbeb7fba859737fbbf452543781aec:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 + - value: 99990600 + scriptPubkey: 00140e8ccaca10e1b6015b592d3aaee28d4168663da0 + - value: 0 + scriptPubkey: 6a20d2dbaa97fba2bddf77c722ddd973a2830911034b7b3786697b02bb233aba2133 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 4 + cofactor: 0 + path: + - 0f4ce3ec3c99c7b857be9875e4ab8fe1c011adfce58a5425c19223aff3984646 + - 09ce4bdf9481e1dfba7668c747cd9a9b65cac756876a6ba89700eaf94f68741f + - ae1f4bae9105309dbe2769aaac9d2d83680d2fab5ab3cf523451f9143713e894 + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: f9df80b1b45ecb7f2a23843f870021c7a21c9bb1c40aeb1fa5126d6e9b1297dc + knownTransitions: + f9df80b1b45ecb7f2a23843f870021c7a21c9bb1c40aeb1fa5126d6e9b1297dc: + ffv: 0 + contractId: rgb:PEtdy79N-77uzcrR-a5ubfFP-z0Ur8XV-UsGTJii-AM4!rqk + nonce: 18446744073709551615 + transitionType: 65535 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 3c4b5dcbbf4defbbb372b45ae6e6df14fcf452bf17554b064c98a200ce3eaea9 + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 1 + blinding: 11216164658922862307 + state: + value: 666 + blinding: 7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: 5abbca66698ef17ab5e5794adc5a73e5988a96235b84e943a0c4e0fd05a8ca66:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 + - value: 99971800 + scriptPubkey: 0014da062b565b2a277dd99c384bdceb37db0afbae57 + - value: 0 + scriptPubkey: 6a2015a480b1fb11bff88b859d42c84c62d4b60b07869ea0280399e4c5cb886afd47 + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 4 + cofactor: 0 + path: + - b1a7a23116b6b031d7e3ecd250aeaeb105517168454e065d52fcd416f4e11eb6 + - 19655ba753410fb7e144100c0a74813242ce4831006afdda6f4e7af561787314 + - 7632914a2bbbe56601ce7aaa6bb88513e295bf8d06add06341caa52cc975519d + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: c1cf9a4e6a1c1344a361aff8db7b1066247e321c319d8194cb235e51550c47f9 + knownTransitions: + c1cf9a4e6a1c1344a361aff8db7b1066247e321c319d8194cb235e51550c47f9: + ffv: 0 + contractId: rgb:PEtdy79N-77uzcrR-a5ubfFP-z0Ur8XV-UsGTJii-AM4!rqk + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: 260b5333d226fa888410a95d1e7c300bddbc36dedde9e7220a179c961bd486a4 + ty: 4000 + no: 1 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 1615717160682137474 + state: + value: 77 + blinding: de7cfaee327232d2f75de0aa9d794bbf886f67b84023a758cae51aa5e6f26f6c + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 1 + blinding: 4827724045805003310 + state: + value: 539 + blinding: 4936917819bcaaee2910a97d2ef4ddee5cc254e5a49a4e9ba25abbf07578ba59 + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null + witness: null +- pubWitness: + chain: bitcoin + data: !tx + version: 2 + inputs: + - prevOutput: b9703e716d01de771d443c5cbf06cbba1f132c67a2b6d8c6c88bbcc0f83afe1b:1 + sigScript: '' + sequence: 0 + witness: [] + outputs: + - value: 9000 + scriptPubkey: 0014dcede11b2e90b807b7e03b08a0b8a12522402426 + - value: 99981200 + scriptPubkey: 001464d4d392dcab68e59333dacfe1f6e69a3d454efc + - value: 0 + scriptPubkey: 6a20adeaf1c7dcd6adb6d0ef5a7de8df29bbd8c5c6524a6b88a2c6947f1a6ce286fa + lockTime: 0 + anchoredBundles: !opret + - mpcProof: + pos: 4 + cofactor: 0 + path: + - 9e585d26d0e23aedc79c823947c8db2f27a81dc8387482c5c465886ab0084afb + - ded94af9a3451e37398ad93aca7fe7ec9464284f4613660abb06a469b4ff3d75 + - e3b7c02e6fa045102f7c23bfabe1975190e9993e4c786d5e1de812d8edefac47 + dbcProof: null + method: opretFirst + - closeMethod: opretFirst + inputMap: + 0: 260b5333d226fa888410a95d1e7c300bddbc36dedde9e7220a179c961bd486a4 + knownTransitions: + 260b5333d226fa888410a95d1e7c300bddbc36dedde9e7220a179c961bd486a4: + ffv: 0 + contractId: rgb:PEtdy79N-77uzcrR-a5ubfFP-z0Ur8XV-UsGTJii-AM4!rqk + nonce: 18446744073709551615 + transitionType: 10000 + metadata: {} + globals: {} + inputs: + - prevOut: + op: f9df80b1b45ecb7f2a23843f870021c7a21c9bb1c40aeb1fa5126d6e9b1297dc + ty: 4000 + no: 0 + assignments: + 4000: + type: fungible + items: + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 0 + blinding: 11304041884603674327 + state: + value: 50 + blinding: 56caf218324fa0bd5e0ff456b21054cf53fb9ec7490928c5d1110674f24995fa + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + - seal: + chain: bitcoin + data: + method: opretFirst + txid: null + vout: 1 + blinding: 5070018436051936767 + state: + value: 616 + blinding: 27b38c664c2eddc1206e8a27cc6e29af2a82dfb7357555b8ad6d78098c34e884 + tag: b2ec21ddd80ef5a395c7c197eaaec072132aac7b6d26b65c4e2cded387500faa + lock: null + valencies: [] + validator: null + witness: null +schema: + ffv: 0 + flags: null + name: NonInflatableAsset + timestamp: 1713343888 + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + metaTypes: {} + globalTypes: + 2000: + reserved: null + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + maxItems: 1 + 2001: + reserved: null + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + maxItems: 1 + 2010: + reserved: null + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + maxItems: 1 + ownedTypes: + 4000: !fungible unsigned64Bit + valencyTypes: [] + genesis: + metadata: [] + globals: + 2000: once + 2001: once + 2010: once + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 9 + extensions: {} + transitions: + 10000: + metadata: [] + globals: {} + inputs: + 4000: onceOrMore + assignments: + 4000: onceOrMore + valencies: [] + validator: + lib: abf099d28bed50df5e065715327f3a9b329f777cb0b9fefff634c193a03cb626 + pos: 0 + reserved: null +ifaces: + ? version: v1 + name: RGB20Fixed + inherits: + - rgb:ifc:Vk9c4$Ny-Fv0J6tg-pDF05CE-312oCWh-fENNuia-GYbEu18#adios-alert-never + - rgb:ifc:13N6PRwT-T68!FGY-lBwX2cm-qesgJ11-j0nQkM1-WSCJFj4#ariel-gizmo-evita + - rgb:ifc:naFrAfgG-Kfu$A!c-3L!bC$4-s1LWJQV-4Iv!62u-4B3ab8Y#mailbox-dialog-iron + - rgb:ifc:w3Lk9Mt3-gKt$n5y-TYpVGg0-IDpK0p9-sHQ!hb6-m2Qr3a0#unicorn-reward-ladder + timestamp: 1711405444 + metadata: {} + globalState: + issuedSupply: + semId: 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84 + required: true + multiple: false + spec: + semId: d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01 + required: true + multiple: false + terms: + semId: 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7 + required: true + multiple: false + assignments: + assetOwner: + ownedState: amount + public: false + required: true + multiple: true + valencies: {} + genesis: + modifier: abstract + metadata: [] + globals: + issuedSupply: once + spec: once + terms: once + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - issuedMismatch + transitions: + transfer: + modifier: abstract + optional: false + metadata: [] + globals: {} + inputs: + assetOwner: onceOrMore + assignments: + assetOwner: onceOrMore + valencies: [] + errors: + - nonEqualAmounts + defaultAssignment: assetOwner + extensions: {} + defaultOperation: transfer + errors: + issuedMismatch: supply specified as a global parameter doesn't match the issued supply allocated to the asset owners + nonEqualAmounts: the sum of spent assets doesn't equal to the sum of assets in outputs + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w + : version: v1 + schemaId: rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana + ifaceId: rgb:ifc:$iUnO9aO-1xhqUd6-1Jm5S5!-wM3ngby-5GVEylQ-ZTAMYDk#tornado-pioneer-bucket + timestamp: 1713343888 + metadata: [] + globalState: + - id: 2000 + name: spec + reserved: null + - id: 2001 + name: terms + reserved: null + - id: 2010 + name: issuedSupply + reserved: null + assignments: + - id: 4000 + name: assetOwner + reserved: null + valencies: [] + transitions: + - id: 10000 + name: transfer + reserved: null + extensions: [] + errors: + - id: 0 + name: nonEqualAmounts + reserved: null + - id: 1 + name: issuedMismatch + reserved: null + developer: ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w +supplements: [] +types: + 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751: !List + - 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355 + - min: 0 + max: 7 + 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01: !Tuple + - 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154 + 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042: !Primitive 64 + 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb: !Tuple + - ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90 + 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd: !Array + - 1cabbfc3d826c0bfd1e9770a889efacc8b6716ad014a3eec10b6591530229042 + - 32 + 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997 + 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73: !Enum + - name: excl + tag: 33 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: amp + tag: 38 + - name: plus + tag: 43 + - name: dash + tag: 45 + - name: dot + tag: 46 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4: !Tuple + - 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a + 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a: !Struct + - name: type + ty: b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660 + - name: digest + ty: 2a5baaac5089ff098d150b482cfed8bcd01a91c0d7b45d32216ed576ab71ebdd + 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7 + 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8: !Enum + - name: space + tag: 32 + - name: excl + tag: 33 + - name: quotes + tag: 34 + - name: hash + tag: 35 + - name: dollar + tag: 36 + - name: percent + tag: 37 + - name: ampersand + tag: 38 + - name: apostrophe + tag: 39 + - name: bracketL + tag: 40 + - name: bracketR + tag: 41 + - name: asterisk + tag: 42 + - name: plus + tag: 43 + - name: comma + tag: 44 + - name: minus + tag: 45 + - name: dot + tag: 46 + - name: slash + tag: 47 + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: colon + tag: 58 + - name: semiColon + tag: 59 + - name: less + tag: 60 + - name: equal + tag: 61 + - name: greater + tag: 62 + - name: question + tag: 63 + - name: at + tag: 64 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: sqBracketL + tag: 91 + - name: backSlash + tag: 92 + - name: sqBracketR + tag: 93 + - name: caret + tag: 94 + - name: lodash + tag: 95 + - name: backtick + tag: 96 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + - name: cBracketL + tag: 123 + - name: pipe + tag: 124 + - name: cBracketR + tag: 125 + - name: tilde + tag: 126 + 560d96f7a47924b2c3df040e6463398fd65fd591652c294342bfa5f939155154: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 0 + max: 65535 + 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa: !Tuple + - 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f + 5b8bc7543832054a1d22be94226be7538b133a26881cba4613027878e05c6cf7: !Struct + - name: text + ty: 18cb946f1293cf180e9d78dcc65bc59b472ffffeadfbf58db198cc8328f64b01 + - name: media + ty: e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81 + 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f: !Primitive 8 + 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22: !Enum + - name: indivisible + tag: 0 + - name: deci + tag: 1 + - name: centi + tag: 2 + - name: milli + tag: 3 + - name: deciMilli + tag: 4 + - name: centiMilli + tag: 5 + - name: micro + tag: 6 + - name: deciMicro + tag: 7 + - name: centiMicro + tag: 8 + - name: nano + tag: 9 + - name: deciNano + tag: 10 + - name: centiNano + tag: 11 + - name: pico + tag: 12 + - name: deciPico + tag: 13 + - name: centiPico + tag: 14 + - name: femto + tag: 15 + - name: deciFemto + tag: 16 + - name: centiFemto + tag: 17 + - name: atto + tag: 18 + 5e5ec8924f73cd72c4225c96ab47796658ef1b729ca306e260bca42b25891d0f: !Tuple + - 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2 + - 0af65fd62581de85cbd14e23e2db9a92bbef8b7974ffe1b50c4c74db8f86e751 + 5f5e26e5c5053c1b4544515bc6a0653da02a0791fb31116d71a4fad916e15355: !Enum + - name: zero + tag: 48 + - name: one + tag: 49 + - name: two + tag: 50 + - name: three + tag: 51 + - name: four + tag: 52 + - name: five + tag: 53 + - name: six + tag: 54 + - name: seven + tag: 55 + - name: eight + tag: 56 + - name: nine + tag: 57 + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 63aa2314e8b147c8b284dfb39a9e10d19caad5faea848e3cb9849d9167d6344a: !List + - fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78 + - min: 1 + max: 255 + 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d: !Tuple + - c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4 + 822380f475f0edb4b5dc517991de7390ada2dbb3752c4c066851aa01630296c2: !Enum + - name: _A + tag: 65 + - name: _B + tag: 66 + - name: _C + tag: 67 + - name: _D + tag: 68 + - name: _E + tag: 69 + - name: _F + tag: 70 + - name: _G + tag: 71 + - name: _H + tag: 72 + - name: _I + tag: 73 + - name: _J + tag: 74 + - name: _K + tag: 75 + - name: _L + tag: 76 + - name: _M + tag: 77 + - name: _N + tag: 78 + - name: _O + tag: 79 + - name: _P + tag: 80 + - name: _Q + tag: 81 + - name: _R + tag: 82 + - name: _S + tag: 83 + - name: _T + tag: 84 + - name: _U + tag: 85 + - name: _V + tag: 86 + - name: _W + tag: 87 + - name: _X + tag: 88 + - name: _Y + tag: 89 + - name: _Z + tag: 90 + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + 888c5865633af13b95b7cd1a8d8af2dac1dc140b977251d9d4daf3c7511c8e84: !Tuple + - 5ca149585de534ee91b3e3a030b7efd4cdb79abea9152f101f3759b4c7210e1f + b070d38ff6d20c5ae5d80715ca31541d5a52bbdecbd3529d38e6ddb672200997: !Tuple + - 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + b10ddefe8020add8a0ca08292150abb13c514d76de5168c1c97105a27e676660: !Struct + - name: type + ty: 1cb0758e14c2008c0f008ce6d2d41e9e1937e1cd0f9914c59a7e29e1ce7ba0bb + - name: subtype + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + - name: charset + ty: 2fd8f27a172712903e6a3e96f0f85c0480b4211a17acd13059fc51d4a4bbde2c + bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46: !List + - 3cd1a29dccad9b917b26305f89a8a4fb2118302a4e73c5ac0a780de6ab005e73 + - min: 0 + max: 63 + c43a7d9eb9b3027973c98f5dd6e1ac04f5cbd34240c0bebc0a0fb808140094d4: !Tuple + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc + caff8faeb38a00a04e3621538f8e61d75a85a465cb0a0e48c3593e7eaa6c5fc7: !Tuple + - 3f2b72b7c4af1a630cb6d3ff088baf351093ee465b9e7d472a610082e449d7e4 + ccc272928f793803d91f5dad8d51cc986b4332380f9224f7c7c1514d768ebb90: !Tuple + - f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1 + - bf8fcbe9c5395731a6b4cd61fb00dfe7a5d629365339c55aeae087a3b90aaa46 + d7fcbee31ef0a85d5f973bda1b0b8c9e7efbcbc5572577382cacd3bdb4218a01: !Struct + - name: ticker + ty: 5b772c8eb15fd74700c79241f60f8fda37e736b3fd462ab017ce4d454efa81aa + - name: name + ty: 805ec5bc5312c84190445da16aa1c08a09e300e8323acfae6a23420a29ad003d + - name: details + ty: 45b780258601c526b23b5b4861460a9050e13f35fbbe8305a8001157e4013888 + - name: precision + ty: 5d03c4178da98e7e3f3af343e3997d74201d11f42732cfbea2b04b8e3ff15f22 + d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c: !Primitive 0 + dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548: !Tuple + - 43aa7fc5f6f5644fe5a2ae5e1aa99042cdeb879442e34c723ff5827fb133de8a + e087a83496338799afc48a9211683a427d2bd33e2ea7ebb8a8b880ea4ab4eb81: !Union + ? name: none + tag: 0 + : d83fbee02f0de5b46cf80fe11ef7fdf061c78d975d31ade9eea2bc4099339e6c + ? name: some + tag: 1 + : dc1e2f52567f725fd730ad84867f0da4c9ba9af0813311dfe4ef3e3c4a612548 + f5ad172144ccd2dd62ece74ff0fb14641d936a80c1a0c93ebf97727184897cbc: !List + - 48be23172ae884459ae78334a0063f09fa0e317bea8b233ce782a38875e796b8 + - min: 0 + max: 39 + f9170804ddae0479f8d5af74ab3bd202e6ea4172d9a9b93707151adb7fc40ca1: !Enum + - name: a + tag: 97 + - name: b + tag: 98 + - name: c + tag: 99 + - name: d + tag: 100 + - name: e + tag: 101 + - name: f + tag: 102 + - name: g + tag: 103 + - name: h + tag: 104 + - name: i + tag: 105 + - name: j + tag: 106 + - name: k + tag: 107 + - name: l + tag: 108 + - name: m + tag: 109 + - name: n + tag: 110 + - name: o + tag: 111 + - name: p + tag: 112 + - name: q + tag: 113 + - name: r + tag: 114 + - name: s + tag: 115 + - name: t + tag: 116 + - name: u + tag: 117 + - name: v + tag: 118 + - name: w + tag: 119 + - name: x + tag: 120 + - name: y + tag: 121 + - name: z + tag: 122 + fba958721a3d335406b368c36f5a82790960cce239febcafe189ba9839d5da78: UnicodeChar +scripts: +- isae: + - ALU + - BPDIGEST + - RGB + code: + - 11 + - 0 + - 0 + - 0 + - 208 + - 160 + - 15 + - 1 + - 7 + - 11 + - 0 + - 1 + - 0 + - 11 + - 8 + - 0 + - 0 + - 11 + - 1 + - 2 + - 0 + - 200 + - 218 + - 7 + - 1 + - 57 + - 48 + - 0 + - 209 + - 160 + - 15 + - 1 + - 7 + data: + - 0 + - 1 + - 0 + - 0 + libs: [] +attachments: {} +signatures: {} diff --git a/tests/utils/mod.rs b/tests/utils/mod.rs index e21401f..ea34756 100644 --- a/tests/utils/mod.rs +++ b/tests/utils/mod.rs @@ -58,8 +58,8 @@ pub use rgb::{ persistence::{ContractStateRead, MemContract, MemContractState, Stock}, resolvers::AnyResolver, stl::ContractTerms, - validation::{Failure, ResolveWitness, WitnessResolverError}, - vm::{WitnessOrd, XWitnessTx}, + validation::{Failure, ResolveWitness, Scripts, Validity, WitnessResolverError}, + vm::{WitnessOrd, WitnessPos, XWitnessTx}, BlindingFactor, DescriptorRgb, GenesisSeal, GraphSeal, Identity, RgbDescr, RgbKeychain, RgbWallet, TapretKey, TransferParams, Transition, WalletProvider, XOutpoint, XWitnessId, }; @@ -75,7 +75,6 @@ pub use rgbstd::{ stl::{ AssetSpec, Attachment, Details, MediaType, Name, ProofOfReserves, RicardianContract, Ticker, }, - validation::{Scripts, Validity}, Allocation, Amount, ContractId, GlobalStateType, Layer1, Operation, OwnedFraction, Precision, Schema, TokenIndex, TxoSeal, XChain, }; diff --git a/tests/validation.rs b/tests/validation.rs new file mode 100644 index 0000000..7605a19 --- /dev/null +++ b/tests/validation.rs @@ -0,0 +1,392 @@ +pub mod utils; + +use utils::*; + +enum MockResolvePubWitness { + Success(Tx), + Error(WitnessResolverError), +} + +enum MockResolvePubWitnessOrd { + Success(WitnessOrd), + Error(WitnessResolverError), +} + +struct MockResolver { + pub_witnesses: HashMap, + pub_witness_ords: HashMap, +} + +impl ResolveWitness for MockResolver { + fn resolve_pub_witness( + &self, + witness_id: XWitnessId, + ) -> Result { + if let Some(res) = self.pub_witnesses.get(&witness_id) { + match res { + MockResolvePubWitness::Success(tx) => Ok(XChain::Bitcoin(tx.clone())), + MockResolvePubWitness::Error(err) => Err(err.clone()), + } + } else { + Err(WitnessResolverError::Unknown(witness_id)) + } + } + + fn resolve_pub_witness_ord( + &self, + witness_id: XWitnessId, + ) -> Result { + if let Some(res) = self.pub_witness_ords.get(&witness_id) { + match res { + MockResolvePubWitnessOrd::Success(witness_ord) => Ok(*witness_ord), + MockResolvePubWitnessOrd::Error(err) => Err(err.clone()), + } + } else { + Err(WitnessResolverError::Unknown(witness_id)) + } + } +} + +#[derive(Debug, EnumIter, Copy, Clone, PartialEq)] +enum Scenario { + A, + B, +} + +impl fmt::Display for Scenario { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{:?}", self) + } +} + +impl Scenario { + fn resolver(&self) -> MockResolver { + match self { + Self::A => { + let (tx_1, witness_id_1) = + get_tx("bc:97b4c906fafad952e7b68784d38f56dec505a719c2564743b1bebe0289c7d893"); + let (tx_2, witness_id_2) = + get_tx("bc:f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc"); + let (tx_3, witness_id_3) = + get_tx("bc:3b9c8836e09cdf08d225b8e9f7862e23a6ede1276c12ccd426c530cd531e4cfa"); + MockResolver { + pub_witnesses: map![ + witness_id_1 => MockResolvePubWitness::Success(tx_1), + witness_id_2 => MockResolvePubWitness::Success(tx_2), + witness_id_3 => MockResolvePubWitness::Success(tx_3), + ], + pub_witness_ords: map![ + witness_id_1 => MockResolvePubWitnessOrd::Success(WitnessOrd::Mined(WitnessPos::new(106, 1726062111).unwrap())), + witness_id_2 => MockResolvePubWitnessOrd::Success(WitnessOrd::Mined(WitnessPos::new(108, 1726062111).unwrap())), + witness_id_3 => MockResolvePubWitnessOrd::Success(WitnessOrd::Mined(WitnessPos::new(110, 1726062112).unwrap())), + ], + } + } + Self::B => { + let (tx_1, witness_id_1) = + get_tx("bc:b9703e716d01de771d443c5cbf06cbba1f132c67a2b6d8c6c88bbcc0f83afe1b"); + let (tx_2, witness_id_2) = + get_tx("bc:5abbca66698ef17ab5e5794adc5a73e5988a96235b84e943a0c4e0fd05a8ca66"); + let (tx_3, witness_id_3) = + get_tx("bc:222f1a35bb96a02831930dcdd02e46f46daca1fdd7199dd043e04c7841b2ff40"); + MockResolver { + pub_witnesses: map![ + witness_id_1 => MockResolvePubWitness::Success(tx_1), + witness_id_2 => MockResolvePubWitness::Success(tx_2), + witness_id_3 => MockResolvePubWitness::Success(tx_3), + ], + pub_witness_ords: map![ + witness_id_1 => MockResolvePubWitnessOrd::Success(WitnessOrd::Mined(WitnessPos::new(105, 1726062423).unwrap())), + witness_id_2 => MockResolvePubWitnessOrd::Success(WitnessOrd::Mined(WitnessPos::new(106, 1726062423).unwrap())), + witness_id_3 => MockResolvePubWitnessOrd::Success(WitnessOrd::Mined(WitnessPos::new(106, 1726062423).unwrap())), + ], + } + } + } + } +} + +fn get_consignment(scenario: Scenario) -> (Transfer, Vec) { + initialize(); + + let transfer_type = match scenario { + Scenario::A => TransferType::Blinded, + Scenario::B => TransferType::Witness, + }; + + let mut wlt_1 = get_wallet(&DescriptorType::Wpkh); + let mut wlt_2 = get_wallet(&DescriptorType::Wpkh); + + let issued_supply_1 = 999; + let issued_supply_2 = 666; + + let sats = 9000; + + let utxo = wlt_1.get_utxo(None); + let (contract_id_1, iface_type_name_1) = + wlt_1.issue_nia(issued_supply_1, wlt_1.close_method(), Some(&utxo)); + let (contract_id_2, iface_type_name_2) = + wlt_1.issue_nia(issued_supply_2, wlt_1.close_method(), Some(&utxo)); + + let mut txes = vec![]; + + let (_consignment, tx) = wlt_1.send( + &mut wlt_2, + transfer_type, + contract_id_1, + &iface_type_name_1, + 66, + sats, + ); + txes.push(tx); + + // spend asset moved with blank transition + let (_consignment, tx) = wlt_1.send( + &mut wlt_2, + transfer_type, + contract_id_2, + &iface_type_name_2, + 50, + sats, + ); + txes.push(tx); + + // spend change of previous send + let (consignment, tx) = wlt_1.send( + &mut wlt_2, + transfer_type, + contract_id_2, + &iface_type_name_2, + 77, + sats, + ); + txes.push(tx); + + (consignment, txes) +} + +// run once to generate tests/fixtures/consignemnt_.yaml +// for example: +// SCENARIO=B cargo test --test validation validate_consignment_generate -- --ignored --show-output +// +// then copy the generated consignemnt file to tests/fixtures/attack_.yaml +// manually change tests/fixtures/attack_.yaml files to simulate attacks +#[test] +#[ignore = "one-shot"] +fn validate_consignment_generate() { + let scenario = match std::env::var("SCENARIO") { + Ok(val) if val.to_uppercase() == Scenario::A.to_string() => Scenario::A, + Ok(val) if val.to_uppercase() == Scenario::B.to_string() => Scenario::B, + Err(VarError::NotPresent) => Scenario::A, + _ => panic!("invalid scenario"), + }; + let (consignment, txes) = get_consignment(scenario); + println!(); + let cons_path = format!("tests/fixtures/consignment_{scenario}.yaml"); + let yaml = serde_yaml::to_string(&consignment).unwrap(); + std::fs::write(&cons_path, yaml).unwrap(); + println!("written consignment in: {cons_path}"); + for tx in txes { + let txid = tx.txid().to_string(); + let witness_id = XWitnessId::from_str(&txid).unwrap(); + let yaml = serde_yaml::to_string(&tx).unwrap(); + let yaml_path = format!("tests/fixtures/{witness_id}.yaml"); + std::fs::write(&yaml_path, yaml).unwrap(); + println!("written tx: {witness_id}"); + } +} + +fn get_consignment_from_yaml(fname: &str) -> Transfer { + let cons_path = format!("tests/fixtures/{fname}.yaml"); + println!("loading {cons_path}"); + let file = std::fs::File::open(cons_path).unwrap(); + let consignment: Transfer = serde_yaml::from_reader(file).unwrap(); + consignment +} + +fn get_tx(witness_id: &str) -> (Tx, XWitnessId) { + let yaml_path = format!("tests/fixtures/{witness_id}.yaml"); + let file = std::fs::File::open(yaml_path).unwrap(); + let tx: Tx = serde_yaml::from_reader(file).unwrap(); + let xwitness_id = XWitnessId::from_str(witness_id).unwrap(); + (tx, xwitness_id) +} + +#[test] +fn validate_consignment_success() { + for scenario in Scenario::iter() { + let resolver = scenario.resolver(); + let consignment = get_consignment_from_yaml(&format!("consignment_{scenario}")); + let res = consignment.validate(&resolver, true); + assert!(res.is_ok()); + let validation_status = match res { + Ok(validated_consignment) => validated_consignment.validation_status().clone(), + Err((status, _consignment)) => status, + }; + dbg!(&validation_status); + assert!(validation_status.failures.is_empty()); + assert!(validation_status.warnings.is_empty()); + assert!(validation_status.info.is_empty()); + let validity = validation_status.validity(); + assert_eq!(validity, Validity::Valid); + } +} + +#[test] +fn validate_consignment_chain_fail() { + let resolver = Scenario::A.resolver(); + + // liquid + let consignment = get_consignment_from_yaml("attack_chain"); + let res = consignment.validate(&resolver, true); + assert!(res.is_err()); + let validation_status = match res { + Ok(validated_consignment) => validated_consignment.validation_status().clone(), + Err((status, _consignment)) => status, + }; + dbg!(&validation_status); + assert!(validation_status.warnings.is_empty()); + assert!(validation_status.info.is_empty()); + let validity = validation_status.validity(); + assert_eq!(validity, Validity::Invalid); +} + +#[test] +fn validate_consignment_genesis_fail() { + let resolver = Scenario::B.resolver(); + + // schema ID: change genesis[schemaId] with CFA schema ID + let consignment = get_consignment_from_yaml("attack_genesis_schema_id"); + let res = consignment.validate(&resolver, true); + assert!(res.is_err()); + let validation_status = match res { + Ok(validated_consignment) => validated_consignment.validation_status().clone(), + Err((status, _consignment)) => status, + }; + dbg!(&validation_status); + assert_eq!(validation_status.failures.len(), 5); + assert!(matches!( + validation_status.failures[0], + Failure::MpcInvalid(_, _, _) + )); + assert!(matches!( + validation_status.failures[1], + Failure::OperationAbsent(_) + )); + assert!(matches!( + validation_status.failures[2], + Failure::MpcInvalid(_, _, _) + )); + assert!(matches!( + validation_status.failures[3], + Failure::BundleExtraTransition(_, _) + )); + assert!(matches!( + validation_status.failures[4], + Failure::MpcInvalid(_, _, _) + )); + assert!(validation_status.warnings.is_empty()); + assert!(validation_status.info.is_empty()); + let validity = validation_status.validity(); + assert_eq!(validity, Validity::Invalid); + + // genesis testnet: change from true to false + let consignment = get_consignment_from_yaml("attack_genesis_testnet"); + let res = consignment.validate(&resolver, true); + assert!(res.is_err()); + let validation_status = match res { + Ok(validated_consignment) => validated_consignment.validation_status().clone(), + Err((status, _consignment)) => status, + }; + dbg!(&validation_status); + assert_eq!(validation_status.failures.len(), 1); + assert!(matches!( + validation_status.failures[0], + Failure::NetworkMismatch(_) + )); + assert!(validation_status.warnings.is_empty()); + assert!(validation_status.info.is_empty()); + let validity = validation_status.validity(); + assert_eq!(validity, Validity::Invalid); +} + +#[test] +fn validate_consignment_bundles_fail() { + let resolver = Scenario::A.resolver(); + + // bundles pubWitness data inputs[0] sequence: change from 0 to 1 + let consignment = get_consignment_from_yaml("attack_bundles_pubWitness_data_input_sequence"); + let res = consignment.validate(&resolver, true); + assert!(res.is_err()); + let validation_status = match res { + Ok(validated_consignment) => validated_consignment.validation_status().clone(), + Err((status, _consignment)) => status, + }; + dbg!(&validation_status); + assert_eq!(validation_status.failures.len(), 2); + assert!(matches!( + validation_status.failures[0], + Failure::SealsInvalid(_, _, _) + )); + assert!(matches!( + validation_status.failures[1], + Failure::BundleInvalidCommitment(_, _, _, _) + )); + assert!(validation_status.warnings.is_empty()); + assert!(validation_status.info.is_empty()); + let validity = validation_status.validity(); + assert_eq!(validity, Validity::Invalid); +} + +#[test] +fn validate_consignment_resolver_error() { + let scenario = Scenario::A; + let mut resolver = scenario.resolver(); + let txid = + Txid::from_str("f93edffa684d53146d5bc11122eb129960f2ca86bbdbca338df3b3c7234544dc").unwrap(); + let xwitness_id = XChain::Bitcoin(txid); + + // resolve_pub_witness error + *resolver.pub_witnesses.get_mut(&xwitness_id).unwrap() = MockResolvePubWitness::Error( + WitnessResolverError::Other(xwitness_id, s!("unexpected error")), + ); + let consignment = get_consignment_from_yaml("attack_resolver_error"); + let res = consignment.validate(&resolver, true); + assert!(res.is_err()); + let validation_status = match res { + Ok(validated_consignment) => validated_consignment.validation_status().clone(), + Err((status, _consignment)) => status, + }; + dbg!(&validation_status); + assert_eq!(validation_status.failures.len(), 1); + assert!(matches!( + validation_status.failures[0], + Failure::SealNoPubWitness(_, _, _) + )); + assert!(validation_status.warnings.is_empty()); + assert!(validation_status.info.is_empty()); + let validity = validation_status.validity(); + assert_eq!(validity, Validity::Invalid); + + // resolve_pub_witness_ord error + *resolver.pub_witness_ords.get_mut(&xwitness_id).unwrap() = MockResolvePubWitnessOrd::Error( + WitnessResolverError::Other(xwitness_id, s!("unexpected error")), + ); + let consignment = get_consignment_from_yaml("attack_resolver_error"); + let res = consignment.validate(&resolver, true); + assert!(res.is_err()); + let validation_status = match res { + Ok(validated_consignment) => validated_consignment.validation_status().clone(), + Err((status, _consignment)) => status, + }; + dbg!(&validation_status); + assert_eq!(validation_status.failures.len(), 1); + assert!(matches!( + validation_status.failures[0], + Failure::SealNoPubWitness(_, _, _) + )); + assert!(validation_status.warnings.is_empty()); + assert!(validation_status.info.is_empty()); + let validity = validation_status.validity(); + assert_eq!(validity, Validity::Invalid); +} From 0a2e421b46bcb813dc520930d2b361e2e4c000fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoe=20Faltib=C3=A0?= Date: Thu, 12 Sep 2024 10:13:20 +0200 Subject: [PATCH 2/2] rename from rgb-integration-tests to rgb-tests --- Cargo.lock | 64 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 8 +++---- README.md | 8 +++---- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f81305e..af5e05c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1624,38 +1624,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "rgb-integration-tests" -version = "0.1.0" -dependencies = [ - "amplify 4.7.0", - "bitcoin_hashes", - "bp-core", - "bp-electrum", - "bp-esplora", - "bp-invoice", - "bp-std", - "bp-wallet", - "descriptors", - "once_cell", - "psbt", - "rand", - "rgb-interfaces", - "rgb-psbt", - "rgb-runtime", - "rgb-schemata", - "rgb-std", - "rstest", - "rstest_reuse", - "serde_yaml", - "strict_encoding", - "strict_types", - "strum", - "strum_macros", - "time", - "tree_magic_mini", -] - [[package]] name = "rgb-interfaces" version = "0.11.0-beta.8" @@ -1774,6 +1742,38 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "rgb-tests" +version = "0.1.0" +dependencies = [ + "amplify 4.7.0", + "bitcoin_hashes", + "bp-core", + "bp-electrum", + "bp-esplora", + "bp-invoice", + "bp-std", + "bp-wallet", + "descriptors", + "once_cell", + "psbt", + "rand", + "rgb-interfaces", + "rgb-psbt", + "rgb-runtime", + "rgb-schemata", + "rgb-std", + "rstest", + "rstest_reuse", + "serde_yaml", + "strict_encoding", + "strict_types", + "strum", + "strum_macros", + "time", + "tree_magic_mini", +] + [[package]] name = "ring" version = "0.17.8" diff --git a/Cargo.toml b/Cargo.toml index 39a5aa0..0506395 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rgb-integration-tests" +name = "rgb-tests" version = "0.1.0" authors = [ "Zoe FaltibĂ  ", @@ -8,10 +8,10 @@ authors = [ ] edition = "2021" rust-version = "1.75.0" -repository = "https://github.com/RGB-WG/rgb-integration-tests" -homepage = "https://github.com/RGB-WG/rgb-integration-tests" +repository = "https://github.com/RGB-WG/rgb-tests" +homepage = "https://github.com/RGB-WG/rgb-tests" license = "Apache-2.0" -description = "RGB integration tests" +description = "RGB tests" [dependencies] bitcoin_hashes = "0.14.0" diff --git a/README.md b/README.md index 3abee8b..64a481d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# RGB integration tests +# RGB tests -This repository contains integration tests for RGB. +This repository contains tests for RGB. ## Requirements - Linux OS @@ -11,7 +11,7 @@ This repository contains integration tests for RGB. Clone the project, including submodules: ```sh -git clone https://github.com/RGB-WG/rgb-integration-tests --recurse-submodules +git clone https://github.com/RGB-WG/rgb-tests --recurse-submodules ``` Note: after checking out to another commit, remember to run: @@ -19,7 +19,7 @@ Note: after checking out to another commit, remember to run: git submodule update ``` -Then, from the project root, run the integration tests by running: +Then, from the project root, run the tests by running: ```sh cargo test ```