@odatano/contract-m402-vault 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ {
2
+ "version": 3,
3
+ "file": "index.js",
4
+ "sourceRoot": "../../../",
5
+ "sources": ["src/m402-vault.compact", "compiler/standard-library.compact", "compiler/zkir-v3-library.compact"],
6
+ "names": [],
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKA;;;;;;;;;;MAcA,MAAA,WAEC;;OAAA;MAID,MAAA,aAIC;;OAAA;MAID,MAAA,eAQC;;OAAA;MAED,AAAA,eAWC;;;;;cAX8B,MAAe;cAAE,OAAe;cAAE,OAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAAlD,MAAe,+BAAE,OAAe,+BAAE,OAAgB;;;;;;;;;uDAAlD,MAAe;uDAAE,OAAe;uDAAE,OAAgB;;;;OAWhF;MAID,AAAA,OAkBC;;;;;cAlBsB,QAAgB;cAAE,WAAoB;;;;;;;;;;;;;;;;;;;;;;;;;yCAAtC,QAAgB,+BAAE,WAAoB;;;;;;;;;+CAAtC,QAAgB;+CAAE,WAAoB;;;;OAkB5D;MAID,AAAA,GAmBC;;;;;cAnBkB,WAAoB;cAAE,QAAwB;cAAE,eAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAAxE,WAAoB,+BAAE,QAAwB,+BAAE,eAAwB;;;;;;;;;2CAAxE,WAAoB;2CAAE,QAAwB;2CAAE,eAAwB;;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AAe;;;;;;;;;;;;;;;;;;;;;;6CAFf,OAAgB,EAChB,MAAe,EACf,OAAe;GAKhB;;;;;;;;;;;;;;;;;;;;;;;"
8
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "version": 1,
3
+ "prover": {
4
+ "deposit": {
5
+ "sha256": "bca2ad3af05f78dd3712d090834f2338ba0905eacc4779aa8658003106727105",
6
+ "bytes": 45096467
7
+ },
8
+ "pay": {
9
+ "sha256": "4e8f69ab82df340affba2fbf1902812fba60f23e91cbfe2d055bf8d229f42a17",
10
+ "bytes": 22551479
11
+ },
12
+ "redeem": {
13
+ "sha256": "52b9e5d5cd97303e18d16c921a0d62c76a4f99fda04a415e8d8bc9d675b5eccc",
14
+ "bytes": 22550857
15
+ },
16
+ "registerService": {
17
+ "sha256": "cc451a10c478a0f792a0d5208be652f25edbf24757d9cc7b7b8f3486bc115fba",
18
+ "bytes": 11277741
19
+ },
20
+ "withdraw": {
21
+ "sha256": "df53c55573b8ed08ac9efbe9d251ed632395f344d9dd90681863b170c904f9c7",
22
+ "bytes": 447074
23
+ }
24
+ },
25
+ "verifier": {
26
+ "deposit": {
27
+ "sha256": "3967aa980c22fa7db0111c36ab0580752d1c27d242cbef9461fea2b2c0562566",
28
+ "bytes": 2121
29
+ },
30
+ "pay": {
31
+ "sha256": "44146e9d3102fc60deb47d61cc44029424f841c589322d9944b866b9e8d44a34",
32
+ "bytes": 2121
33
+ },
34
+ "redeem": {
35
+ "sha256": "13b94ab51c5988bbfd64c2aabd243da27a3ffffe298aa7041ef957480d2fb915",
36
+ "bytes": 2121
37
+ },
38
+ "registerService": {
39
+ "sha256": "dece03cc1c292c0d305f9bd23485399c71336c88d74765f1ab1e53ced6905ff8",
40
+ "bytes": 2121
41
+ },
42
+ "withdraw": {
43
+ "sha256": "a61392d20dae6d8fa2d7faac960b0213b92264c267fbdef1ad3b4415794d12d8",
44
+ "bytes": 1353
45
+ }
46
+ },
47
+ "zkir": {
48
+ "deposit": {
49
+ "sha256": "c6e5dc6d41e7ddeb96bfda38a3541547550dd6df0c8eb94f32480dd0d0dc2b5b",
50
+ "bytes": 3331
51
+ },
52
+ "pay": {
53
+ "sha256": "97bb250228801e0201a6972cf95ace913acc46a3f8d1f12cc1a3e4a55c3e29d5",
54
+ "bytes": 2727
55
+ },
56
+ "redeem": {
57
+ "sha256": "dee45be565f8df2ccd11fbfa1eedfe52d60ba3e8b0246ae86e66cc6559e245d7",
58
+ "bytes": 2105
59
+ },
60
+ "registerService": {
61
+ "sha256": "1673773856c602c25845c5c670d32f83989afc09901126990159960582d125f0",
62
+ "bytes": 1181
63
+ },
64
+ "withdraw": {
65
+ "sha256": "93f2f14077a37a3adab242263a7bc03a923bfdc9024550bcdd4cd3867cefc6df",
66
+ "bytes": 1938
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,126 @@
1
+ {
2
+ "version": { "major": 3, "minor": 1 },
3
+ "do_communications_commitment": true,
4
+ "inputs": [
5
+ { "name": "%amount.0", "type": "Scalar<BLS12-381>" },
6
+ { "name": "%nonceSeed.1", "type": "Scalar<BLS12-381>" },
7
+ { "name": "%nonceSeed.2", "type": "Scalar<BLS12-381>" }
8
+ ],
9
+ "outputs": [
10
+ ],
11
+ "instructions": [
12
+ { "op": "constrain_bits", "val": "%amount.0", "bits": 64 },
13
+ { "op": "constrain_bits", "val": "%nonceSeed.1", "bits": 8 },
14
+ { "op": "constrain_bits", "val": "%nonceSeed.2", "bits": 248 },
15
+ { "op": "less_than", "output": "%t.3", "a": "0x00", "b": "%amount.0", "bits": 64 },
16
+ { "op": "assert", "cond": "%t.3" },
17
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
18
+ { "op": "impact", "guard": "0x01", "inputs": ["0x80", "0x01", "0x01", "0x06"] },
19
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x03", "0x01", "0x20", "0x20", "0x01", "0x00", "0x00", "0x00", "0x00"] },
20
+ { "op": "impact", "guard": "0x01", "inputs": ["0x31"] },
21
+ { "op": "impact", "guard": "0x01", "inputs": ["0x31"] },
22
+ { "op": "impact", "guard": "0x01", "inputs": ["0x18"] },
23
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x10", "%amount.0"] },
24
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
25
+ { "op": "impact", "guard": "0x01", "inputs": ["0x08"] },
26
+ { "op": "impact", "guard": "0x01", "inputs": ["0x12", "0x04"] },
27
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
28
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
29
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "-0x01"] },
30
+ { "op": "impact", "guard": "0x01", "inputs": ["0x14"] },
31
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa2"] },
32
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
33
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.4", "guard": null },
34
+ { "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
35
+ { "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x01", "0x04"] },
36
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x08", "%t.4"] },
37
+ { "op": "copy", "output": "%index.5", "val": "%t.4" },
38
+ { "op": "constrain_bits", "val": "%index.5", "bits": 64 },
39
+ { "op": "copy", "output": "%t.6", "val": "%nonceSeed.2" },
40
+ { "op": "transient_hash", "output": "%t.7", "inputs": ["0x6d69646e696768743a6b65726e656c3a6e6f6e63655f65766f6c7665", "%index.5", "%t.6"] },
41
+ { "op": "copy", "output": "%nonce.8", "val": "0x00" },
42
+ { "op": "div_mod_power_of_two", "outputs": ["%tmp.9", "%nonce.10"], "val": "%t.7", "bits": 248 },
43
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%value.11", "guard": null },
44
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%value.12", "guard": null },
45
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
46
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "0x01", "0x01", "0x00"] },
47
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x20", "%value.11", "%value.12"] },
48
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%contractAddress.13", "guard": null },
49
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%contractAddress.14", "guard": null },
50
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
51
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "0x01", "0x01", "0x00"] },
52
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x20", "%contractAddress.13", "%contractAddress.14"] },
53
+ { "op": "persistent_hash", "output": "%bytes.15", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": ["0x00", "0x6d69646e696768743a6465726976655f746f6b656e", "0x00", "0x6d3430323a6372656469743a7631", "%contractAddress.13", "%contractAddress.14"] },
54
+ { "op": "bytes_into_natives", "outputs": ["%t.16", "%t.17"], "bytes": "%bytes.15" },
55
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
56
+ { "op": "impact", "guard": "0x01", "inputs": ["0x80", "0x01", "0x01", "0x04"] },
57
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "0x00", "0x6d3430323a6372656469743a7631"] },
58
+ { "op": "impact", "guard": "0x01", "inputs": ["0x31"] },
59
+ { "op": "impact", "guard": "0x01", "inputs": ["0x31"] },
60
+ { "op": "impact", "guard": "0x01", "inputs": ["0x18"] },
61
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x08", "%amount.0"] },
62
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
63
+ { "op": "impact", "guard": "0x01", "inputs": ["0x08"] },
64
+ { "op": "impact", "guard": "0x01", "inputs": ["0x12", "0x04"] },
65
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
66
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
67
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "-0x01"] },
68
+ { "op": "impact", "guard": "0x01", "inputs": ["0x14"] },
69
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa2"] },
70
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
71
+ { "op": "persistent_hash", "output": "%bytes.18", "alignment": [{ "tag": "atom", "value": { "length": 21, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 16, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 1, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": ["0x6d69646e696768743a7a737761702d63635b76315d", "%nonce.8", "%nonce.10", "%t.17", "%t.16", "%amount.0", "0x00", "%value.11", "%value.12"] },
72
+ { "op": "bytes_into_natives", "outputs": ["%cm.19", "%cm.20"], "bytes": "%bytes.18" },
73
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
74
+ { "op": "impact", "guard": "0x01", "inputs": ["0x80", "0x01", "0x01", "0x02"] },
75
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%cm.20", "%cm.19"] },
76
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x00"] },
77
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa2"] },
78
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
79
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.21", "guard": null },
80
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.22", "guard": null },
81
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
82
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "0x01", "0x01", "0x00"] },
83
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x20", "%t.21", "%t.22"] },
84
+ { "op": "test_eq", "output": "%t.23", "a": "%value.11", "b": "%t.21" },
85
+ { "op": "test_eq", "output": "%t.24", "a": "%value.12", "b": "%t.22" },
86
+ { "op": "cond_select", "output": "%t.25", "bit": "%t.23", "a": "%t.24", "b": "0x00" },
87
+ { "op": "impact", "guard": "%t.25", "inputs": ["0x40"] },
88
+ { "op": "impact", "guard": "%t.25", "inputs": ["0x80", "0x01", "0x01", "0x01"] },
89
+ { "op": "impact", "guard": "%t.25", "inputs": ["0x10", "0x01", "0x01", "0x20", "%cm.20", "%cm.19"] },
90
+ { "op": "impact", "guard": "%t.25", "inputs": ["0x10", "0x00"] },
91
+ { "op": "impact", "guard": "%t.25", "inputs": ["0xa2"] },
92
+ { "op": "impact", "guard": "%t.25", "inputs": ["0x40"] },
93
+ { "op": "private_input", "type": "Scalar<BLS12-381>", "output": "%value.26", "guard": null },
94
+ { "op": "constrain_bits", "val": "%value.26", "bits": 8 },
95
+ { "op": "private_input", "type": "Scalar<BLS12-381>", "output": "%value.27", "guard": null },
96
+ { "op": "constrain_bits", "val": "%value.27", "bits": 248 },
97
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%selfAddr.28", "guard": null },
98
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%selfAddr.29", "guard": null },
99
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
100
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "0x01", "0x01", "0x00"] },
101
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x20", "%selfAddr.28", "%selfAddr.29"] },
102
+ { "op": "persistent_hash", "output": "%bytes.30", "alignment": [{ "tag": "atom", "value": { "length": 21, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 16, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 1, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": ["0x6d69646e696768743a7a737761702d636e5b76315d", "%nonce.8", "%nonce.10", "%t.17", "%t.16", "%amount.0", "0x00", "%selfAddr.28", "%selfAddr.29"] },
103
+ { "op": "bytes_into_natives", "outputs": ["%tmp.31", "%tmp.32"], "bytes": "%bytes.30" },
104
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
105
+ { "op": "impact", "guard": "0x01", "inputs": ["0x80", "0x01", "0x01", "0x00"] },
106
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%tmp.32", "%tmp.31"] },
107
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x00"] },
108
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa2"] },
109
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
110
+ { "op": "copy", "output": "%t.33", "val": "%nonce.10" },
111
+ { "op": "transient_hash", "output": "%t.34", "inputs": ["0x6d69646e696768743a6b65726e656c3a6e6f6e63655f65766f6c7665", "%t.33"] },
112
+ { "op": "copy", "output": "%t.35", "val": "0x00" },
113
+ { "op": "div_mod_power_of_two", "outputs": ["%tmp.36", "%t.37"], "val": "%t.34", "bits": 248 },
114
+ { "op": "persistent_hash", "output": "%bytes.38", "alignment": [{ "tag": "atom", "value": { "length": 21, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 16, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 1, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": ["0x6d69646e696768743a7a737761702d63635b76315d", "%t.35", "%t.37", "%t.17", "%t.16", "%amount.0", "0x01", "%value.26", "%value.27"] },
115
+ { "op": "bytes_into_natives", "outputs": ["%tmp.39", "%tmp.40"], "bytes": "%bytes.38" },
116
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
117
+ { "op": "impact", "guard": "0x01", "inputs": ["0x80", "0x01", "0x01", "0x02"] },
118
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%tmp.40", "%tmp.39"] },
119
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x00"] },
120
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa2"] },
121
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
122
+ { "op": "impact", "guard": "0x01", "inputs": ["0x70", "0x01", "0x01", "0x04"] },
123
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0e", "0x01"] },
124
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa1"] }
125
+ ]
126
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "version": { "major": 3, "minor": 1 },
3
+ "do_communications_commitment": true,
4
+ "inputs": [
5
+ { "name": "%serviceId.0", "type": "Scalar<BLS12-381>" },
6
+ { "name": "%serviceId.1", "type": "Scalar<BLS12-381>" },
7
+ { "name": "%credit.2", "type": "Scalar<BLS12-381>" },
8
+ { "name": "%credit.3", "type": "Scalar<BLS12-381>" },
9
+ { "name": "%credit.4", "type": "Scalar<BLS12-381>" },
10
+ { "name": "%credit.5", "type": "Scalar<BLS12-381>" },
11
+ { "name": "%credit.6", "type": "Scalar<BLS12-381>" },
12
+ { "name": "%receiptSecret.7", "type": "Scalar<BLS12-381>" },
13
+ { "name": "%receiptSecret.8", "type": "Scalar<BLS12-381>" }
14
+ ],
15
+ "outputs": [
16
+ ],
17
+ "instructions": [
18
+ { "op": "constrain_bits", "val": "%serviceId.0", "bits": 8 },
19
+ { "op": "constrain_bits", "val": "%serviceId.1", "bits": 248 },
20
+ { "op": "constrain_bits", "val": "%credit.2", "bits": 8 },
21
+ { "op": "constrain_bits", "val": "%credit.3", "bits": 248 },
22
+ { "op": "constrain_bits", "val": "%credit.4", "bits": 8 },
23
+ { "op": "constrain_bits", "val": "%credit.5", "bits": 248 },
24
+ { "op": "constrain_bits", "val": "%credit.6", "bits": 128 },
25
+ { "op": "constrain_bits", "val": "%receiptSecret.7", "bits": 8 },
26
+ { "op": "constrain_bits", "val": "%receiptSecret.8", "bits": 248 },
27
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.9", "guard": null },
28
+ { "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
29
+ { "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x01", "0x00"] },
30
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%serviceId.0", "%serviceId.1"] },
31
+ { "op": "impact", "guard": "0x01", "inputs": ["0x18"] },
32
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x01", "%t.9"] },
33
+ { "op": "assert", "cond": "%t.9" },
34
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%price.10", "guard": null },
35
+ { "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
36
+ { "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x01", "0x00"] },
37
+ { "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x20", "%serviceId.0", "%serviceId.1"] },
38
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0c", "0x01", "0x08", "%price.10"] },
39
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%contractAddress.11", "guard": null },
40
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%contractAddress.12", "guard": null },
41
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
42
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "0x01", "0x01", "0x00"] },
43
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x20", "%contractAddress.11", "%contractAddress.12"] },
44
+ { "op": "persistent_hash", "output": "%bytes.13", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": ["0x00", "0x6d69646e696768743a6465726976655f746f6b656e", "0x00", "0x6d3430323a6372656469743a7631", "%contractAddress.11", "%contractAddress.12"] },
45
+ { "op": "bytes_into_natives", "outputs": ["%t.14", "%t.15"], "bytes": "%bytes.13" },
46
+ { "op": "test_eq", "output": "%t.16", "a": "%credit.4", "b": "%t.15" },
47
+ { "op": "test_eq", "output": "%t.17", "a": "%credit.5", "b": "%t.14" },
48
+ { "op": "cond_select", "output": "%t.18", "bit": "%t.16", "a": "%t.17", "b": "0x00" },
49
+ { "op": "assert", "cond": "%t.18" },
50
+ { "op": "test_eq", "output": "%t.19", "a": "%credit.6", "b": "%price.10" },
51
+ { "op": "assert", "cond": "%t.19" },
52
+ { "op": "persistent_hash", "output": "%bytes.20", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": ["0x00", "0x6d3430323a726563656970743a7631", "%receiptSecret.7", "%receiptSecret.8", "%serviceId.0", "%serviceId.1"] },
53
+ { "op": "bytes_into_natives", "outputs": ["%receipt.21", "%receipt.22"], "bytes": "%bytes.20" },
54
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.23", "guard": null },
55
+ { "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
56
+ { "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x01", "0x02"] },
57
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%receipt.22", "%receipt.21"] },
58
+ { "op": "impact", "guard": "0x01", "inputs": ["0x18"] },
59
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x01", "%t.23"] },
60
+ { "op": "cond_select", "output": "%t.24", "bit": "%t.23", "a": "0x00", "b": "0x01" },
61
+ { "op": "assert", "cond": "%t.24" },
62
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%value.25", "guard": null },
63
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%value.26", "guard": null },
64
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
65
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "0x01", "0x01", "0x00"] },
66
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x20", "%value.25", "%value.26"] },
67
+ { "op": "persistent_hash", "output": "%bytes.27", "alignment": [{ "tag": "atom", "value": { "length": 21, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 16, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 1, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": ["0x6d69646e696768743a7a737761702d63635b76315d", "%credit.2", "%credit.3", "%credit.4", "%credit.5", "%credit.6", "0x00", "%value.25", "%value.26"] },
68
+ { "op": "bytes_into_natives", "outputs": ["%tmp.28", "%tmp.29"], "bytes": "%bytes.27" },
69
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
70
+ { "op": "impact", "guard": "0x01", "inputs": ["0x80", "0x01", "0x01", "0x01"] },
71
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%tmp.29", "%tmp.28"] },
72
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x00"] },
73
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa2"] },
74
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
75
+ { "op": "impact", "guard": "0x01", "inputs": ["0x70", "0x01", "0x01", "0x02"] },
76
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%receipt.22", "%receipt.21"] },
77
+ { "op": "impact", "guard": "0x01", "inputs": ["0x11", "0x00"] },
78
+ { "op": "impact", "guard": "0x01", "inputs": ["0x91"] },
79
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa1"] },
80
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%owner.30", "guard": null },
81
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%owner.31", "guard": null },
82
+ { "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
83
+ { "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x01", "0x01"] },
84
+ { "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x20", "%serviceId.0", "%serviceId.1"] },
85
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0c", "0x01", "0x20", "%owner.30", "%owner.31"] },
86
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.32", "guard": null },
87
+ { "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
88
+ { "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x01", "0x03"] },
89
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%owner.30", "%owner.31"] },
90
+ { "op": "impact", "guard": "0x01", "inputs": ["0x18"] },
91
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x01", "%t.32"] },
92
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.33", "guard": "%t.32" },
93
+ { "op": "impact", "guard": "%t.32", "inputs": ["0x30"] },
94
+ { "op": "impact", "guard": "%t.32", "inputs": ["0x50", "0x01", "0x01", "0x03"] },
95
+ { "op": "impact", "guard": "%t.32", "inputs": ["0x50", "0x01", "0x20", "%owner.30", "%owner.31"] },
96
+ { "op": "impact", "guard": "%t.32", "inputs": ["0x0c", "0x01", "0x08", "%t.33"] },
97
+ { "op": "cond_select", "output": "%prior.34", "bit": "%t.32", "a": "%t.33", "b": "0x00" },
98
+ { "op": "add", "output": "%t.35", "a": "%prior.34", "b": "%price.10" },
99
+ { "op": "constrain_bits", "val": "%t.35", "bits": 64 },
100
+ { "op": "copy", "output": "%tmp.36", "val": "%t.35" },
101
+ { "op": "impact", "guard": "0x01", "inputs": ["0x70", "0x01", "0x01", "0x03"] },
102
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%owner.30", "%owner.31"] },
103
+ { "op": "impact", "guard": "0x01", "inputs": ["0x11", "0x01", "0x01", "0x08", "%tmp.36"] },
104
+ { "op": "impact", "guard": "0x01", "inputs": ["0x91"] },
105
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa1"] }
106
+ ]
107
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "version": { "major": 3, "minor": 1 },
3
+ "do_communications_commitment": true,
4
+ "inputs": [
5
+ { "name": "%recipient.0", "type": "Scalar<BLS12-381>" },
6
+ { "name": "%recipient.1", "type": "Scalar<BLS12-381>" },
7
+ { "name": "%credit.2", "type": "Scalar<BLS12-381>" },
8
+ { "name": "%credit.3", "type": "Scalar<BLS12-381>" },
9
+ { "name": "%credit.4", "type": "Scalar<BLS12-381>" },
10
+ { "name": "%credit.5", "type": "Scalar<BLS12-381>" },
11
+ { "name": "%credit.6", "type": "Scalar<BLS12-381>" }
12
+ ],
13
+ "outputs": [
14
+ ],
15
+ "instructions": [
16
+ { "op": "constrain_bits", "val": "%recipient.0", "bits": 8 },
17
+ { "op": "constrain_bits", "val": "%recipient.1", "bits": 248 },
18
+ { "op": "constrain_bits", "val": "%credit.2", "bits": 8 },
19
+ { "op": "constrain_bits", "val": "%credit.3", "bits": 248 },
20
+ { "op": "constrain_bits", "val": "%credit.4", "bits": 8 },
21
+ { "op": "constrain_bits", "val": "%credit.5", "bits": 248 },
22
+ { "op": "constrain_bits", "val": "%credit.6", "bits": 128 },
23
+ { "op": "test_eq", "output": "%t.7", "a": "%recipient.0", "b": "0x00" },
24
+ { "op": "test_eq", "output": "%t.8", "a": "%recipient.1", "b": "0x00" },
25
+ { "op": "cond_select", "output": "%t.9", "bit": "%t.7", "a": "%t.8", "b": "0x00" },
26
+ { "op": "cond_select", "output": "%t.10", "bit": "%t.9", "a": "0x00", "b": "0x01" },
27
+ { "op": "assert", "cond": "%t.10" },
28
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%contractAddress.11", "guard": null },
29
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%contractAddress.12", "guard": null },
30
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
31
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "0x01", "0x01", "0x00"] },
32
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x20", "%contractAddress.11", "%contractAddress.12"] },
33
+ { "op": "persistent_hash", "output": "%bytes.13", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": ["0x00", "0x6d69646e696768743a6465726976655f746f6b656e", "0x00", "0x6d3430323a6372656469743a7631", "%contractAddress.11", "%contractAddress.12"] },
34
+ { "op": "bytes_into_natives", "outputs": ["%t.14", "%t.15"], "bytes": "%bytes.13" },
35
+ { "op": "test_eq", "output": "%t.16", "a": "%credit.4", "b": "%t.15" },
36
+ { "op": "test_eq", "output": "%t.17", "a": "%credit.5", "b": "%t.14" },
37
+ { "op": "cond_select", "output": "%t.18", "bit": "%t.16", "a": "%t.17", "b": "0x00" },
38
+ { "op": "assert", "cond": "%t.18" },
39
+ { "op": "less_than", "output": "%t.19", "a": "0x00", "b": "%credit.6", "bits": 128 },
40
+ { "op": "assert", "cond": "%t.19" },
41
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%value.20", "guard": null },
42
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%value.21", "guard": null },
43
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
44
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "0x01", "0x01", "0x00"] },
45
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x20", "%value.20", "%value.21"] },
46
+ { "op": "persistent_hash", "output": "%bytes.22", "alignment": [{ "tag": "atom", "value": { "length": 21, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 16, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 1, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": ["0x6d69646e696768743a7a737761702d63635b76315d", "%credit.2", "%credit.3", "%credit.4", "%credit.5", "%credit.6", "0x00", "%value.20", "%value.21"] },
47
+ { "op": "bytes_into_natives", "outputs": ["%tmp.23", "%tmp.24"], "bytes": "%bytes.22" },
48
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
49
+ { "op": "impact", "guard": "0x01", "inputs": ["0x80", "0x01", "0x01", "0x01"] },
50
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%tmp.24", "%tmp.23"] },
51
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x00"] },
52
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa2"] },
53
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
54
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
55
+ { "op": "impact", "guard": "0x01", "inputs": ["0x80", "0x01", "0x01", "0x07"] },
56
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x03", "0x01", "0x20", "0x20", "0x01", "0x00", "0x00", "0x00", "0x00"] },
57
+ { "op": "impact", "guard": "0x01", "inputs": ["0x31"] },
58
+ { "op": "impact", "guard": "0x01", "inputs": ["0x31"] },
59
+ { "op": "impact", "guard": "0x01", "inputs": ["0x18"] },
60
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x10", "%credit.6"] },
61
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
62
+ { "op": "impact", "guard": "0x01", "inputs": ["0x08"] },
63
+ { "op": "impact", "guard": "0x01", "inputs": ["0x12", "0x04"] },
64
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
65
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
66
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "-0x01"] },
67
+ { "op": "impact", "guard": "0x01", "inputs": ["0x14"] },
68
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa2"] },
69
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
70
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
71
+ { "op": "impact", "guard": "0x01", "inputs": ["0x80", "0x01", "0x01", "0x08"] },
72
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x06", "0x01", "0x20", "0x20", "0x01", "0x20", "0x20", "0x01", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "0x00", "%recipient.0", "%recipient.1"] },
73
+ { "op": "impact", "guard": "0x01", "inputs": ["0x31"] },
74
+ { "op": "impact", "guard": "0x01", "inputs": ["0x31"] },
75
+ { "op": "impact", "guard": "0x01", "inputs": ["0x18"] },
76
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x10", "%credit.6"] },
77
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] },
78
+ { "op": "impact", "guard": "0x01", "inputs": ["0x08"] },
79
+ { "op": "impact", "guard": "0x01", "inputs": ["0x12", "0x04"] },
80
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
81
+ { "op": "impact", "guard": "0x01", "inputs": ["0x32"] },
82
+ { "op": "impact", "guard": "0x01", "inputs": ["0x60", "-0x01"] },
83
+ { "op": "impact", "guard": "0x01", "inputs": ["0x14"] },
84
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa2"] },
85
+ { "op": "impact", "guard": "0x01", "inputs": ["0x40"] }
86
+ ]
87
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "version": { "major": 3, "minor": 1 },
3
+ "do_communications_commitment": true,
4
+ "inputs": [
5
+ { "name": "%salt.0", "type": "Scalar<BLS12-381>" },
6
+ { "name": "%salt.1", "type": "Scalar<BLS12-381>" },
7
+ { "name": "%price.2", "type": "Scalar<BLS12-381>" },
8
+ { "name": "%owner.3", "type": "Scalar<BLS12-381>" },
9
+ { "name": "%owner.4", "type": "Scalar<BLS12-381>" }
10
+ ],
11
+ "outputs": [
12
+ ],
13
+ "instructions": [
14
+ { "op": "constrain_bits", "val": "%salt.0", "bits": 8 },
15
+ { "op": "constrain_bits", "val": "%salt.1", "bits": 248 },
16
+ { "op": "constrain_bits", "val": "%price.2", "bits": 64 },
17
+ { "op": "constrain_bits", "val": "%owner.3", "bits": 8 },
18
+ { "op": "constrain_bits", "val": "%owner.4", "bits": 248 },
19
+ { "op": "less_than", "output": "%t.5", "a": "0x00", "b": "%price.2", "bits": 64 },
20
+ { "op": "assert", "cond": "%t.5" },
21
+ { "op": "test_eq", "output": "%t.6", "a": "%owner.3", "b": "0x00" },
22
+ { "op": "test_eq", "output": "%t.7", "a": "%owner.4", "b": "0x00" },
23
+ { "op": "cond_select", "output": "%t.8", "bit": "%t.6", "a": "%t.7", "b": "0x00" },
24
+ { "op": "cond_select", "output": "%t.9", "bit": "%t.8", "a": "0x00", "b": "0x01" },
25
+ { "op": "assert", "cond": "%t.9" },
26
+ { "op": "div_mod_power_of_two", "outputs": ["%t.10", "%t.11"], "val": "%price.2", "bits": 248 },
27
+ { "op": "persistent_hash", "output": "%bytes.12", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": ["0x00", "0x6d3430323a7369643a7631", "%owner.3", "%owner.4", "%salt.0", "%salt.1", "%t.10", "%t.11"] },
28
+ { "op": "bytes_into_natives", "outputs": ["%serviceId.13", "%serviceId.14"], "bytes": "%bytes.12" },
29
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.15", "guard": null },
30
+ { "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
31
+ { "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x01", "0x00"] },
32
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%serviceId.14", "%serviceId.13"] },
33
+ { "op": "impact", "guard": "0x01", "inputs": ["0x18"] },
34
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x01", "%t.15"] },
35
+ { "op": "cond_select", "output": "%t.16", "bit": "%t.15", "a": "0x00", "b": "0x01" },
36
+ { "op": "assert", "cond": "%t.16" },
37
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.17", "guard": null },
38
+ { "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
39
+ { "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x01", "0x01"] },
40
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%serviceId.14", "%serviceId.13"] },
41
+ { "op": "impact", "guard": "0x01", "inputs": ["0x18"] },
42
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x01", "%t.17"] },
43
+ { "op": "cond_select", "output": "%t.18", "bit": "%t.17", "a": "0x00", "b": "0x01" },
44
+ { "op": "assert", "cond": "%t.18" },
45
+ { "op": "impact", "guard": "0x01", "inputs": ["0x70", "0x01", "0x01", "0x00"] },
46
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%serviceId.14", "%serviceId.13"] },
47
+ { "op": "impact", "guard": "0x01", "inputs": ["0x11", "0x01", "0x01", "0x08", "%price.2"] },
48
+ { "op": "impact", "guard": "0x01", "inputs": ["0x91"] },
49
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa1"] },
50
+ { "op": "impact", "guard": "0x01", "inputs": ["0x70", "0x01", "0x01", "0x01"] },
51
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%serviceId.14", "%serviceId.13"] },
52
+ { "op": "impact", "guard": "0x01", "inputs": ["0x11", "0x01", "0x01", "0x20", "%owner.3", "%owner.4"] },
53
+ { "op": "impact", "guard": "0x01", "inputs": ["0x91"] },
54
+ { "op": "impact", "guard": "0x01", "inputs": ["0xa1"] }
55
+ ]
56
+ }