@kynesyslabs/demosdk 2.5.0 → 2.5.1
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/build/encryption/zK/identity/CommitmentService.d.ts +1 -0
- package/build/encryption/zK/identity/CommitmentService.js +12 -11
- package/build/encryption/zK/identity/CommitmentService.js.map +1 -1
- package/build/encryption/zK/identity/ProofGenerator.d.ts +4 -1
- package/build/encryption/zK/identity/ProofGenerator.js +85 -69
- package/build/encryption/zK/identity/ProofGenerator.js.map +1 -1
- package/package.json +3 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* CommitmentService - Generate identity commitments and nullifiers
|
|
3
3
|
*
|
|
4
4
|
* REVIEW: Phase 9 - SDK Integration
|
|
5
|
+
* REVIEW: Phase 10.1 - Production Implementation (Real Poseidon hash)
|
|
5
6
|
*
|
|
6
7
|
* Provides methods for generating cryptographic commitments and nullifiers
|
|
7
8
|
* for the ZK identity system using Poseidon hash.
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* CommitmentService - Generate identity commitments and nullifiers
|
|
4
4
|
*
|
|
5
5
|
* REVIEW: Phase 9 - SDK Integration
|
|
6
|
+
* REVIEW: Phase 10.1 - Production Implementation (Real Poseidon hash)
|
|
6
7
|
*
|
|
7
8
|
* Provides methods for generating cryptographic commitments and nullifiers
|
|
8
9
|
* for the ZK identity system using Poseidon hash.
|
|
@@ -11,6 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
11
12
|
exports.generateCommitment = generateCommitment;
|
|
12
13
|
exports.generateNullifier = generateNullifier;
|
|
13
14
|
exports.generateSecret = generateSecret;
|
|
15
|
+
// REVIEW: Phase 10.1 - Production cryptographic implementation
|
|
16
|
+
const poseidon_lite_1 = require("poseidon-lite");
|
|
14
17
|
/**
|
|
15
18
|
* Generate a Poseidon hash commitment from provider ID and secret
|
|
16
19
|
*
|
|
@@ -101,20 +104,18 @@ function uint8ArrayToHex(array) {
|
|
|
101
104
|
.join('');
|
|
102
105
|
}
|
|
103
106
|
/**
|
|
104
|
-
* Poseidon hash implementation
|
|
107
|
+
* Poseidon hash implementation using poseidon-lite
|
|
105
108
|
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
109
|
+
* Poseidon is a ZK-friendly hash function optimized for use in
|
|
110
|
+
* zero-knowledge proof circuits. We use poseidon2 for hashing 2 inputs.
|
|
111
|
+
*
|
|
112
|
+
* @param inputs - Array of exactly 2 BigInt values to hash
|
|
113
|
+
* @returns Poseidon hash output as BigInt
|
|
108
114
|
*/
|
|
109
115
|
function poseidonHash(inputs) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
console.warn('WARNING: Using placeholder hash - replace with real Poseidon');
|
|
113
|
-
let result = BigInt(0);
|
|
114
|
-
for (const input of inputs) {
|
|
115
|
-
result ^= input;
|
|
116
|
+
if (inputs.length !== 2) {
|
|
117
|
+
throw new Error('poseidonHash expects exactly 2 inputs');
|
|
116
118
|
}
|
|
117
|
-
|
|
118
|
-
return result > 0 ? result : -result;
|
|
119
|
+
return (0, poseidon_lite_1.poseidon2)(inputs);
|
|
119
120
|
}
|
|
120
121
|
//# sourceMappingURL=CommitmentService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommitmentService.js","sourceRoot":"","sources":["../../../../../src/encryption/zK/identity/CommitmentService.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"CommitmentService.js","sourceRoot":"","sources":["../../../../../src/encryption/zK/identity/CommitmentService.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAkBH,gDAWC;AAeD,8CAOC;AAaD,wCAeC;AA7ED,+DAA+D;AAC/D,iDAAyC;AAEzC;;;;;;;;;;;;GAYG;AACH,SAAgB,kBAAkB,CAAC,UAAkB,EAAE,MAAc;IACjE,iDAAiD;IACjD,MAAM,YAAY,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;IAC/C,MAAM,UAAU,GAAG,c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AI,WAAW,EAAE,CAAA;IACjC,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACjC,MAAM,GAAG,GAAG,eAAe,CAAC,KAAK,CAAC,CAAA;IAClC,OAAO,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,CAAA;AAC7B,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,KAAiB;IACtC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;SACnB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;SACzC,IAAI,CAAC,EAAE,CAAC,CAAA;AACjB,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,YAAY,CAAC,MAAgB;IAClC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;IAC5D,CAAC;IACD,OAAO,IAAA,yBAAS,EAAC,MAAM,CAAC,CAAA;AAC5B,CAAC"}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* ProofGenerator - Client-side ZK-SNARK proof generation
|
|
3
3
|
*
|
|
4
4
|
* REVIEW: Phase 9 - SDK Integration
|
|
5
|
+
* REVIEW: Phase 10.1 - Production Implementation (Real snarkjs proof generation)
|
|
6
|
+
* REVIEW: Phase 10.4 - CDN Integration (Production-ready with CDN URLs)
|
|
5
7
|
*
|
|
6
8
|
* Generates Groth16 ZK-SNARK proofs for identity attestations using snarkjs.
|
|
7
|
-
*
|
|
9
|
+
* Circuit artifacts (WASM, proving key, verification key) are loaded from CDN.
|
|
8
10
|
*/
|
|
9
11
|
export interface ZKProof {
|
|
10
12
|
pi_a: string[];
|
|
@@ -53,5 +55,6 @@ export declare function generateIdentityProof(providerId: string, secret: string
|
|
|
53
55
|
* @returns True if proof is valid
|
|
54
56
|
*
|
|
55
57
|
* NOTE: Node RPC will do the actual verification, this is mainly for debugging
|
|
58
|
+
* REVIEW: Phase 10.4 - Production verification implementation with CDN
|
|
56
59
|
*/
|
|
57
60
|
export declare function verifyProof(proof: ZKProof, publicSignals: string[]): Promise<boolean>;
|
|
@@ -3,13 +3,50 @@
|
|
|
3
3
|
* ProofGenerator - Client-side ZK-SNARK proof generation
|
|
4
4
|
*
|
|
5
5
|
* REVIEW: Phase 9 - SDK Integration
|
|
6
|
+
* REVIEW: Phase 10.1 - Production Implementation (Real snarkjs proof generation)
|
|
7
|
+
* REVIEW: Phase 10.4 - CDN Integration (Production-ready with CDN URLs)
|
|
6
8
|
*
|
|
7
9
|
* Generates Groth16 ZK-SNARK proofs for identity attestations using snarkjs.
|
|
8
|
-
*
|
|
10
|
+
* Circuit artifacts (WASM, proving key, verification key) are loaded from CDN.
|
|
9
11
|
*/
|
|
12
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17
|
+
}
|
|
18
|
+
Object.defineProperty(o, k2, desc);
|
|
19
|
+
}) : (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
o[k2] = m[k];
|
|
22
|
+
}));
|
|
23
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
24
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
25
|
+
}) : function(o, v) {
|
|
26
|
+
o["default"] = v;
|
|
27
|
+
});
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
34
|
+
};
|
|
35
|
+
return ownKeys(o);
|
|
36
|
+
};
|
|
37
|
+
return function (mod) {
|
|
38
|
+
if (mod && mod.__esModule) return mod;
|
|
39
|
+
var result = {};
|
|
40
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
+
__setModuleDefault(result, mod);
|
|
42
|
+
return result;
|
|
43
|
+
};
|
|
44
|
+
})();
|
|
10
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
46
|
exports.generateIdentityProof = generateIdentityProof;
|
|
12
47
|
exports.verifyProof = verifyProof;
|
|
48
|
+
// REVIEW: Phase 10.1 - Production cryptographic implementation
|
|
49
|
+
const snarkjs = __importStar(require("snarkjs"));
|
|
13
50
|
/**
|
|
14
51
|
* Generate a ZK-SNARK proof for identity attestation
|
|
15
52
|
*
|
|
@@ -48,35 +85,33 @@ async function generateIdentityProof(providerId, secret, context, merkleProof, m
|
|
|
48
85
|
context: contextBigInt.toString(),
|
|
49
86
|
merkle_root: merkleRoot,
|
|
50
87
|
};
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
//
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
pi_a: ['1', '2', '1'],
|
|
88
|
+
// REVIEW: Phase 10.4 - Production CDN URLs for circuit artifacts
|
|
89
|
+
const wasmPath = 'https://files.demos.sh/zk-circuits/v1/identity_with_merkle.wasm';
|
|
90
|
+
const zkeyPath = 'https://files.demos.sh/zk-circuits/v1/identity_with_merkle_0000.zkey';
|
|
91
|
+
// REVIEW: Phase 10.1 - Production-ready proof generation using snarkjs
|
|
92
|
+
const { proof, publicSignals } = await snarkjs.groth16.fullProve(circuitInputs, wasmPath, zkeyPath);
|
|
93
|
+
// Convert proof to our ZKProof format
|
|
94
|
+
const zkProof = {
|
|
95
|
+
pi_a: [
|
|
96
|
+
proof.pi_a[0].toString(),
|
|
97
|
+
proof.pi_a[1].toString(),
|
|
98
|
+
proof.pi_a[2].toString(),
|
|
99
|
+
],
|
|
64
100
|
pi_b: [
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
101
|
+
[proof.pi_b[0][0].toString(), proof.pi_b[0][1].toString()],
|
|
102
|
+
[proof.pi_b[1][0].toString(), proof.pi_b[1][1].toString()],
|
|
103
|
+
[proof.pi_b[2][0].toString(), proof.pi_b[2][1].toString()],
|
|
104
|
+
],
|
|
105
|
+
pi_c: [
|
|
106
|
+
proof.pi_c[0].toString(),
|
|
107
|
+
proof.pi_c[1].toString(),
|
|
108
|
+
proof.pi_c[2].toString(),
|
|
68
109
|
],
|
|
69
|
-
pi_c: ['1', '2', '1'],
|
|
70
110
|
protocol: 'groth16',
|
|
71
111
|
};
|
|
72
|
-
const mockPublicSignals = [
|
|
73
|
-
computeNullifier(providerId, context),
|
|
74
|
-
merkleRoot,
|
|
75
|
-
contextBigInt.toString(),
|
|
76
|
-
];
|
|
77
112
|
return {
|
|
78
|
-
proof:
|
|
79
|
-
publicSignals:
|
|
113
|
+
proof: zkProof,
|
|
114
|
+
publicSignals: publicSignals.map((s) => s.toString()),
|
|
80
115
|
};
|
|
81
116
|
}
|
|
82
117
|
/**
|
|
@@ -87,31 +122,39 @@ async function generateIdentityProof(providerId, secret, context, merkleProof, m
|
|
|
87
122
|
* @returns True if proof is valid
|
|
88
123
|
*
|
|
89
124
|
* NOTE: Node RPC will do the actual verification, this is mainly for debugging
|
|
125
|
+
* REVIEW: Phase 10.4 - Production verification implementation with CDN
|
|
90
126
|
*/
|
|
91
127
|
async function verifyProof(proof, publicSignals) {
|
|
92
|
-
//
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
128
|
+
// REVIEW: Phase 10.4 - Load verification key from CDN
|
|
129
|
+
const vkeyUrl = 'https://files.demos.sh/zk-circuits/v1/verification_key_merkle.json';
|
|
130
|
+
try {
|
|
131
|
+
const response = await fetch(vkeyUrl);
|
|
132
|
+
if (!response.ok) {
|
|
133
|
+
throw new Error(`Failed to load verification key: ${response.status} ${response.statusText}`);
|
|
134
|
+
}
|
|
135
|
+
const vkey = await response.json();
|
|
136
|
+
// REVIEW: Phase 10.1 - Production-ready verification using snarkjs
|
|
137
|
+
// Convert our ZKProof format to snarkjs format
|
|
138
|
+
const snarkjsProof = {
|
|
139
|
+
pi_a: proof.pi_a,
|
|
140
|
+
pi_b: proof.pi_b,
|
|
141
|
+
pi_c: proof.pi_c,
|
|
142
|
+
protocol: proof.protocol,
|
|
143
|
+
};
|
|
144
|
+
return await snarkjs.groth16.verify(vkey, publicSignals, snarkjsProof);
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
throw new Error(`ZK proof verification failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
148
|
+
}
|
|
98
149
|
}
|
|
99
150
|
// ============================================================================
|
|
100
151
|
// Helper Functions
|
|
101
152
|
// ============================================================================
|
|
102
|
-
/**
|
|
103
|
-
* Compute nullifier from provider ID and context
|
|
104
|
-
* (Same logic as CommitmentService.generateNullifier)
|
|
105
|
-
*/
|
|
106
|
-
function computeNullifier(providerId, context) {
|
|
107
|
-
const providerHash = stringToBigInt(providerId);
|
|
108
|
-
const contextHash = stringToBigInt(context);
|
|
109
|
-
// TODO: Use real Poseidon hash
|
|
110
|
-
const nullifier = providerHash ^ contextHash;
|
|
111
|
-
return (nullifier > BigInt(0) ? nullifier : -nullifier).toString();
|
|
112
|
-
}
|
|
113
153
|
/**
|
|
114
154
|
* Convert string to BigInt using simple hashing
|
|
155
|
+
*
|
|
156
|
+
* @param str - Input string to convert
|
|
157
|
+
* @returns BigInt representation of the string
|
|
115
158
|
*/
|
|
116
159
|
function stringToBigInt(str) {
|
|
117
160
|
const encoder = new TextEncoder();
|
|
@@ -121,31 +164,4 @@ function stringToBigInt(str) {
|
|
|
121
164
|
.join('');
|
|
122
165
|
return BigInt('0x' + hex);
|
|
123
166
|
}
|
|
124
|
-
/**
|
|
125
|
-
* Load circuit WASM file
|
|
126
|
-
*
|
|
127
|
-
* TODO: Implement loading from CDN or local storage
|
|
128
|
-
*/
|
|
129
|
-
async function loadCircuitWasm(url) {
|
|
130
|
-
const response = await fetch(url);
|
|
131
|
-
return await response.arrayBuffer();
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Load proving key
|
|
135
|
-
*
|
|
136
|
-
* TODO: Implement loading from CDN or local storage
|
|
137
|
-
*/
|
|
138
|
-
async function loadProvingKey(url) {
|
|
139
|
-
const response = await fetch(url);
|
|
140
|
-
return await response.arrayBuffer();
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Load verification key for local verification
|
|
144
|
-
*
|
|
145
|
-
* TODO: Implement loading verification key
|
|
146
|
-
*/
|
|
147
|
-
async function loadVerificationKey() {
|
|
148
|
-
// Load from CDN or local storage
|
|
149
|
-
throw new Error('Not implemented');
|
|
150
|
-
}
|
|
151
167
|
//# sourceMappingURL=ProofGenerator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProofGenerator.js","sourceRoot":"","sources":["../../../../../src/encryption/zK/identity/ProofGenerator.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"ProofGenerator.js","sourceRoot":"","sources":["../../../../../src/encryption/zK/identity/ProofGenerator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CH,sDA4DC;AAYD,kCA6BC;AAjJD,+DAA+D;AAC/D,iDAAkC;AAqBlC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACI,KAAK,UAAU,qBAAqB,CACvC,UAAkB,EAClB,MAAc,EACd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aScript/TypeScript SDK that provides a unified interface for interacting with Demos network",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -109,8 +109,10 @@
|
|
|
109
109
|
"node-forge": "^1.3.1",
|
|
110
110
|
"node-seal": "^5.1.7",
|
|
111
111
|
"ntru": "^4.0.4",
|
|
112
|
+
"poseidon-lite": "^0.3.0",
|
|
112
113
|
"pqcrypto": "^1.0.1",
|
|
113
114
|
"protobufjs": "^7.5.4",
|
|
115
|
+
"snarkjs": "^0.7.5",
|
|
114
116
|
"ripple-keypairs": "^2.0.0",
|
|
115
117
|
"rubic-sdk": "^5.57.4",
|
|
116
118
|
"simple-peer": "^9.11.1",
|