@zelana/sdk 0.1.1 → 0.1.3
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/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +214 -2
- package/dist/keypair.d.ts +4 -2
- package/dist/keypair.d.ts.map +1 -1
- package/dist/prover.d.ts +209 -0
- package/dist/prover.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -47,4 +47,6 @@ export { ZelanaError } from './types';
|
|
|
47
47
|
export { shielded, ShieldedTransactionBuilder, generateShieldedKeys, shieldedKeysFromSpendingKey, createNote, noteWithRandomness, computeCommitment, computeNullifier, tryDecryptNote, } from './shielded';
|
|
48
48
|
export type { Note, EncryptedNote, ShieldedKeys, ShieldedInput, ShieldedOutput, PreparedShieldedTx, ShieldedTransaction, ShieldedWitness, ScanResult, MerklePath as ShieldedMerklePath, } from './shielded';
|
|
49
49
|
export { bytesToHex, hexToBytes, bytesToBase58, base58ToBytes, u64ToLeBytes, leBytesToU64, concatBytes, bytesEqual, randomBytes, } from './utils';
|
|
50
|
+
export { OwnershipProver, MockOwnershipProver, mockProver, getProver, computeOwnershipWitness, } from './prover';
|
|
51
|
+
export type { OwnershipWitness, OwnershipProof, DelegatedShieldedRequest, } from './prover';
|
|
50
52
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC/C,YAAY,EAAE,MAAM,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U,EACV,SAAS,EACT,uBAAuB,GACxB,MAAM,UAAU,CAAC;AAElB,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,wBAAwB,GACzB,MAAM,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
7
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
8
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
|
+
for (let key of __getOwnPropNames(mod))
|
|
10
|
+
if (!__hasOwnProp.call(to, key))
|
|
11
|
+
__defProp(to, key, {
|
|
12
|
+
get: () => mod[key],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
18
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
19
|
+
}) : x)(function(x) {
|
|
20
|
+
if (typeof require !== "undefined")
|
|
21
|
+
return require.apply(this, arguments);
|
|
22
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
23
|
+
});
|
|
24
|
+
|
|
1
25
|
// node_modules/@noble/ed25519/index.js
|
|
2
26
|
/*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */
|
|
3
27
|
var ed25519_CURVE = {
|
|
@@ -1006,6 +1030,8 @@ function randomBytes2(length) {
|
|
|
1006
1030
|
}
|
|
1007
1031
|
|
|
1008
1032
|
// src/keypair.ts
|
|
1033
|
+
var TRANSFER_DOMAIN = new TextEncoder().encode("ZELANA_L2_TRANSFER:");
|
|
1034
|
+
var WITHDRAW_DOMAIN = new TextEncoder().encode("ZELANA_L2_WITHDRAW:");
|
|
1009
1035
|
etc.sha512Sync = (...m) => sha5122(etc.concatBytes(...m));
|
|
1010
1036
|
|
|
1011
1037
|
class Keypair {
|
|
@@ -1062,7 +1088,7 @@ class Keypair {
|
|
|
1062
1088
|
}
|
|
1063
1089
|
}
|
|
1064
1090
|
async signTransfer(to, amount, nonce, chainId = BigInt(1)) {
|
|
1065
|
-
const message = concatBytes2(this._publicKey, to, u64ToLeBytes(amount), u64ToLeBytes(nonce), u64ToLeBytes(chainId));
|
|
1091
|
+
const message = concatBytes2(TRANSFER_DOMAIN, this._publicKey, to, u64ToLeBytes(amount), u64ToLeBytes(nonce), u64ToLeBytes(chainId));
|
|
1066
1092
|
const signature = await this.sign(message);
|
|
1067
1093
|
return {
|
|
1068
1094
|
from: this.publicKey,
|
|
@@ -1075,7 +1101,7 @@ class Keypair {
|
|
|
1075
1101
|
};
|
|
1076
1102
|
}
|
|
1077
1103
|
async signWithdrawal(toL1Address, amount, nonce) {
|
|
1078
|
-
const message = concatBytes2(this._publicKey, toL1Address, u64ToLeBytes(amount), u64ToLeBytes(nonce));
|
|
1104
|
+
const message = concatBytes2(WITHDRAW_DOMAIN, this._publicKey, toL1Address, u64ToLeBytes(amount), u64ToLeBytes(nonce));
|
|
1079
1105
|
const signature = await this.sign(message);
|
|
1080
1106
|
return {
|
|
1081
1107
|
from: this.publicKey,
|
|
@@ -1783,6 +1809,187 @@ var shielded = {
|
|
|
1783
1809
|
computeNullifier,
|
|
1784
1810
|
TransactionBuilder: ShieldedTransactionBuilder
|
|
1785
1811
|
};
|
|
1812
|
+
// src/prover.ts
|
|
1813
|
+
class OwnershipProver {
|
|
1814
|
+
wasmModule = null;
|
|
1815
|
+
noirCircuit = null;
|
|
1816
|
+
backend = null;
|
|
1817
|
+
initialized = false;
|
|
1818
|
+
async init(options) {
|
|
1819
|
+
if (this.initialized) {
|
|
1820
|
+
return;
|
|
1821
|
+
}
|
|
1822
|
+
try {
|
|
1823
|
+
const wasmModule = await this.loadWasmModule(options?.wasmUrl);
|
|
1824
|
+
this.wasmModule = wasmModule;
|
|
1825
|
+
} catch (error) {
|
|
1826
|
+
throw new Error(`Failed to load ownership-prover WASM: ${error}`);
|
|
1827
|
+
}
|
|
1828
|
+
if (!options?.witnessOnly) {
|
|
1829
|
+
try {
|
|
1830
|
+
await this.loadNoirCircuit(options?.circuitUrl);
|
|
1831
|
+
} catch (error) {
|
|
1832
|
+
console.warn("Noir circuit not loaded, proof generation disabled:", error);
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
this.initialized = true;
|
|
1836
|
+
}
|
|
1837
|
+
async loadWasmModule(wasmUrl) {
|
|
1838
|
+
try {
|
|
1839
|
+
const module = await import("zelana-ownership-prover");
|
|
1840
|
+
await module.default();
|
|
1841
|
+
return module;
|
|
1842
|
+
} catch {
|
|
1843
|
+
if (wasmUrl) {
|
|
1844
|
+
const importFn = new Function("url", "return import(url)");
|
|
1845
|
+
const module = await importFn(wasmUrl);
|
|
1846
|
+
await module.default();
|
|
1847
|
+
return module;
|
|
1848
|
+
}
|
|
1849
|
+
throw new Error("Could not load WASM module");
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
async loadNoirCircuit(circuitUrl) {
|
|
1853
|
+
console.log("Noir circuit loading not yet implemented");
|
|
1854
|
+
this.noirCircuit = null;
|
|
1855
|
+
this.backend = null;
|
|
1856
|
+
}
|
|
1857
|
+
isInitialized() {
|
|
1858
|
+
return this.initialized;
|
|
1859
|
+
}
|
|
1860
|
+
canProve() {
|
|
1861
|
+
return this.initialized && this.noirCircuit !== null;
|
|
1862
|
+
}
|
|
1863
|
+
derivePublicKey(spendingKey) {
|
|
1864
|
+
this.ensureInitialized();
|
|
1865
|
+
const hex = this.wasmModule.derivePublicKey(bytesToHex2(spendingKey));
|
|
1866
|
+
return hexToBytes2(hex);
|
|
1867
|
+
}
|
|
1868
|
+
computeCommitment(ownerPk, value, blinding) {
|
|
1869
|
+
this.ensureInitialized();
|
|
1870
|
+
const hex = this.wasmModule.computeCommitment(bytesToHex2(ownerPk), value, bytesToHex2(blinding));
|
|
1871
|
+
return hexToBytes2(hex);
|
|
1872
|
+
}
|
|
1873
|
+
computeNullifier(spendingKey, commitment, position) {
|
|
1874
|
+
this.ensureInitialized();
|
|
1875
|
+
const hex = this.wasmModule.computeNullifier(bytesToHex2(spendingKey), bytesToHex2(commitment), position);
|
|
1876
|
+
return hexToBytes2(hex);
|
|
1877
|
+
}
|
|
1878
|
+
computeBlindedProxy(commitment, position) {
|
|
1879
|
+
this.ensureInitialized();
|
|
1880
|
+
const hex = this.wasmModule.computeBlindedProxy(bytesToHex2(commitment), position);
|
|
1881
|
+
return hexToBytes2(hex);
|
|
1882
|
+
}
|
|
1883
|
+
computeWitness(spendingKey, value, blinding, position) {
|
|
1884
|
+
this.ensureInitialized();
|
|
1885
|
+
return this.wasmModule.generateWitness(bytesToHex2(spendingKey), value, bytesToHex2(blinding), position);
|
|
1886
|
+
}
|
|
1887
|
+
verifyWitness(spendingKey, value, blinding, position, expectedCommitment, expectedNullifier, expectedProxy) {
|
|
1888
|
+
this.ensureInitialized();
|
|
1889
|
+
return this.wasmModule.verifyWitness(bytesToHex2(spendingKey), value, bytesToHex2(blinding), position, bytesToHex2(expectedCommitment), bytesToHex2(expectedNullifier), bytesToHex2(expectedProxy));
|
|
1890
|
+
}
|
|
1891
|
+
async prove(spendingKey, value, blinding, position) {
|
|
1892
|
+
this.ensureInitialized();
|
|
1893
|
+
if (!this.canProve()) {
|
|
1894
|
+
throw new Error("Noir circuit not loaded - proof generation unavailable");
|
|
1895
|
+
}
|
|
1896
|
+
const witness = this.computeWitness(spendingKey, value, blinding, position);
|
|
1897
|
+
throw new Error("Proof generation not yet implemented");
|
|
1898
|
+
}
|
|
1899
|
+
async verify(proof) {
|
|
1900
|
+
if (!this.canProve()) {
|
|
1901
|
+
throw new Error("Noir circuit not loaded - verification unavailable");
|
|
1902
|
+
}
|
|
1903
|
+
throw new Error("Proof verification not yet implemented");
|
|
1904
|
+
}
|
|
1905
|
+
ensureInitialized() {
|
|
1906
|
+
if (!this.initialized || !this.wasmModule) {
|
|
1907
|
+
throw new Error("Prover not initialized - call init() first");
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
var globalProver = null;
|
|
1912
|
+
async function getProver() {
|
|
1913
|
+
if (!globalProver) {
|
|
1914
|
+
globalProver = new OwnershipProver;
|
|
1915
|
+
await globalProver.init({ witnessOnly: true });
|
|
1916
|
+
}
|
|
1917
|
+
return globalProver;
|
|
1918
|
+
}
|
|
1919
|
+
async function computeOwnershipWitness(spendingKey, value, blinding, position) {
|
|
1920
|
+
const prover = await getProver();
|
|
1921
|
+
return prover.computeWitness(spendingKey, value, blinding, position);
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
class MockOwnershipProver extends OwnershipProver {
|
|
1925
|
+
async init() {}
|
|
1926
|
+
isInitialized() {
|
|
1927
|
+
return true;
|
|
1928
|
+
}
|
|
1929
|
+
canProve() {
|
|
1930
|
+
return true;
|
|
1931
|
+
}
|
|
1932
|
+
derivePublicKey(spendingKey) {
|
|
1933
|
+
return this.mockHash("PK", spendingKey);
|
|
1934
|
+
}
|
|
1935
|
+
computeCommitment(ownerPk, value, blinding) {
|
|
1936
|
+
const valueBytes = new Uint8Array(8);
|
|
1937
|
+
new DataView(valueBytes.buffer).setBigUint64(0, value, true);
|
|
1938
|
+
return this.mockHash("CM", ownerPk, valueBytes, blinding);
|
|
1939
|
+
}
|
|
1940
|
+
computeNullifier(spendingKey, commitment, position) {
|
|
1941
|
+
const posBytes = new Uint8Array(8);
|
|
1942
|
+
new DataView(posBytes.buffer).setBigUint64(0, position, true);
|
|
1943
|
+
return this.mockHash("NF", spendingKey, commitment, posBytes);
|
|
1944
|
+
}
|
|
1945
|
+
computeBlindedProxy(commitment, position) {
|
|
1946
|
+
const posBytes = new Uint8Array(8);
|
|
1947
|
+
new DataView(posBytes.buffer).setBigUint64(0, position, true);
|
|
1948
|
+
return this.mockHash("BP", commitment, posBytes);
|
|
1949
|
+
}
|
|
1950
|
+
computeWitness(spendingKey, value, blinding, position) {
|
|
1951
|
+
const ownerPk = this.derivePublicKey(spendingKey);
|
|
1952
|
+
const commitment = this.computeCommitment(ownerPk, value, blinding);
|
|
1953
|
+
const nullifier = this.computeNullifier(spendingKey, commitment, position);
|
|
1954
|
+
const blindedProxy = this.computeBlindedProxy(commitment, position);
|
|
1955
|
+
return {
|
|
1956
|
+
ownerPk: bytesToHex2(ownerPk),
|
|
1957
|
+
commitment: bytesToHex2(commitment),
|
|
1958
|
+
nullifier: bytesToHex2(nullifier),
|
|
1959
|
+
blindedProxy: bytesToHex2(blindedProxy)
|
|
1960
|
+
};
|
|
1961
|
+
}
|
|
1962
|
+
async prove(spendingKey, value, blinding, position) {
|
|
1963
|
+
const witness = this.computeWitness(spendingKey, value, blinding, position);
|
|
1964
|
+
const fakeProof = this.mockHash("PROOF", hexToBytes2(witness.commitment), hexToBytes2(witness.nullifier));
|
|
1965
|
+
return {
|
|
1966
|
+
proof: fakeProof,
|
|
1967
|
+
publicInputs: {
|
|
1968
|
+
commitment: hexToBytes2(witness.commitment),
|
|
1969
|
+
nullifier: hexToBytes2(witness.nullifier),
|
|
1970
|
+
blindedProxy: hexToBytes2(witness.blindedProxy)
|
|
1971
|
+
}
|
|
1972
|
+
};
|
|
1973
|
+
}
|
|
1974
|
+
mockHash(domain, ...inputs) {
|
|
1975
|
+
const domainBytes = new TextEncoder().encode(domain);
|
|
1976
|
+
const combined = new Uint8Array(domainBytes.length + inputs.reduce((acc, i) => acc + i.length, 0));
|
|
1977
|
+
let offset = 0;
|
|
1978
|
+
combined.set(domainBytes, offset);
|
|
1979
|
+
offset += domainBytes.length;
|
|
1980
|
+
for (const input of inputs) {
|
|
1981
|
+
combined.set(input, offset);
|
|
1982
|
+
offset += input.length;
|
|
1983
|
+
}
|
|
1984
|
+
const result = new Uint8Array(32);
|
|
1985
|
+
for (let i = 0;i < combined.length; i++) {
|
|
1986
|
+
result[i % 32] ^= combined[i];
|
|
1987
|
+
result[(i + 1) % 32] ^= combined[i] << 4 | combined[i] >> 4;
|
|
1988
|
+
}
|
|
1989
|
+
return result;
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
var mockProver = new MockOwnershipProver;
|
|
1786
1993
|
export {
|
|
1787
1994
|
u64ToLeBytes,
|
|
1788
1995
|
tryDecryptNote,
|
|
@@ -1790,11 +1997,14 @@ export {
|
|
|
1790
1997
|
shielded,
|
|
1791
1998
|
randomBytes2 as randomBytes,
|
|
1792
1999
|
noteWithRandomness,
|
|
2000
|
+
mockProver,
|
|
1793
2001
|
leBytesToU64,
|
|
1794
2002
|
hexToBytes2 as hexToBytes,
|
|
2003
|
+
getProver,
|
|
1795
2004
|
generateShieldedKeys,
|
|
1796
2005
|
createNote,
|
|
1797
2006
|
concatBytes2 as concatBytes,
|
|
2007
|
+
computeOwnershipWitness,
|
|
1798
2008
|
computeNullifier,
|
|
1799
2009
|
computeCommitment,
|
|
1800
2010
|
bytesToHex2 as bytesToHex,
|
|
@@ -1805,6 +2015,8 @@ export {
|
|
|
1805
2015
|
ZelanaClient,
|
|
1806
2016
|
ShieldedTransactionBuilder,
|
|
1807
2017
|
PublicKey,
|
|
2018
|
+
OwnershipProver,
|
|
2019
|
+
MockOwnershipProver,
|
|
1808
2020
|
Keypair,
|
|
1809
2021
|
ApiClient
|
|
1810
2022
|
};
|
package/dist/keypair.d.ts
CHANGED
|
@@ -88,7 +88,8 @@ export declare class Keypair implements Signer {
|
|
|
88
88
|
/**
|
|
89
89
|
* Sign a transfer transaction
|
|
90
90
|
*
|
|
91
|
-
* The message format
|
|
91
|
+
* The message format includes a domain separator prefix:
|
|
92
|
+
* - domain: "ZELANA_L2_TRANSFER:"
|
|
92
93
|
* - from: [u8; 32]
|
|
93
94
|
* - to: [u8; 32]
|
|
94
95
|
* - amount: u64 (little-endian)
|
|
@@ -99,7 +100,8 @@ export declare class Keypair implements Signer {
|
|
|
99
100
|
/**
|
|
100
101
|
* Sign a withdrawal request
|
|
101
102
|
*
|
|
102
|
-
* The message format
|
|
103
|
+
* The message format includes a domain separator prefix:
|
|
104
|
+
* - domain: "ZELANA_L2_WITHDRAW:"
|
|
103
105
|
* - from: [u8; 32]
|
|
104
106
|
* - to_l1_address: [u8; 32]
|
|
105
107
|
* - amount: u64 (little-endian)
|
package/dist/keypair.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keypair.d.ts","sourceRoot":"","sources":["../src/keypair.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"keypair.d.ts","sourceRoot":"","sources":["../src/keypair.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAqBzE;;;;;;GAMG;AACH,MAAM,WAAW,MAAM;IACrB,iCAAiC;IACjC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,mCAAmC;IACnC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,+CAA+C;IAC/C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,sDAAsD;IACtD,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/C,oDAAoD;IACpD,YAAY,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACrG,sDAAsD;IACtD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,cAAc,CAClB,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,eAAe,CAAC;CAqB5B;AAED;;GAEG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;gBAEvB,KAAK,EAAE,UAAU,GAAG,MAAM;IAsBtC;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,KAAK,IAAI,MAAM;IAIf;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO;CAQ/C"}
|
package/dist/prover.d.ts
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ownership Prover - Client-Side ZK Proof Generation
|
|
3
|
+
*
|
|
4
|
+
* This module provides the client-side proving functionality for Split Proving.
|
|
5
|
+
* Users generate lightweight ownership proofs in their browser, which are then
|
|
6
|
+
* verified by the sequencer and enhanced with Merkle proofs by the Swarm.
|
|
7
|
+
*
|
|
8
|
+
* Architecture:
|
|
9
|
+
* 1. User computes witness using WASM MiMC (matches Noir circuit exactly)
|
|
10
|
+
* 2. User generates ownership proof using Noir WASM prover (~500ms)
|
|
11
|
+
* 3. Proof is sent to sequencer for verification and batching
|
|
12
|
+
* 4. Swarm generates validity proof with Merkle membership (heavy work)
|
|
13
|
+
*/
|
|
14
|
+
import type { Bytes32 } from './types';
|
|
15
|
+
/**
|
|
16
|
+
* Witness data computed from private inputs
|
|
17
|
+
*/
|
|
18
|
+
export interface OwnershipWitness {
|
|
19
|
+
/** Owner's derived public key (32 bytes hex) */
|
|
20
|
+
ownerPk: string;
|
|
21
|
+
/** Note commitment (32 bytes hex) */
|
|
22
|
+
commitment: string;
|
|
23
|
+
/** Nullifier revealed when spending (32 bytes hex) */
|
|
24
|
+
nullifier: string;
|
|
25
|
+
/** Blinded proxy for swarm delegation (32 bytes hex) */
|
|
26
|
+
blindedProxy: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Complete ownership proof ready for submission
|
|
30
|
+
*/
|
|
31
|
+
export interface OwnershipProof {
|
|
32
|
+
/** The ZK proof bytes */
|
|
33
|
+
proof: Uint8Array;
|
|
34
|
+
/** Public inputs to the circuit */
|
|
35
|
+
publicInputs: {
|
|
36
|
+
commitment: Bytes32;
|
|
37
|
+
nullifier: Bytes32;
|
|
38
|
+
blindedProxy: Bytes32;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Request to submit a delegated shielded transaction
|
|
43
|
+
*/
|
|
44
|
+
export interface DelegatedShieldedRequest {
|
|
45
|
+
/** Ownership proof (serialized) */
|
|
46
|
+
ownershipProof: Uint8Array;
|
|
47
|
+
/** Nullifier being spent */
|
|
48
|
+
nullifier: Bytes32;
|
|
49
|
+
/** Input commitment */
|
|
50
|
+
commitment: Bytes32;
|
|
51
|
+
/** Blinded proxy for swarm lookup */
|
|
52
|
+
blindedProxy: Bytes32;
|
|
53
|
+
/** Output commitment for new note */
|
|
54
|
+
outputCommitment: Bytes32;
|
|
55
|
+
/** Encrypted note data */
|
|
56
|
+
ciphertext: Uint8Array;
|
|
57
|
+
/** Ephemeral key for decryption */
|
|
58
|
+
ephemeralKey: Bytes32;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* OwnershipProver handles client-side ownership proof generation.
|
|
62
|
+
*
|
|
63
|
+
* This class:
|
|
64
|
+
* 1. Loads the WASM module for MiMC hash computation
|
|
65
|
+
* 2. Loads the Noir circuit for proof generation
|
|
66
|
+
* 3. Provides methods to compute witnesses and generate proofs
|
|
67
|
+
*
|
|
68
|
+
* Usage:
|
|
69
|
+
* ```typescript
|
|
70
|
+
* const prover = new OwnershipProver();
|
|
71
|
+
* await prover.init();
|
|
72
|
+
*
|
|
73
|
+
* // Compute witness from private inputs
|
|
74
|
+
* const witness = prover.computeWitness(spendingKey, value, blinding, position);
|
|
75
|
+
*
|
|
76
|
+
* // Generate proof
|
|
77
|
+
* const proof = await prover.prove(spendingKey, value, blinding, position);
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export declare class OwnershipProver {
|
|
81
|
+
private wasmModule;
|
|
82
|
+
private noirCircuit;
|
|
83
|
+
private backend;
|
|
84
|
+
private initialized;
|
|
85
|
+
/**
|
|
86
|
+
* Initialize the prover
|
|
87
|
+
*
|
|
88
|
+
* This loads:
|
|
89
|
+
* 1. The ownership-prover WASM module (MiMC hash)
|
|
90
|
+
* 2. The Noir circuit definition
|
|
91
|
+
* 3. The Barretenberg backend for proving
|
|
92
|
+
*
|
|
93
|
+
* @param options Configuration options
|
|
94
|
+
*/
|
|
95
|
+
init(options?: {
|
|
96
|
+
/** URL to fetch WASM from (defaults to CDN) */
|
|
97
|
+
wasmUrl?: string;
|
|
98
|
+
/** URL to fetch circuit JSON from (defaults to CDN) */
|
|
99
|
+
circuitUrl?: string;
|
|
100
|
+
/** Skip Noir initialization (for witness-only mode) */
|
|
101
|
+
witnessOnly?: boolean;
|
|
102
|
+
}): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Load the WASM module
|
|
105
|
+
*/
|
|
106
|
+
private loadWasmModule;
|
|
107
|
+
/**
|
|
108
|
+
* Load the Noir circuit and backend
|
|
109
|
+
*/
|
|
110
|
+
private loadNoirCircuit;
|
|
111
|
+
/**
|
|
112
|
+
* Check if the prover is initialized
|
|
113
|
+
*/
|
|
114
|
+
isInitialized(): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Check if proof generation is available
|
|
117
|
+
*/
|
|
118
|
+
canProve(): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Derive public key from spending key
|
|
121
|
+
*
|
|
122
|
+
* pk = MiMC_hash3(PK_DOMAIN, spending_key, 0)
|
|
123
|
+
*/
|
|
124
|
+
derivePublicKey(spendingKey: Bytes32): Bytes32;
|
|
125
|
+
/**
|
|
126
|
+
* Compute note commitment
|
|
127
|
+
*
|
|
128
|
+
* commitment = MiMC_hash3(owner_pk, value, blinding)
|
|
129
|
+
*/
|
|
130
|
+
computeCommitment(ownerPk: Bytes32, value: bigint, blinding: Bytes32): Bytes32;
|
|
131
|
+
/**
|
|
132
|
+
* Compute nullifier
|
|
133
|
+
*
|
|
134
|
+
* nullifier = MiMC_hash4(NULLIFIER_DOMAIN, spending_key, commitment, position)
|
|
135
|
+
*/
|
|
136
|
+
computeNullifier(spendingKey: Bytes32, commitment: Bytes32, position: bigint): Bytes32;
|
|
137
|
+
/**
|
|
138
|
+
* Compute blinded proxy for swarm delegation
|
|
139
|
+
*
|
|
140
|
+
* blinded_proxy = MiMC_hash3(DELEGATE_DOMAIN, commitment, position)
|
|
141
|
+
*/
|
|
142
|
+
computeBlindedProxy(commitment: Bytes32, position: bigint): Bytes32;
|
|
143
|
+
/**
|
|
144
|
+
* Compute complete witness from private inputs
|
|
145
|
+
*
|
|
146
|
+
* This computes all public outputs that will be revealed to the sequencer.
|
|
147
|
+
*/
|
|
148
|
+
computeWitness(spendingKey: Bytes32, value: bigint, blinding: Bytes32, position: bigint): OwnershipWitness;
|
|
149
|
+
/**
|
|
150
|
+
* Verify that computed witness matches expected values
|
|
151
|
+
*
|
|
152
|
+
* Useful for debugging before generating a proof.
|
|
153
|
+
*/
|
|
154
|
+
verifyWitness(spendingKey: Bytes32, value: bigint, blinding: Bytes32, position: bigint, expectedCommitment: Bytes32, expectedNullifier: Bytes32, expectedProxy: Bytes32): boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Generate an ownership proof
|
|
157
|
+
*
|
|
158
|
+
* This is the main entry point for proof generation. It:
|
|
159
|
+
* 1. Computes the witness using WASM MiMC
|
|
160
|
+
* 2. Generates the Noir proof using Barretenberg
|
|
161
|
+
*
|
|
162
|
+
* @param spendingKey The user's spending key (secret)
|
|
163
|
+
* @param value The note value in lamports
|
|
164
|
+
* @param blinding Random blinding factor
|
|
165
|
+
* @param position Position in the commitment tree
|
|
166
|
+
* @returns The proof and public inputs
|
|
167
|
+
*/
|
|
168
|
+
prove(spendingKey: Bytes32, value: bigint, blinding: Bytes32, position: bigint): Promise<OwnershipProof>;
|
|
169
|
+
/**
|
|
170
|
+
* Verify an ownership proof locally
|
|
171
|
+
*
|
|
172
|
+
* This is for debugging/testing. In production, the sequencer verifies proofs.
|
|
173
|
+
*/
|
|
174
|
+
verify(proof: OwnershipProof): Promise<boolean>;
|
|
175
|
+
private ensureInitialized;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Get or create the global prover instance
|
|
179
|
+
*/
|
|
180
|
+
export declare function getProver(): Promise<OwnershipProver>;
|
|
181
|
+
/**
|
|
182
|
+
* Compute witness using the global prover
|
|
183
|
+
*/
|
|
184
|
+
export declare function computeOwnershipWitness(spendingKey: Bytes32, value: bigint, blinding: Bytes32, position: bigint): Promise<OwnershipWitness>;
|
|
185
|
+
/**
|
|
186
|
+
* MockOwnershipProver provides a fake prover for development.
|
|
187
|
+
*
|
|
188
|
+
* It generates deterministic "proofs" using SHA-256 instead of real ZK proofs.
|
|
189
|
+
* This is useful for:
|
|
190
|
+
* - Development without WASM setup
|
|
191
|
+
* - Testing the API flow
|
|
192
|
+
* - Benchmarking non-proof overhead
|
|
193
|
+
*
|
|
194
|
+
* WARNING: This does NOT provide any cryptographic security!
|
|
195
|
+
*/
|
|
196
|
+
export declare class MockOwnershipProver extends OwnershipProver {
|
|
197
|
+
init(): Promise<void>;
|
|
198
|
+
isInitialized(): boolean;
|
|
199
|
+
canProve(): boolean;
|
|
200
|
+
derivePublicKey(spendingKey: Bytes32): Bytes32;
|
|
201
|
+
computeCommitment(ownerPk: Bytes32, value: bigint, blinding: Bytes32): Bytes32;
|
|
202
|
+
computeNullifier(spendingKey: Bytes32, commitment: Bytes32, position: bigint): Bytes32;
|
|
203
|
+
computeBlindedProxy(commitment: Bytes32, position: bigint): Bytes32;
|
|
204
|
+
computeWitness(spendingKey: Bytes32, value: bigint, blinding: Bytes32, position: bigint): OwnershipWitness;
|
|
205
|
+
prove(spendingKey: Bytes32, value: bigint, blinding: Bytes32, position: bigint): Promise<OwnershipProof>;
|
|
206
|
+
private mockHash;
|
|
207
|
+
}
|
|
208
|
+
export declare const mockProver: MockOwnershipProver;
|
|
209
|
+
//# sourceMappingURL=prover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prover.d.ts","sourceRoot":"","sources":["../src/prover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAOvC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,yBAAyB;IACzB,KAAK,EAAE,UAAU,CAAC;IAClB,mCAAmC;IACnC,YAAY,EAAE;QACZ,UAAU,EAAE,OAAO,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;QACnB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,mCAAmC;IACnC,cAAc,EAAE,UAAU,CAAC;IAC3B,4BAA4B;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,uBAAuB;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,YAAY,EAAE,OAAO,CAAC;IACtB,qCAAqC;IACrC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,0BAA0B;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,mCAAmC;IACnC,YAAY,EAAE,OAAO,CAAC;C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K,EAAE,MAAM,EACb,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,cAAc,CAAC;IAoB1B,OAAO,CAAC,QAAQ;CA0BjB;AAGD,eAAO,MAAM,UAAU,qBAA4B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zelana/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "TypeScript SDK for Zelana L2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
"type": "git",
|
|
45
45
|
"url": "https://github.com/zelana/zelana"
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|