@orbinum/circuits 0.8.0 → 0.10.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 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 (disclosure, transfer, unshield, private_link):
16
+ This package includes **20 files** for 4 circuits (value_proof, transfer, unshield, private_link):
17
17
 
18
- ### For Each Circuit (disclosure, transfer, unshield, private_link):
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"); // 'disclosure' | 'transfer' | 'unshield' | 'private_link'
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. **Disclosure** (`disclosure_*`)
76
+ ### 1. **Value Proof** (`value_proof_*`)
77
77
 
78
- Selective disclosure circuit for privacy-preserving attribute revelation.
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.Transfer, witnessInputs, numPublicSignals);
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: "disclosure" | "transfer" | "unshield" | "private_link"
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 = "disclosure" | "transfer" | "unshield" | "private_link";
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 = ["disclosure", "transfer", "unshield", "private_link"];
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: 'disclosure', 'transfer', 'unshield', or 'private_link'
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.8.0",
5
- "generated_at": "2026-05-11T17:10:26.118Z",
4
+ "package_version": "0.10.0",
5
+ "generated_at": "2026-07-06T23:13:40.086Z",
6
6
  "circuits": {
7
- "disclosure": {
7
+ "value_proof": {
8
8
  "active_version": 1,
9
9
  "supported_versions": [
10
10
  1
@@ -12,31 +12,37 @@
12
12
  "versions": {
13
13
  "1": {
14
14
  "version": 1,
15
- "vk_hash": "0xea92d999e706396598a10f8fd5a4422042c385f9cf5c2bf7d0f50943ca81d38f",
15
+ "vk_hash": "0x517e4b2c1eac7d1ddb9ac1c33b081c68872f0d72cf3541555d6046410d507e71",
16
16
  "artifacts": {
17
17
  "wasm": {
18
- "file": "disclosure.wasm",
19
- "localPath": "build/disclosure_js/disclosure.wasm",
20
- "bytes": 2798462,
21
- "sha256": "0595542a3e19d6dc16b7e2af529fc8ab324e9a2c79989dd931d04622246a9dea"
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": "disclosure_pk.zkey",
25
- "localPath": "keys/disclosure_pk.zkey",
26
- "bytes": 5017200,
27
- "sha256": "0e5798de232c7e999c86a1f6d26577acfccce224b3de83125b83249e67c7ca9e"
24
+ "file": "value_proof_pk.zkey",
25
+ "localPath": "keys/value_proof_pk.zkey",
26
+ "bytes": 548348,
27
+ "sha256": "fce25891b7ced8590262c69f29196ef80cdd99f7a59bcfa9e7d361a4e90562f6"
28
28
  },
29
29
  "vk_json": {
30
- "file": "verification_key_disclosure.json",
31
- "localPath": "build/verification_key_disclosure.json",
32
- "bytes": 4206,
33
- "sha256": "ea92d999e706396598a10f8fd5a4422042c385f9cf5c2bf7d0f50943ca81d38f"
30
+ "file": "verification_key_value_proof.json",
31
+ "localPath": "build/verification_key_value_proof.json",
32
+ "bytes": 3475,
33
+ "sha256": "2f94c5505c60af65bf4498085f8b6726b37bff527077a4062becc0539e0ca8b1"
34
+ },
35
+ "ark": {
36
+ "file": "value_proof_pk.ark",
37
+ "localPath": "keys/value_proof_pk.ark",
38
+ "bytes": 250832,
39
+ "sha256": "4bf2085ea31ca03f7fb98bb1bc7d97ed72fe90c8204a43667b62d67d22422cdd"
34
40
  },
35
41
  "r1cs": {
36
- "file": "disclosure.r1cs",
37
- "localPath": "build/disclosure.r1cs",
38
- "bytes": 1740612,
39
- "sha256": "5a61fdb41868c5c9d193683f4ccde4e18ce71dfc7363904a6c2e5864a3bbf0f0"
42
+ "file": "value_proof.r1cs",
43
+ "localPath": "build/value_proof.r1cs",
44
+ "bytes": 157776,
45
+ "sha256": "07673eac319aa6fe620a58338d33bbf2f53f99b9e0deb906727c5f82aa790654"
40
46
  }
41
47
  }
42
48
  }
@@ -50,7 +56,7 @@
50
56
  "versions": {
51
57
  "1": {
52
58
  "version": 1,
53
- "vk_hash": "0xa6568f55de831c106e183feda707588d8c4752077c69d1f0e0017b691cc33882",
59
+ "vk_hash": "0xffc2a250b093f79ed13934b09b7ee50e060c790921da6b036c352cc5eb3d37a4",
54
60
  "artifacts": {
55
61
  "wasm": {
56
62
  "file": "transfer.wasm",
@@ -62,13 +68,13 @@
62
68
  "file": "transfer_pk.zkey",
63
69
  "localPath": "keys/transfer_pk.zkey",
64
70
  "bytes": 17247624,
65
- "sha256": "376279e4137014123f6fdba63ebab0890c59e5f166c7eab25eb3785e9e4a9aae"
71
+ "sha256": "c34550adf6379ccdd0df6c1c0b1523c41e742b5db7aee14b9e52bb382f01bf0b"
66
72
  },
67
73
  "vk_json": {
68
74
  "file": "verification_key_transfer.json",
69
75
  "localPath": "build/verification_key_transfer.json",
70
- "bytes": 4021,
71
- "sha256": "a6568f55de831c106e183feda707588d8c4752077c69d1f0e0017b691cc33882"
76
+ "bytes": 4020,
77
+ "sha256": "26899953b0b1131b826d0144f9ec6837037084a953980260ec2c39ed51280fa4"
72
78
  },
73
79
  "r1cs": {
74
80
  "file": "transfer.r1cs",
@@ -88,7 +94,7 @@
88
94
  "versions": {
89
95
  "1": {
90
96
  "version": 1,
91
- "vk_hash": "0xe43b0e11aab8d9c8471d125f2ed62bb1ee96f368a274c8028fc984f3dd77b51e",
97
+ "vk_hash": "0xf19904765b5c2eb3e9cb1cf408d8da4223bcd94e4d2c9de49481e790ba8f4107",
92
98
  "artifacts": {
93
99
  "wasm": {
94
100
  "file": "unshield.wasm",
@@ -100,13 +106,13 @@
100
106
  "file": "unshield_pk.zkey",
101
107
  "localPath": "keys/unshield_pk.zkey",
102
108
  "bytes": 8653108,
103
- "sha256": "d93105098acdb7f2dba4a6155d3358d640237a203b129b4e6dae7b09a2fe54a5"
109
+ "sha256": "f70e0a244068054fc0749409ba8ea87f86f31916c5362339569d9cfff9778181"
104
110
  },
105
111
  "vk_json": {
106
112
  "file": "verification_key_unshield.json",
107
113
  "localPath": "build/verification_key_unshield.json",
108
114
  "bytes": 4028,
109
- "sha256": "e43b0e11aab8d9c8471d125f2ed62bb1ee96f368a274c8028fc984f3dd77b51e"
115
+ "sha256": "a5daabb4022aba7da4c5aa99245de95261df62f346ee63218926c31600ee8efc"
110
116
  },
111
117
  "r1cs": {
112
118
  "file": "unshield.r1cs",
@@ -126,7 +132,7 @@
126
132
  "versions": {
127
133
  "1": {
128
134
  "version": 1,
129
- "vk_hash": "0x3b8a48d579cd320f90d6e96e23238980bb175f33c74f4e6d100709999df777fd",
135
+ "vk_hash": "0xf30f479b4db87154c6ddd9ac4da67314dfc46796fa67784679f70a29fec906f6",
130
136
  "artifacts": {
131
137
  "wasm": {
132
138
  "file": "private_link.wasm",
@@ -138,13 +144,13 @@
138
144
  "file": "private_link_pk.zkey",
139
145
  "localPath": "keys/private_link_pk.zkey",
140
146
  "bytes": 508588,
141
- "sha256": "02dfa0e0eba8f2328b71a08d50d74b246789a08e119363105f487a6581b3d4c9"
147
+ "sha256": "873171f6ddd64b1e23af59a4b4dbc13d77c4693f63b5d7ba63bb91f80c154f97"
142
148
  },
143
149
  "vk_json": {
144
150
  "file": "verification_key_private_link.json",
145
151
  "localPath": "build/verification_key_private_link.json",
146
- "bytes": 3111,
147
- "sha256": "3b8a48d579cd320f90d6e96e23238980bb175f33c74f4e6d100709999df777fd"
152
+ "bytes": 3108,
153
+ "sha256": "79b24fcc3a3403f04b750989725636b4cd2ae4192dbf254cce1fdb39149dd984"
148
154
  },
149
155
  "r1cs": {
150
156
  "file": "private_link.r1cs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbinum/circuits",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Zero-Knowledge circuits for Orbinum privacy blockchain",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -36,4 +36,4 @@
36
36
  "engines": {
37
37
  "node": ">=18.0.0"
38
38
  }
39
- }
39
+ }
Binary file
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
Binary file
Binary file
Binary file
Binary file
@@ -37,12 +37,12 @@
37
37
  ],
38
38
  "vk_delta_2": [
39
39
  [
40
- "10850422967449074005640401049403957856581108366624107081037912686108945054989",
41
- "20270634811644327007897026282022324076263530438799112575359599377702805762776"
40
+ "5961330643884637703784802152910545782874075902119574414366746850649447063170",
41
+ "5888920833355109520792961134719335701263191649281058420781315111346545003272"
42
42
  ],
43
43
  [
44
- "17636087453913707993638552325064406843290993614533297449867865335417235523776",
45
- "10426403968697914972643950823674712376123765597871822596403932717682849169565"
44
+ "5248775937929802829027363666831905521167324753289283202274548875901764183989",
45
+ "10286718878016151818302487926423619542417539507906402330411843726722076461133"
46
46
  ],
47
47
  [
48
48
  "1",
@@ -37,12 +37,12 @@
37
37
  ],
38
38
  "vk_delta_2": [
39
39
  [
40
- "5205347480481225369329919228908696562847039390998143208712589312297287489633",
41
- "15406152041278497242969028397961151577430928833426018069867169059208161077646"
40
+ "2198125035602925901704537244380349804301867028389748765828467548028814762758",
41
+ "11524442433448200504418699029665378940134776610400775442543471648910181902361"
42
42
  ],
43
43
  [
44
- "8295951810965352404547359842288319054495443715119228121412283636495648069292",
45
- "2644031983483594052908926026299456165795217425671308006427298927010044052521"
44
+ "6497669427449298113116485486262029493670401641051337163131482837221797869789",
45
+ "145346171547783059861182631949385546300903954487213942913275664660974995775"
46
46
  ],
47
47
  [
48
48
  "1",
@@ -37,12 +37,12 @@
37
37
  ],
38
38
  "vk_delta_2": [
39
39
  [
40
- "5169708277249518854491091187171974950707699986302263928174795176734980058398",
41
- "1554856994772330013961069815172987766005917375945255983513675119326867687104"
40
+ "7770388259979108459001565861274623205551826726522355696322528203752683435003",
41
+ "21067954332617689193088286215562814437904731746389808729161560623777612924987"
42
42
  ],
43
43
  [
44
- "11163713404349600222646921067342221569043994728765135784034122598416968538479",
45
- "19246644505021909490592043061367501854130026882942406805060677159806766124213"
44
+ "19938176951841284053308589747448742344739400558035806708071602451001552401687",
45
+ "1694722353926099072525067880564781341471952219023678944400454446041441019751"
46
46
  ],
47
47
  [
48
48
  "1",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "protocol": "groth16",
3
3
  "curve": "bn128",
4
- "nPublic": 8,
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
- "3898705519515689725981155436678910002763783949257451778345919730872976434966",
41
- "18843326962096093585555559271008264339515880113852798743092715246762162468255"
40
+ "20949064354238968835006566960847416867516473327766335931015711719308398854825",
41
+ "20999524745718620864961008039285164252039429739408821325254590106717537237873"
42
42
  ],
43
43
  [
44
- "16412038361164576556232925968122418351524181174104240044062085196186624264239",
45
- "8585448703356553430001022128316267784693287306595822490786832214901191814855"
44
+ "13117741355657412968682190307146496157822680698248214864323364051515373071239",
45
+ "18906355750700729169129087134204406752950955485558893156582082381948787052989"
46
46
  ],
47
47
  [
48
48
  "1",
@@ -81,48 +81,28 @@
81
81
  ],
82
82
  "IC": [
83
83
  [
84
- "5911105200155809474255974707137244873455083272231944754953945591653083692786",
85
- "4886188201875541580663405894127269811413697476443315776306090976601519851623",
84
+ "9828157877087779081440111438673087207249043783612944265861570921444915759748",
85
+ "9786644308034544115433485225427578177977085108945709963515044799347220707026",
86
86
  "1"
87
87
  ],
88
88
  [
89
- "8208089928378908626728444687812035878892604852239466026950151998721712950775",
90
- "1695023907844320286941096743508091625134420275466431811772927810973140041638",
89
+ "1678531490709055963678159839742311665234734100281691152847191859939285463541",
90
+ "13923388915221023387399767948428353368793404263032785566014206335968827459832",
91
91
  "1"
92
92
  ],
93
93
  [
94
- "9007974385782807355924241061429231329328732794977708413204912939401666196859",
95
- "20661319477362585524036684393230214846559240640934514129286334989840966528672",
94
+ "8175216634647922915379480779073567738146251861644869086227578169386062581291",
95
+ "4437420056651891857840182388463775002291697446381807273163481567993680849540",
96
96
  "1"
97
97
  ],
98
98
  [
99
- "15506432381596356624150128998041410572192001528275163459585219357549385538497",
100
- "4816542545475517442623092269452161300904711315548024666750463272929083757290",
99
+ "18897664504538107250890893665343672545730383722496960226640421263163712416709",
100
+ "17808018269433335352640665210410493788089126622706198275044265884768956331861",
101
101
  "1"
102
102
  ],
103
103
  [
104
- "14925300952786339420245093373753652885523219577496359837565074362142746096770",
105
- "18849402626782247360564644594499008234672550246956355374570241703943704668680",
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
Binary file