@orbinum/circuits 0.8.0 → 0.9.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 +6 -6
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/manifest.json +31 -31
- package/package.json +1 -1
- package/private_link_pk.ark +0 -0
- package/private_link_pk.zkey +0 -0
- package/transfer_pk.ark +0 -0
- package/transfer_pk.zkey +0 -0
- package/unshield_pk.ark +0 -0
- package/unshield_pk.zkey +0 -0
- package/value_proof.r1cs +0 -0
- package/value_proof.wasm +0 -0
- package/value_proof_pk.ark +0 -0
- package/value_proof_pk.zkey +0 -0
- package/verification_key_private_link.json +4 -4
- package/verification_key_transfer.json +4 -4
- package/verification_key_unshield.json +4 -4
- package/{verification_key_disclosure.json → verification_key_value_proof.json} +15 -35
- package/disclosure.r1cs +0 -0
- package/disclosure.wasm +0 -0
- package/disclosure_pk.ark +0 -0
- package/disclosure_pk.zkey +0 -0
package/README.md
CHANGED
|
@@ -13,9 +13,9 @@ npm install @orbinum/circuits
|
|
|
13
13
|
|
|
14
14
|
## 📦 Package Contents
|
|
15
15
|
|
|
16
|
-
This package includes **20 files** for 4 circuits (
|
|
16
|
+
This package includes **20 files** for 4 circuits (value_proof, transfer, unshield, private_link):
|
|
17
17
|
|
|
18
|
-
### For Each Circuit (
|
|
18
|
+
### For Each Circuit (value_proof, transfer, unshield, private_link):
|
|
19
19
|
|
|
20
20
|
1. **`{circuit}.wasm`** - Witness calculator (4 files)
|
|
21
21
|
2. **`{circuit}.r1cs`** - R1CS constraint system — for custom provers / verification (4 files)
|
|
@@ -33,7 +33,7 @@ import { readFileSync } from "fs";
|
|
|
33
33
|
import { getCircuitPaths } from "@orbinum/circuits";
|
|
34
34
|
|
|
35
35
|
// Get all paths for a circuit
|
|
36
|
-
const paths = getCircuitPaths("transfer"); // '
|
|
36
|
+
const paths = getCircuitPaths("transfer"); // 'value_proof' | 'transfer' | 'unshield' | 'private_link'
|
|
37
37
|
|
|
38
38
|
// Load WASM witness calculator
|
|
39
39
|
const wasmBuffer = readFileSync(paths.wasm);
|
|
@@ -73,9 +73,9 @@ import verificationKey from "@orbinum/circuits/verification_key_transfer.json";
|
|
|
73
73
|
|
|
74
74
|
## 📋 Available Circuits
|
|
75
75
|
|
|
76
|
-
### 1. **
|
|
76
|
+
### 1. **Value Proof** (`value_proof_*`)
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
Proves that a note commitment encodes exactly the declared relay fee amount. Used by `pallet-shielded-pool::claim_shielded_fees` to prevent inflation attacks. `CircuitId = 6`.
|
|
79
79
|
|
|
80
80
|
### 2. **Transfer** (`transfer_*`)
|
|
81
81
|
|
|
@@ -100,7 +100,7 @@ Proves linkage between two commitments without revealing their values.
|
|
|
100
100
|
import { generateProof, CircuitType } from "@orbinum/proof-generator";
|
|
101
101
|
|
|
102
102
|
// Proof generator automatically loads circuits from @orbinum/circuits
|
|
103
|
-
const result = await generateProof(CircuitType.
|
|
103
|
+
const result = await generateProof(CircuitType.ValueProof, witnessInputs, numPublicSignals);
|
|
104
104
|
|
|
105
105
|
console.log("Proof:", result.proof);
|
|
106
106
|
console.log("Public signals:", result.publicSignals);
|
package/index.d.ts
CHANGED
|
@@ -16,12 +16,12 @@ export interface CircuitPaths {
|
|
|
16
16
|
* Get paths to all files for a specific circuit
|
|
17
17
|
*/
|
|
18
18
|
export function getCircuitPaths(
|
|
19
|
-
circuit: "
|
|
19
|
+
circuit: "value_proof" | "transfer" | "unshield" | "private_link"
|
|
20
20
|
): CircuitPaths;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Available circuits
|
|
24
24
|
*/
|
|
25
|
-
export type CircuitType = "
|
|
25
|
+
export type CircuitType = "value_proof" | "transfer" | "unshield" | "private_link";
|
|
26
26
|
|
|
27
27
|
export const CIRCUITS: CircuitType[];
|
package/index.js
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
const { join } = require("path");
|
|
8
8
|
|
|
9
|
-
const CIRCUITS = ["
|
|
9
|
+
const CIRCUITS = ["value_proof", "transfer", "unshield", "private_link"];
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Get paths to all files for a specific circuit
|
|
13
|
-
* @param {string} circuit - Circuit name: '
|
|
13
|
+
* @param {string} circuit - Circuit name: 'value_proof', 'transfer', 'unshield', or 'private_link'
|
|
14
14
|
* @returns {Object} Paths to circuit files
|
|
15
15
|
*/
|
|
16
16
|
function getCircuitPaths(circuit) {
|
package/manifest.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "1.0.0",
|
|
3
3
|
"package_name": "orbinum-circuits",
|
|
4
|
-
"package_version": "0.
|
|
5
|
-
"generated_at": "2026-05-
|
|
4
|
+
"package_version": "0.9.0",
|
|
5
|
+
"generated_at": "2026-05-15T00:47:47.349Z",
|
|
6
6
|
"circuits": {
|
|
7
|
-
"
|
|
7
|
+
"value_proof": {
|
|
8
8
|
"active_version": 1,
|
|
9
9
|
"supported_versions": [
|
|
10
10
|
1
|
|
@@ -12,31 +12,31 @@
|
|
|
12
12
|
"versions": {
|
|
13
13
|
"1": {
|
|
14
14
|
"version": 1,
|
|
15
|
-
"vk_hash": "
|
|
15
|
+
"vk_hash": "0xf41f066457790f413e7dcd2ef45fd38be21d58fd77980e08eaee2ececa6352a9",
|
|
16
16
|
"artifacts": {
|
|
17
17
|
"wasm": {
|
|
18
|
-
"file": "
|
|
19
|
-
"localPath": "build/
|
|
20
|
-
"bytes":
|
|
21
|
-
"sha256": "
|
|
18
|
+
"file": "value_proof.wasm",
|
|
19
|
+
"localPath": "build/value_proof_js/value_proof.wasm",
|
|
20
|
+
"bytes": 2218540,
|
|
21
|
+
"sha256": "4c90956e63260626f069fbf43dcc08d3220d2b745f6ba10306aec403966e8f37"
|
|
22
22
|
},
|
|
23
23
|
"zkey": {
|
|
24
|
-
"file": "
|
|
25
|
-
"localPath": "keys/
|
|
26
|
-
"bytes":
|
|
27
|
-
"sha256": "
|
|
24
|
+
"file": "value_proof_pk.zkey",
|
|
25
|
+
"localPath": "keys/value_proof_pk.zkey",
|
|
26
|
+
"bytes": 548348,
|
|
27
|
+
"sha256": "e637eeeca081ee5ecff2779ddfe17a583677cd682ec88bc776a661862e7138f9"
|
|
28
28
|
},
|
|
29
29
|
"vk_json": {
|
|
30
|
-
"file": "
|
|
31
|
-
"localPath": "build/
|
|
32
|
-
"bytes":
|
|
33
|
-
"sha256": "
|
|
30
|
+
"file": "verification_key_value_proof.json",
|
|
31
|
+
"localPath": "build/verification_key_value_proof.json",
|
|
32
|
+
"bytes": 3472,
|
|
33
|
+
"sha256": "f41f066457790f413e7dcd2ef45fd38be21d58fd77980e08eaee2ececa6352a9"
|
|
34
34
|
},
|
|
35
35
|
"r1cs": {
|
|
36
|
-
"file": "
|
|
37
|
-
"localPath": "build/
|
|
38
|
-
"bytes":
|
|
39
|
-
"sha256": "
|
|
36
|
+
"file": "value_proof.r1cs",
|
|
37
|
+
"localPath": "build/value_proof.r1cs",
|
|
38
|
+
"bytes": 157776,
|
|
39
|
+
"sha256": "07673eac319aa6fe620a58338d33bbf2f53f99b9e0deb906727c5f82aa790654"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"versions": {
|
|
51
51
|
"1": {
|
|
52
52
|
"version": 1,
|
|
53
|
-
"vk_hash": "
|
|
53
|
+
"vk_hash": "0xec018f63fd9f908b240276022ef002bcd0b0c30cf3c69bd58a6be3ff2b0f3dbd",
|
|
54
54
|
"artifacts": {
|
|
55
55
|
"wasm": {
|
|
56
56
|
"file": "transfer.wasm",
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
"file": "transfer_pk.zkey",
|
|
63
63
|
"localPath": "keys/transfer_pk.zkey",
|
|
64
64
|
"bytes": 17247624,
|
|
65
|
-
"sha256": "
|
|
65
|
+
"sha256": "b652829c41363101c3c719527b528cc699b7c989add3bbcc0737638f55cf2793"
|
|
66
66
|
},
|
|
67
67
|
"vk_json": {
|
|
68
68
|
"file": "verification_key_transfer.json",
|
|
69
69
|
"localPath": "build/verification_key_transfer.json",
|
|
70
70
|
"bytes": 4021,
|
|
71
|
-
"sha256": "
|
|
71
|
+
"sha256": "ec018f63fd9f908b240276022ef002bcd0b0c30cf3c69bd58a6be3ff2b0f3dbd"
|
|
72
72
|
},
|
|
73
73
|
"r1cs": {
|
|
74
74
|
"file": "transfer.r1cs",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"versions": {
|
|
89
89
|
"1": {
|
|
90
90
|
"version": 1,
|
|
91
|
-
"vk_hash": "
|
|
91
|
+
"vk_hash": "0x1d06bd7fdbad7c6e15438a56dd6a174e73b18cd1826f197874c11a904980c217",
|
|
92
92
|
"artifacts": {
|
|
93
93
|
"wasm": {
|
|
94
94
|
"file": "unshield.wasm",
|
|
@@ -100,13 +100,13 @@
|
|
|
100
100
|
"file": "unshield_pk.zkey",
|
|
101
101
|
"localPath": "keys/unshield_pk.zkey",
|
|
102
102
|
"bytes": 8653108,
|
|
103
|
-
"sha256": "
|
|
103
|
+
"sha256": "6f749c532da26b665582c9a8465fa3c2a878d8705f9b99395a5ec52bb72e8557"
|
|
104
104
|
},
|
|
105
105
|
"vk_json": {
|
|
106
106
|
"file": "verification_key_unshield.json",
|
|
107
107
|
"localPath": "build/verification_key_unshield.json",
|
|
108
|
-
"bytes":
|
|
109
|
-
"sha256": "
|
|
108
|
+
"bytes": 4029,
|
|
109
|
+
"sha256": "1d06bd7fdbad7c6e15438a56dd6a174e73b18cd1826f197874c11a904980c217"
|
|
110
110
|
},
|
|
111
111
|
"r1cs": {
|
|
112
112
|
"file": "unshield.r1cs",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"versions": {
|
|
127
127
|
"1": {
|
|
128
128
|
"version": 1,
|
|
129
|
-
"vk_hash": "
|
|
129
|
+
"vk_hash": "0x43553f2707d140b3147a4154303cebe92368f15055eaf12a21c68ae439e3e169",
|
|
130
130
|
"artifacts": {
|
|
131
131
|
"wasm": {
|
|
132
132
|
"file": "private_link.wasm",
|
|
@@ -138,13 +138,13 @@
|
|
|
138
138
|
"file": "private_link_pk.zkey",
|
|
139
139
|
"localPath": "keys/private_link_pk.zkey",
|
|
140
140
|
"bytes": 508588,
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "45a3318e6de10b62ef78acc0950ace5f150f786fdb1ba547d405796705ae9c32"
|
|
142
142
|
},
|
|
143
143
|
"vk_json": {
|
|
144
144
|
"file": "verification_key_private_link.json",
|
|
145
145
|
"localPath": "build/verification_key_private_link.json",
|
|
146
|
-
"bytes":
|
|
147
|
-
"sha256": "
|
|
146
|
+
"bytes": 3110,
|
|
147
|
+
"sha256": "43553f2707d140b3147a4154303cebe92368f15055eaf12a21c68ae439e3e169"
|
|
148
148
|
},
|
|
149
149
|
"r1cs": {
|
|
150
150
|
"file": "private_link.r1cs",
|
package/package.json
CHANGED
package/private_link_pk.ark
CHANGED
|
Binary file
|
package/private_link_pk.zkey
CHANGED
|
Binary file
|
package/transfer_pk.ark
CHANGED
|
Binary file
|
package/transfer_pk.zkey
CHANGED
|
Binary file
|
package/unshield_pk.ark
CHANGED
|
Binary file
|
package/unshield_pk.zkey
CHANGED
|
Binary file
|
package/value_proof.r1cs
ADDED
|
Binary file
|
package/value_proof.wasm
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
],
|
|
38
38
|
"vk_delta_2": [
|
|
39
39
|
[
|
|
40
|
-
"
|
|
41
|
-
"
|
|
40
|
+
"2648097708245870178322838414355862301072149638583622491129595013993670878555",
|
|
41
|
+
"20087493611208700853368990683433291569846694869844075966219510124238911177238"
|
|
42
42
|
],
|
|
43
43
|
[
|
|
44
|
-
"
|
|
45
|
-
"
|
|
44
|
+
"19370675910157654876286951996146183414580203989017949496675508993995569865929",
|
|
45
|
+
"12027021552716565424899095588411340654101034836462264238411776932900778681685"
|
|
46
46
|
],
|
|
47
47
|
[
|
|
48
48
|
"1",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
],
|
|
38
38
|
"vk_delta_2": [
|
|
39
39
|
[
|
|
40
|
-
"
|
|
41
|
-
"
|
|
40
|
+
"581393450293757967252160877171191343156147346173044747308327683692624288826",
|
|
41
|
+
"1852000191630397462545507899866340208803286469977946562314969880666353603643"
|
|
42
42
|
],
|
|
43
43
|
[
|
|
44
|
-
"
|
|
45
|
-
"
|
|
44
|
+
"17994501441191352999536351383251178578243368026804766532527573952736572459354",
|
|
45
|
+
"13478030058384899268211515295837842357811694799875877361342617665731248633017"
|
|
46
46
|
],
|
|
47
47
|
[
|
|
48
48
|
"1",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
],
|
|
38
38
|
"vk_delta_2": [
|
|
39
39
|
[
|
|
40
|
-
"
|
|
41
|
-
"
|
|
40
|
+
"9897987154946819132514248906343283578002388170270425036403706618308763148432",
|
|
41
|
+
"13076945533434923819258129537978484420655845664645001091575689648556615201858"
|
|
42
42
|
],
|
|
43
43
|
[
|
|
44
|
-
"
|
|
45
|
-
"
|
|
44
|
+
"21774836763195830287058313613430895523054306603367819969473786235716624314916",
|
|
45
|
+
"16219916205201749168913445616389324692520292716295795210383496516133301928230"
|
|
46
46
|
],
|
|
47
47
|
[
|
|
48
48
|
"1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"protocol": "groth16",
|
|
3
3
|
"curve": "bn128",
|
|
4
|
-
"nPublic":
|
|
4
|
+
"nPublic": 4,
|
|
5
5
|
"vk_alpha_1": [
|
|
6
6
|
"20491192805390485299153009773594534940189261866228447918068658471970481763042",
|
|
7
7
|
"9383485363053290200918347156157836566562967994039712273449902621266178545958",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
],
|
|
38
38
|
"vk_delta_2": [
|
|
39
39
|
[
|
|
40
|
-
"
|
|
41
|
-
"
|
|
40
|
+
"646942802216631029806360372266115819540193639926699029591987285422859097245",
|
|
41
|
+
"4554849292412865403391728867144775959507647856270708870992926066736528987363"
|
|
42
42
|
],
|
|
43
43
|
[
|
|
44
|
-
"
|
|
45
|
-
"
|
|
44
|
+
"18492317332544818923471317059291841325938032970676873677922861675936750204397",
|
|
45
|
+
"19340800950231071673375220841984784069577459679420291149210652181329105831868"
|
|
46
46
|
],
|
|
47
47
|
[
|
|
48
48
|
"1",
|
|
@@ -81,48 +81,28 @@
|
|
|
81
81
|
],
|
|
82
82
|
"IC": [
|
|
83
83
|
[
|
|
84
|
-
"
|
|
85
|
-
"
|
|
84
|
+
"9828157877087779081440111438673087207249043783612944265861570921444915759748",
|
|
85
|
+
"9786644308034544115433485225427578177977085108945709963515044799347220707026",
|
|
86
86
|
"1"
|
|
87
87
|
],
|
|
88
88
|
[
|
|
89
|
-
"
|
|
90
|
-
"
|
|
89
|
+
"1678531490709055963678159839742311665234734100281691152847191859939285463541",
|
|
90
|
+
"13923388915221023387399767948428353368793404263032785566014206335968827459832",
|
|
91
91
|
"1"
|
|
92
92
|
],
|
|
93
93
|
[
|
|
94
|
-
"
|
|
95
|
-
"
|
|
94
|
+
"8175216634647922915379480779073567738146251861644869086227578169386062581291",
|
|
95
|
+
"4437420056651891857840182388463775002291697446381807273163481567993680849540",
|
|
96
96
|
"1"
|
|
97
97
|
],
|
|
98
98
|
[
|
|
99
|
-
"
|
|
100
|
-
"
|
|
99
|
+
"18897664504538107250890893665343672545730383722496960226640421263163712416709",
|
|
100
|
+
"17808018269433335352640665210410493788089126622706198275044265884768956331861",
|
|
101
101
|
"1"
|
|
102
102
|
],
|
|
103
103
|
[
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"1"
|
|
107
|
-
],
|
|
108
|
-
[
|
|
109
|
-
"20475326598501536296244931775653325558369290595160381135112671255279084796292",
|
|
110
|
-
"15121692801977077446282580314885127872721192561453068106520254028442576211205",
|
|
111
|
-
"1"
|
|
112
|
-
],
|
|
113
|
-
[
|
|
114
|
-
"19790324910080402948605791132906830411850038389575187987723045276094836923388",
|
|
115
|
-
"15991412527590129797047291580899977992011731178315758544087666837838703530805",
|
|
116
|
-
"1"
|
|
117
|
-
],
|
|
118
|
-
[
|
|
119
|
-
"6518312947605997092204522796463375336907088220824695357448540602349025568038",
|
|
120
|
-
"6245942633484978523208279994852290961431671862189601579141680339949411948007",
|
|
121
|
-
"1"
|
|
122
|
-
],
|
|
123
|
-
[
|
|
124
|
-
"12131659410204950278220496215316173478012577648746552219524808314921349683985",
|
|
125
|
-
"4641373322158881618550990458588801207085067242516629553293598428230020333544",
|
|
104
|
+
"14956276423447202699762132623597091387907026553537112590981282489906614211666",
|
|
105
|
+
"2939537181469153455930817392811198610278447886649727973868681299780159909983",
|
|
126
106
|
"1"
|
|
127
107
|
]
|
|
128
108
|
]
|
package/disclosure.r1cs
DELETED
|
Binary file
|
package/disclosure.wasm
DELETED
|
Binary file
|
package/disclosure_pk.ark
DELETED
|
Binary file
|
package/disclosure_pk.zkey
DELETED
|
Binary file
|