@sig-net/midnight-contract 0.0.9 → 0.11.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.
Files changed (23) hide show
  1. package/README.md +1 -1
  2. package/dist/managed/compiler/contract-info.json +173 -87
  3. package/dist/managed/compiler/contract-manifest.json +34 -34
  4. package/dist/managed/contract/index.d.ts +98 -76
  5. package/dist/managed/contract/index.js +157 -127
  6. package/dist/managed/contract/index.js.map +1 -1
  7. package/dist/managed/keys/{postRespondBidirectional.prover → respondBidirectional.prover} +0 -0
  8. package/dist/managed/keys/respondBidirectional.verifier +0 -0
  9. package/dist/managed/zkir/respondBidirectional.bzkir +0 -0
  10. package/dist/managed/zkir/{postRespondBidirectional.zkir → respondBidirectional.zkir} +17 -13
  11. package/dist/witnesses.js +3 -3
  12. package/dist/witnesses.js.map +1 -1
  13. package/package.json +2 -2
  14. package/dist/managed/keys/postRespondBidirectional.verifier +0 -0
  15. package/dist/managed/zkir/postRespondBidirectional.bzkir +0 -0
  16. /package/dist/managed/keys/{postSignatureResponse.prover → respond.prover} +0 -0
  17. /package/dist/managed/keys/{postSignatureResponse.verifier → respond.verifier} +0 -0
  18. /package/dist/managed/keys/{signBidirectionalEvent.prover → signBidirectional.prover} +0 -0
  19. /package/dist/managed/keys/{signBidirectionalEvent.verifier → signBidirectional.verifier} +0 -0
  20. /package/dist/managed/zkir/{postSignatureResponse.bzkir → respond.bzkir} +0 -0
  21. /package/dist/managed/zkir/{postSignatureResponse.zkir → respond.zkir} +0 -0
  22. /package/dist/managed/zkir/{signBidirectionalEvent.bzkir → signBidirectional.bzkir} +0 -0
  23. /package/dist/managed/zkir/{signBidirectionalEvent.zkir → signBidirectional.zkir} +0 -0
@@ -14,7 +14,9 @@
14
14
  { "name": "%respondBidirectionalEvent.9", "type": "Scalar<BLS12-381>" },
15
15
  { "name": "%respondBidirectionalEvent.10", "type": "Scalar<BLS12-381>" },
16
16
  { "name": "%respondBidirectionalEvent.11", "type": "Scalar<BLS12-381>" },
17
- { "name": "%respondBidirectionalEvent.12", "type": "Scalar<BLS12-381>" }
17
+ { "name": "%respondBidirectionalEvent.12", "type": "Scalar<BLS12-381>" },
18
+ { "name": "%respondBidirectionalEvent.13", "type": "Scalar<BLS12-381>" },
19
+ { "name": "%respondBidirectionalEvent.14", "type": "Scalar<BLS12-381>" }
18
20
  ],
19
21
  "outputs": [
20
22
  ],
@@ -32,28 +34,30 @@
32
34
  { "op": "constrain_bits", "val": "%respondBidirectionalEvent.10", "bits": 8 },
33
35
  { "op": "constrain_bits", "val": "%respondBidirectionalEvent.11", "bits": 248 },
34
36
  { "op": "constrain_bits", "val": "%respondBidirectionalEvent.12", "bits": 8 },
35
- { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.13", "guard": null },
37
+ { "op": "constrain_bits", "val": "%respondBidirectionalEvent.13", "bits": 248 },
38
+ { "op": "constrain_bits", "val": "%respondBidirectionalEvent.14", "bits": 8 },
39
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%t.15", "guard": null },
36
40
  { "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
37
41
  { "op": "impact", "guard": "0x01", "inputs": ["0x50", "0x01", "0x01", "0x04"] },
38
42
  { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x01", "0x20", "%requestId.0", "%requestId.1"] },
39
43
  { "op": "impact", "guard": "0x01", "inputs": ["0x18"] },
40
- { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x01", "%t.13"] },
41
- { "op": "cond_select", "output": "%t.14", "bit": "%t.13", "a": "0x00", "b": "0x01" },
42
- { "op": "impact", "guard": "%t.14", "inputs": ["0x70", "0x01", "0x01", "0x04"] },
43
- { "op": "impact", "guard": "%t.14", "inputs": ["0x10", "0x01", "0x01", "0x20", "%requestId.0", "%requestId.1"] },
44
- { "op": "impact", "guard": "%t.14", "inputs": ["0x11", "0x01", "0x01", "0x08", "0x00"] },
45
- { "op": "impact", "guard": "%t.14", "inputs": ["0x91"] },
46
- { "op": "impact", "guard": "%t.14", "inputs": ["0xa1"] },
47
- { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%count.15", "guard": null },
44
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x01", "%t.15"] },
45
+ { "op": "cond_select", "output": "%t.16", "bit": "%t.15", "a": "0x00", "b": "0x01" },
46
+ { "op": "impact", "guard": "%t.16", "inputs": ["0x70", "0x01", "0x01", "0x04"] },
47
+ { "op": "impact", "guard": "%t.16", "inputs": ["0x10", "0x01", "0x01", "0x20", "%requestId.0", "%requestId.1"] },
48
+ { "op": "impact", "guard": "%t.16", "inputs": ["0x11", "0x01", "0x01", "0x08", "0x00"] },
49
+ { "op": "impact", "guard": "%t.16", "inputs": ["0x91"] },
50
+ { "op": "impact", "guard": "%t.16", "inputs": ["0xa1"] },
51
+ { "op": "public_input", "type": "Scalar<BLS12-381>", "output": "%count.17", "guard": null },
48
52
  { "op": "impact", "guard": "0x01", "inputs": ["0x30"] },
49
53
  { "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.15"] },
54
+ { "op": "impact", "guard": "0x01", "inputs": ["0x0d", "0x01", "0x08", "%count.17"] },
51
55
  { "op": "impact", "guard": "0x01", "inputs": ["0x71", "0x01", "0x01", "0x04", "0x01", "0x20", "%requestId.0", "%requestId.1"] },
52
56
  { "op": "impact", "guard": "0x01", "inputs": ["0x0e", "0x01"] },
53
57
  { "op": "impact", "guard": "0x01", "inputs": ["0xa2"] },
54
58
  { "op": "impact", "guard": "0x01", "inputs": ["0x70", "0x01", "0x01", "0x05"] },
55
- { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x02", "0x08", "0x20", "%count.15", "%requestId.0", "%requestId.1"] },
56
- { "op": "impact", "guard": "0x01", "inputs": ["0x11", "0x01", "0x05", "0x80", "0x01", "0x20", "0x20", "0x01", "%respondBidirectionalEvent.2", "%respondBidirectionalEvent.3", "%respondBidirectionalEvent.4", "%respondBidirectionalEvent.5", "%respondBidirectionalEvent.6", "%respondBidirectionalEvent.7", "%respondBidirectionalEvent.8", "%respondBidirectionalEvent.9", "%respondBidirectionalEvent.10", "%respondBidirectionalEvent.11", "%respondBidirectionalEvent.12"] },
59
+ { "op": "impact", "guard": "0x01", "inputs": ["0x10", "0x01", "0x02", "0x08", "0x20", "%count.17", "%requestId.0", "%requestId.1"] },
60
+ { "op": "impact", "guard": "0x01", "inputs": ["0x11", "0x01", "0x06", "0x80", "0x01", "0x20", "0x20", "0x20", "0x01", "%respondBidirectionalEvent.2", "%respondBidirectionalEvent.3", "%respondBidirectionalEvent.4", "%respondBidirectionalEvent.5", "%respondBidirectionalEvent.6", "%respondBidirectionalEvent.7", "%respondBidirectionalEvent.8", "%respondBidirectionalEvent.9", "%respondBidirectionalEvent.10", "%respondBidirectionalEvent.11", "%respondBidirectionalEvent.12", "%respondBidirectionalEvent.13", "%respondBidirectionalEvent.14"] },
57
61
  { "op": "impact", "guard": "0x01", "inputs": ["0x91"] },
58
62
  { "op": "impact", "guard": "0x01", "inputs": ["0xa1"] }
59
63
  ]
package/dist/witnesses.js CHANGED
@@ -1,6 +1,6 @@
1
- // The signet contract has no witnesses: Schnorr verification is
2
- // CompactStandardLibrary's `jubjubSchnorrVerify` (fully in-circuit), and
3
- // there is no private state — posting carries no caller secrets.
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
  *
@@ -1 +1 @@
1
- {"version":3,"file":"witnesses.js","sourceRoot":"","sources":["../src/witnesses.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,iEAAiE;AAOjE;;;;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"}
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.0.9",
3
+ "version": "0.11.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sig-net/midnight-integration",
@@ -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.0.9",
45
+ "@sig-net/midnight": "^0.11.0",
46
46
  "@types/node": "^26.1.0",
47
47
  "typescript": "^6.0.3",
48
48
  "vitest": "^4.1.9"