@orbinum/circuits 0.11.1 → 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 +7 -12
- package/index.d.ts +2 -4
- package/index.js +2 -2
- package/manifest.json +1 -39
- package/package.json +1 -1
- package/private_link.r1cs +0 -0
- package/private_link.wasm +0 -0
- package/private_link_pk.zkey +0 -0
- package/verification_key_private_link.json +0 -99
package/README.md
CHANGED
|
@@ -13,15 +13,14 @@ npm install @orbinum/circuits
|
|
|
13
13
|
|
|
14
14
|
## 📦 Package Contents
|
|
15
15
|
|
|
16
|
-
This package includes
|
|
16
|
+
This package includes the artifacts for 3 circuits (value_proof, transfer, unshield):
|
|
17
17
|
|
|
18
|
-
### For Each Circuit (value_proof, transfer, unshield
|
|
18
|
+
### For Each Circuit (value_proof, transfer, unshield):
|
|
19
19
|
|
|
20
|
-
1. **`{circuit}.wasm`** - Witness calculator
|
|
21
|
-
2. **`{circuit}.r1cs`** - R1CS constraint system — for custom provers / verification
|
|
22
|
-
3. **`{circuit}_pk.zkey`** - Proving key for snarkjs
|
|
23
|
-
4. **`{circuit}
|
|
24
|
-
5. **`verification_key_{circuit}.json`** - Verification key for on-chain verification (4 files)
|
|
20
|
+
1. **`{circuit}.wasm`** - Witness calculator
|
|
21
|
+
2. **`{circuit}.r1cs`** - R1CS constraint system — for custom provers / verification
|
|
22
|
+
3. **`{circuit}_pk.zkey`** - Proving key for snarkjs
|
|
23
|
+
4. **`verification_key_{circuit}.json`** - Verification key for on-chain verification
|
|
25
24
|
|
|
26
25
|
## 🔧 Usage
|
|
27
26
|
|
|
@@ -33,7 +32,7 @@ import { readFileSync } from "fs";
|
|
|
33
32
|
import { getCircuitPaths } from "@orbinum/circuits";
|
|
34
33
|
|
|
35
34
|
// Get all paths for a circuit
|
|
36
|
-
const paths = getCircuitPaths("transfer"); // 'value_proof' | 'transfer' | 'unshield'
|
|
35
|
+
const paths = getCircuitPaths("transfer"); // 'value_proof' | 'transfer' | 'unshield'
|
|
37
36
|
|
|
38
37
|
// Load WASM witness calculator
|
|
39
38
|
const wasmBuffer = readFileSync(paths.wasm);
|
|
@@ -85,10 +84,6 @@ Private token transfer circuit with 2 inputs and 2 outputs.
|
|
|
85
84
|
|
|
86
85
|
Withdrawal circuit from private pool to public account.
|
|
87
86
|
|
|
88
|
-
### 4. **Private Link** (`private_link_*`)
|
|
89
|
-
|
|
90
|
-
Proves linkage between two commitments without revealing their values.
|
|
91
|
-
|
|
92
87
|
## 🔗 Related Packages
|
|
93
88
|
|
|
94
89
|
- [@orbinum/proof-generator](https://www.npmjs.com/package/@orbinum/proof-generator) - High-level proof orchestrator
|
package/index.d.ts
CHANGED
|
@@ -15,13 +15,11 @@ export interface CircuitPaths {
|
|
|
15
15
|
/**
|
|
16
16
|
* Get paths to all files for a specific circuit
|
|
17
17
|
*/
|
|
18
|
-
export function getCircuitPaths(
|
|
19
|
-
circuit: "value_proof" | "transfer" | "unshield" | "private_link"
|
|
20
|
-
): CircuitPaths;
|
|
18
|
+
export function getCircuitPaths(circuit: "value_proof" | "transfer" | "unshield"): CircuitPaths;
|
|
21
19
|
|
|
22
20
|
/**
|
|
23
21
|
* Available circuits
|
|
24
22
|
*/
|
|
25
|
-
export type CircuitType = "value_proof" | "transfer" | "unshield"
|
|
23
|
+
export type CircuitType = "value_proof" | "transfer" | "unshield";
|
|
26
24
|
|
|
27
25
|
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 = ["value_proof", "transfer", "unshield"
|
|
9
|
+
const CIRCUITS = ["value_proof", "transfer", "unshield"];
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Get paths to all files for a specific circuit
|
|
13
|
-
* @param {string} circuit - Circuit name: 'value_proof', 'transfer',
|
|
13
|
+
* @param {string} circuit - Circuit name: 'value_proof', 'transfer', or 'unshield'
|
|
14
14
|
* @returns {Object} Paths to circuit files
|
|
15
15
|
*/
|
|
16
16
|
function getCircuitPaths(circuit) {
|
package/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "1.0.0",
|
|
3
3
|
"package_name": "orbinum-circuits",
|
|
4
|
-
"package_version": "0.
|
|
4
|
+
"package_version": "0.12.0",
|
|
5
5
|
"generated_at": "2026-07-07T23:50:06.547Z",
|
|
6
6
|
"circuits": {
|
|
7
7
|
"value_proof": {
|
|
@@ -117,44 +117,6 @@
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
},
|
|
121
|
-
"private_link": {
|
|
122
|
-
"active_version": 1,
|
|
123
|
-
"supported_versions": [
|
|
124
|
-
1
|
|
125
|
-
],
|
|
126
|
-
"versions": {
|
|
127
|
-
"1": {
|
|
128
|
-
"version": 1,
|
|
129
|
-
"vk_hash": "0xa6782788a6b8196f4df4550c9de46e1f3b58d0e22da07cb76a4630922e26e73d",
|
|
130
|
-
"artifacts": {
|
|
131
|
-
"wasm": {
|
|
132
|
-
"file": "private_link.wasm",
|
|
133
|
-
"localPath": "build/private_link_js/private_link.wasm",
|
|
134
|
-
"bytes": 1750902,
|
|
135
|
-
"sha256": "3190bb18260b294c2dccad6f509867a2fdd756707a3c1d10a483551e18796e08"
|
|
136
|
-
},
|
|
137
|
-
"zkey": {
|
|
138
|
-
"file": "private_link_pk.zkey",
|
|
139
|
-
"localPath": "keys/private_link_pk.zkey",
|
|
140
|
-
"bytes": 508588,
|
|
141
|
-
"sha256": "5fa4b21fc1628d5520afdb30f9521ef0e593dbb3321a3b67b9e466e04ce76f16"
|
|
142
|
-
},
|
|
143
|
-
"vk_json": {
|
|
144
|
-
"file": "verification_key_private_link.json",
|
|
145
|
-
"localPath": "build/verification_key_private_link.json",
|
|
146
|
-
"bytes": 3110,
|
|
147
|
-
"sha256": "343445ed77a1a2f805e4c3d2643d5f7cc1f50f4db65da47244f92df0c1c9720b"
|
|
148
|
-
},
|
|
149
|
-
"r1cs": {
|
|
150
|
-
"file": "private_link.r1cs",
|
|
151
|
-
"localPath": "build/private_link.r1cs",
|
|
152
|
-
"bytes": 138248,
|
|
153
|
-
"sha256": "62b38b485b501d0423580c5f217f5cc088d46ead3956097cd893358df7b3fa8c"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
120
|
}
|
|
159
121
|
}
|
|
160
122
|
}
|
package/package.json
CHANGED
package/private_link.r1cs
DELETED
|
Binary file
|
package/private_link.wasm
DELETED
|
Binary file
|
package/private_link_pk.zkey
DELETED
|
Binary file
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"protocol": "groth16",
|
|
3
|
-
"curve": "bn128",
|
|
4
|
-
"nPublic": 2,
|
|
5
|
-
"vk_alpha_1": [
|
|
6
|
-
"20491192805390485299153009773594534940189261866228447918068658471970481763042",
|
|
7
|
-
"9383485363053290200918347156157836566562967994039712273449902621266178545958",
|
|
8
|
-
"1"
|
|
9
|
-
],
|
|
10
|
-
"vk_beta_2": [
|
|
11
|
-
[
|
|
12
|
-
"6375614351688725206403948262868962793625744043794305715222011528459656738731",
|
|
13
|
-
"4252822878758300859123897981450591353533073413197771768651442665752259397132"
|
|
14
|
-
],
|
|
15
|
-
[
|
|
16
|
-
"10505242626370262277552901082094356697409835680220590971873171140371331206856",
|
|
17
|
-
"21847035105528745403288232691147584728191162732299865338377159692350059136679"
|
|
18
|
-
],
|
|
19
|
-
[
|
|
20
|
-
"1",
|
|
21
|
-
"0"
|
|
22
|
-
]
|
|
23
|
-
],
|
|
24
|
-
"vk_gamma_2": [
|
|
25
|
-
[
|
|
26
|
-
"10857046999023057135944570762232829481370756359578518086990519993285655852781",
|
|
27
|
-
"11559732032986387107991004021392285783925812861821192530917403151452391805634"
|
|
28
|
-
],
|
|
29
|
-
[
|
|
30
|
-
"8495653923123431417604973247489272438418190587263600148770280649306958101930",
|
|
31
|
-
"4082367875863433681332203403145435568316851327593401208105741076214120093531"
|
|
32
|
-
],
|
|
33
|
-
[
|
|
34
|
-
"1",
|
|
35
|
-
"0"
|
|
36
|
-
]
|
|
37
|
-
],
|
|
38
|
-
"vk_delta_2": [
|
|
39
|
-
[
|
|
40
|
-
"17148813419623457203985066539429644631645647523924421071291996337672621963970",
|
|
41
|
-
"3378301923252517018442292877686082457104227776843437734862398642766653223482"
|
|
42
|
-
],
|
|
43
|
-
[
|
|
44
|
-
"18046222623084461709867922061462541875738717559940745779039387528760937855234",
|
|
45
|
-
"17703549523296415698899830919608047721454000944502173912748647482435384305643"
|
|
46
|
-
],
|
|
47
|
-
[
|
|
48
|
-
"1",
|
|
49
|
-
"0"
|
|
50
|
-
]
|
|
51
|
-
],
|
|
52
|
-
"vk_alphabeta_12": [
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
"2029413683389138792403550203267699914886160938906632433982220835551125967885",
|
|
56
|
-
"21072700047562757817161031222997517981543347628379360635925549008442030252106"
|
|
57
|
-
],
|
|
58
|
-
[
|
|
59
|
-
"5940354580057074848093997050200682056184807770593307860589430076672439820312",
|
|
60
|
-
"12156638873931618554171829126792193045421052652279363021382169897324752428276"
|
|
61
|
-
],
|
|
62
|
-
[
|
|
63
|
-
"7898200236362823042373859371574133993780991612861777490112507062703164551277",
|
|
64
|
-
"7074218545237549455313236346927434013100842096812539264420499035217050630853"
|
|
65
|
-
]
|
|
66
|
-
],
|
|
67
|
-
[
|
|
68
|
-
[
|
|
69
|
-
"7077479683546002997211712695946002074877511277312570035766170199895071832130",
|
|
70
|
-
"10093483419865920389913245021038182291233451549023025229112148274109565435465"
|
|
71
|
-
],
|
|
72
|
-
[
|
|
73
|
-
"4595479056700221319381530156280926371456704509942304414423590385166031118820",
|
|
74
|
-
"19831328484489333784475432780421641293929726139240675179672856274388269393268"
|
|
75
|
-
],
|
|
76
|
-
[
|
|
77
|
-
"11934129596455521040620786944827826205713621633706285934057045369193958244500",
|
|
78
|
-
"8037395052364110730298837004334506829870972346962140206007064471173334027475"
|
|
79
|
-
]
|
|
80
|
-
]
|
|
81
|
-
],
|
|
82
|
-
"IC": [
|
|
83
|
-
[
|
|
84
|
-
"3873119679218392807840426919143613017451812535072496563784167058388285983796",
|
|
85
|
-
"10505355579916155463408957159060265767093857712918941866986236626237127061560",
|
|
86
|
-
"1"
|
|
87
|
-
],
|
|
88
|
-
[
|
|
89
|
-
"18131567997101244009572074907063325087087408880313227019458175660820403352905",
|
|
90
|
-
"5962015595236182725194357339839307542131750029760038891759441583113334779284",
|
|
91
|
-
"1"
|
|
92
|
-
],
|
|
93
|
-
[
|
|
94
|
-
"21262268839712470390098720510727633177967955527172441240314180229632430290739",
|
|
95
|
-
"17910414284850894487807511632049431548124824989721737209651521059918980252537",
|
|
96
|
-
"1"
|
|
97
|
-
]
|
|
98
|
-
]
|
|
99
|
-
}
|