@sig-net/midnight-contract 0.10.0 → 0.12.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.
- package/README.md +4 -4
- package/dist/managed/compiler/contract-info.json +175 -103
- package/dist/managed/compiler/contract-manifest.json +34 -34
- package/dist/managed/contract/index.d.ts +97 -80
- package/dist/managed/contract/index.js +161 -132
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/managed/keys/{postRespondBidirectional.prover → respondBidirectional.prover} +0 -0
- package/dist/managed/keys/respondBidirectional.verifier +0 -0
- package/dist/managed/zkir/respondBidirectional.bzkir +0 -0
- package/dist/managed/zkir/{postRespondBidirectional.zkir → respondBidirectional.zkir} +17 -21
- package/dist/witnesses.js +3 -3
- package/dist/witnesses.js.map +1 -1
- package/package.json +3 -3
- package/dist/managed/keys/postRespondBidirectional.verifier +0 -0
- package/dist/managed/zkir/postRespondBidirectional.bzkir +0 -0
- /package/dist/managed/keys/{postSignatureResponse.prover → respond.prover} +0 -0
- /package/dist/managed/keys/{postSignatureResponse.verifier → respond.verifier} +0 -0
- /package/dist/managed/keys/{signBidirectionalEvent.prover → signBidirectional.prover} +0 -0
- /package/dist/managed/keys/{signBidirectionalEvent.verifier → signBidirectional.verifier} +0 -0
- /package/dist/managed/zkir/{postSignatureResponse.bzkir → respond.bzkir} +0 -0
- /package/dist/managed/zkir/{postSignatureResponse.zkir → respond.zkir} +0 -0
- /package/dist/managed/zkir/{signBidirectionalEvent.bzkir → signBidirectional.bzkir} +0 -0
- /package/dist/managed/zkir/{signBidirectionalEvent.zkir → signBidirectional.zkir} +0 -0
|
@@ -12,48 +12,44 @@
|
|
|
12
12
|
{ "name": "%respondBidirectionalEvent.7", "type": "Scalar<BLS12-381>" },
|
|
13
13
|
{ "name": "%respondBidirectionalEvent.8", "type": "Scalar<BLS12-381>" },
|
|
14
14
|
{ "name": "%respondBidirectionalEvent.9", "type": "Scalar<BLS12-381>" },
|
|
15
|
-
{ "name": "%respondBidirectionalEvent.10", "type": "Scalar<BLS12-381>" }
|
|
16
|
-
{ "name": "%respondBidirectionalEvent.11", "type": "Scalar<BLS12-381>" },
|
|
17
|
-
{ "name": "%respondBidirectionalEvent.12", "type": "Scalar<BLS12-381>" }
|
|
15
|
+
{ "name": "%respondBidirectionalEvent.10", "type": "Scalar<BLS12-381>" }
|
|
18
16
|
],
|
|
19
17
|
"outputs": [
|
|
20
18
|
],
|
|
21
19
|
"instructions": [
|
|
22
20
|
{ "op": "constrain_bits", "val": "%requestId.0", "bits": 8 },
|
|
23
21
|
{ "op": "constrain_bits", "val": "%requestId.1", "bits": 248 },
|
|
24
|
-
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.2", "bits":
|
|
22
|
+
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.2", "bits": 8 },
|
|
25
23
|
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.3", "bits": 248 },
|
|
26
|
-
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.4", "bits":
|
|
24
|
+
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.4", "bits": 8 },
|
|
27
25
|
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.5", "bits": 248 },
|
|
28
|
-
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.6", "bits":
|
|
29
|
-
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.7", "bits":
|
|
26
|
+
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.6", "bits": 8 },
|
|
27
|
+
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.7", "bits": 248 },
|
|
30
28
|
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.8", "bits": 8 },
|
|
31
29
|
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.9", "bits": 248 },
|
|
32
30
|
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.10", "bits": 8 },
|
|
33
|
-
{ "op": "
|
|
34
|
-
{ "op": "constrain_bits", "val": "%respondBidirectionalEvent.12", "bits": 8 },
|
|
35
|
-
{ "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.13", "guard": null },
|
|
31
|
+
{ "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.11", "guard": null },
|
|
36
32
|
{ "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
|
|
37
33
|
{ "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x01", "0x04"] },
|
|
38
34
|
{ "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%requestId.0", "%requestId.1"] },
|
|
39
35
|
{ "op": "impact", "guard": "0x01", "inputs": ["0x18"] },
|
|
40
|
-
{ "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x01", "%t.
|
|
41
|
-
{ "op": "cond_select", "output": "%t.
|
|
42
|
-
{ "op": "impact", "guard": "%t.
|
|
43
|
-
{ "op": "impact", "guard": "%t.
|
|
44
|
-
{ "op": "impact", "guard": "%t.
|
|
45
|
-
{ "op": "impact", "guard": "%t.
|
|
46
|
-
{ "op": "impact", "guard": "%t.
|
|
47
|
-
{ "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%count.
|
|
36
|
+
{ "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x01", "%t.11"] },
|
|
37
|
+
{ "op": "cond_select", "output": "%t.12", "bit": "%t.11", "a": "0x00", "b": "0x01" },
|
|
38
|
+
{ "op": "impact", "guard": "%t.12", "inputs": ["0x70", "0x01", "0x01", "0x04"] },
|
|
39
|
+
{ "op": "impact", "guard": "%t.12", "inputs": ["0x10", "0x01", "0x01", "0x20", "%requestId.0", "%requestId.1"] },
|
|
40
|
+
{ "op": "impact", "guard": "%t.12", "inputs": ["0x11", "0x01", "0x01", "0x08", "0x00"] },
|
|
41
|
+
{ "op": "impact", "guard": "%t.12", "inputs": ["0x91"] },
|
|
42
|
+
{ "op": "impact", "guard": "%t.12", "inputs": ["0xa1"] },
|
|
43
|
+
{ "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%count.13", "guard": null },
|
|
48
44
|
{ "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
|
|
49
45
|
{ "op": "impact", "guard": "0x01", "inputs": ["0x51", "0x01", "0x01", "0x04", "0x01", "0x20", "%requestId.0", "%requestId.1"] },
|
|
50
|
-
{ "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x08", "%count.
|
|
46
|
+
{ "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x08", "%count.13"] },
|
|
51
47
|
{ "op": "impact", "guard": "0x01", "inputs": ["0x71", "0x01", "0x01", "0x04", "0x01", "0x20", "%requestId.0", "%requestId.1"] },
|
|
52
48
|
{ "op": "impact", "guard": "0x01", "inputs": ["0x0e", "0x01"] },
|
|
53
49
|
{ "op": "impact", "guard": "0x01", "inputs": ["0xa2"] },
|
|
54
50
|
{ "op": "impact", "guard": "0x01", "inputs": ["0x70", "0x01", "0x01", "0x05"] },
|
|
55
|
-
{ "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x02", "0x08", "0x20", "%count.
|
|
56
|
-
{ "op": "impact", "guard": "0x01", "inputs": ["0x11", "0x01", "0x05", "
|
|
51
|
+
{ "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x02", "0x08", "0x20", "%count.13", "%requestId.0", "%requestId.1"] },
|
|
52
|
+
{ "op": "impact", "guard": "0x01", "inputs": ["0x11", "0x01", "0x05", "0x20", "0x20", "0x20", "0x20", "0x01", "%respondBidirectionalEvent.2", "%respondBidirectionalEvent.3", "%respondBidirectionalEvent.4", "%respondBidirectionalEvent.5", "%respondBidirectionalEvent.6", "%respondBidirectionalEvent.7", "%respondBidirectionalEvent.8", "%respondBidirectionalEvent.9", "%respondBidirectionalEvent.10"] },
|
|
57
53
|
{ "op": "impact", "guard": "0x01", "inputs": ["0x91"] },
|
|
58
54
|
{ "op": "impact", "guard": "0x01", "inputs": ["0xa1"] }
|
|
59
55
|
]
|
package/dist/witnesses.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// The signet contract has no witnesses:
|
|
2
|
-
//
|
|
3
|
-
//
|
|
1
|
+
// The signet contract has no witnesses: it stores posts without verifying
|
|
2
|
+
// them, and there is no private state, since posting carries no caller
|
|
3
|
+
// secrets.
|
|
4
4
|
/**
|
|
5
5
|
* Build the contract's (empty) private state.
|
|
6
6
|
*
|
package/dist/witnesses.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"witnesses.js","sourceRoot":"","sources":["../src/witnesses.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"witnesses.js","sourceRoot":"","sources":["../src/witnesses.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,uEAAuE;AACvE,WAAW;AAOX;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAC3C,GAA+B,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAA0C,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sig-net/midnight-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/sig-net/midnight-integration",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"compile": "COMPACT_PATH=../../node_modules compact compile --skip-zk --feature-zkir-v3 src/signet-contract.compact src/managed",
|
|
23
23
|
"compile:zk": "COMPACT_PATH=../../node_modules compact compile --feature-zkir-v3 src/signet-contract.compact src/managed",
|
|
24
|
-
"build": "rm -rf dist && ls src/managed/keys/*.prover >/dev/null 2>&1 || { echo 'signet-contract build: no prover keys in src/managed/keys
|
|
24
|
+
"build": "rm -rf dist && ls src/managed/keys/*.prover >/dev/null 2>&1 || { echo 'signet-contract build: no prover keys in src/managed/keys, run `yarn compile:zk` first (compile uses --skip-zk)' >&2; exit 1; } && tsc -p tsconfig.json && tsc -p tsconfig.build.json && mkdir -p dist/managed && cp -R src/managed/contract src/managed/compiler src/managed/zkir src/managed/keys dist/managed/",
|
|
25
25
|
"prepack": "yarn build",
|
|
26
26
|
"test": "vitest run"
|
|
27
27
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@midnight-ntwrk/midnight-js": "5.0.0-beta.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@sig-net/midnight": "^0.
|
|
45
|
+
"@sig-net/midnight": "^0.12.0",
|
|
46
46
|
"@types/node": "^26.1.0",
|
|
47
47
|
"typescript": "^6.0.3",
|
|
48
48
|
"vitest": "^4.1.9"
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|