@opaquecash/stealth-wasm 0.1.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.
@@ -0,0 +1,89 @@
1
+ /**
2
+ * `@opaquecash/stealth-wasm` — load and call the Opaque Rust/WASM cryptography module (wasm-pack `--target web`).
3
+ *
4
+ * Point {@link InitStealthWasmOptions.moduleUrl} at your deployed `cryptography.js` (or bundle it).
5
+ * The same module backs stealth scanning, key reconstruction, and PSR witness helpers.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import type { StealthWasmModule } from "./types.js";
10
+ export type { StealthWasmEntry, StealthWasmModule } from "./types.js";
11
+ /**
12
+ * Options for {@link initStealthWasm}.
13
+ */
14
+ export interface InitStealthWasmOptions {
15
+ /**
16
+ * URL or import path to the wasm-pack JS glue (e.g. `/pkg/cryptography.js`).
17
+ * If omitted, {@link initStealthWasm} uses `moduleSpecifier` or throws.
18
+ */
19
+ moduleUrl?: string | URL;
20
+ /**
21
+ * Dynamic `import()` string for bundlers (e.g. `new URL('./cryptography.js', import.meta.url).href`).
22
+ */
23
+ moduleSpecifier?: string;
24
+ /**
25
+ * Optional explicit wasm binary URL if the glue does not embed it.
26
+ */
27
+ wasmBinaryUrl?: string | URL;
28
+ }
29
+ /**
30
+ * Load the cryptography WASM module and return the API singleton.
31
+ *
32
+ * Idempotent: subsequent calls resolve the same initialized instance when `forceReload` is false.
33
+ *
34
+ * @param options - How to resolve the wasm-pack JavaScript entry; or pass a pre-imported module.
35
+ * @returns Initialized {@link StealthWasmModule}.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const wasm = await initStealthWasm({
40
+ * moduleSpecifier: new URL("/pkg/cryptography.js", import.meta.url).href,
41
+ * });
42
+ * const key = wasm.reconstruct_signing_key_wasm(spend, view, ephemeral);
43
+ * ```
44
+ */
45
+ export declare function initStealthWasm(options?: InitStealthWasmOptions & {
46
+ forceReload?: boolean;
47
+ }): Promise<StealthWasmModule>;
48
+ /**
49
+ * Reset the cached WASM instance (mainly for tests or hot reload).
50
+ */
51
+ export declare function resetStealthWasmCache(): void;
52
+ /**
53
+ * Cheap filter: compare announcement view tag to recipient viewing key + ephemeral pubkey.
54
+ *
55
+ * @param wasm - Initialized module from {@link initStealthWasm}.
56
+ * @param viewTag - First metadata byte from the announcement.
57
+ * @param viewPrivkeyBytes - 32-byte viewing private key.
58
+ * @param ephemeralPubkeyBytes - 33-byte compressed ephemeral public key.
59
+ * @returns `"PossibleMatch"` if the tag might match; `"NoMatch"` to skip full ECDH.
60
+ */
61
+ export declare function checkAnnouncementViewTag(wasm: StealthWasmModule, viewTag: number, viewPrivkeyBytes: Uint8Array, ephemeralPubkeyBytes: Uint8Array): string;
62
+ /**
63
+ * Verify that an announcement belongs to this recipient (full check).
64
+ */
65
+ export declare function checkAnnouncement(wasm: StealthWasmModule, announcementStealthAddress: string, viewTag: number, viewPrivkeyBytes: Uint8Array, spendPubkeyBytes: Uint8Array, ephemeralPubkeyBytes: Uint8Array): boolean;
66
+ /**
67
+ * Reconstruct the 32-byte one-time stealth private key for the given announcement keys.
68
+ */
69
+ export declare function reconstructSigningKey(wasm: StealthWasmModule, masterSpendPrivBytes: Uint8Array, masterViewPrivBytes: Uint8Array, ephemeralPubkeyBytes: Uint8Array): Uint8Array;
70
+ /**
71
+ * Derive stealth address + view tag using WASM (sender flow).
72
+ */
73
+ export declare function deriveStealthAddress(wasm: StealthWasmModule, viewPrivkeyBytes: Uint8Array, spendPubkeyBytes: Uint8Array, ephemeralPubkeyBytes: Uint8Array): {
74
+ stealthAddress: string;
75
+ viewTag: number;
76
+ };
77
+ /**
78
+ * Encode announcement metadata for a PSR attestation (view tag byte + attestation id).
79
+ */
80
+ export declare function encodeAttestationMetadata(wasm: StealthWasmModule, viewTag: number, attestationId: bigint): string;
81
+ /**
82
+ * Run WASM witness generation for the reputation circuit from a JSON attestation list.
83
+ */
84
+ export declare function generateReputationWitnessJson(wasm: StealthWasmModule, attestationsJson: string, targetTraitId: string, stealthPrivkeyBytes: Uint8Array, externalNullifier: string): string;
85
+ /**
86
+ * Scan announcements JSON and return JSON string of matching stealth attestations.
87
+ */
88
+ export declare function scanAttestationsJson(wasm: StealthWasmModule, announcementsJson: string, viewPrivkeyBytes: Uint8Array, spendPubkeyBytes: Uint8Array): string;
89
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAoB,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEtE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAItE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,eAAe,CACnC,OAAO,CAAC,EAAE,sBAAsB,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,GAC3D,OAAO,CAAC,iBAAiB,CAAC,CAwB5B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,UAAU,EAC5B,oBAAoB,EAAE,UAAU,GAC/B,MAAM,CAMR;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,iBAAiB,EACvB,0BAA0B,EAAE,MAAM,EAClC,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,UAAU,EAC5B,gBAAgB,EAAE,UAAU,EAC5B,oBAAoB,EAAE,UAAU,GAC/B,OAAO,CAQT;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,iBAAiB,EACvB,oBAAoB,EAAE,UAAU,EAChC,mBAAmB,EAAE,UAAU,EAC/B,oBAAoB,EAAE,UAAU,GAC/B,UAAU,CAMZ;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,iBAAiB,EACvB,gBAAgB,EAAE,UAAU,EAC5B,gBAAgB,EAAE,UAAU,EAC5B,oBAAoB,EAAE,UAAU,GAC/B;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAM7C;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACpB,MAAM,CAER;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,iBAAiB,EACvB,gBAAgB,EAAE,MAAM,EACxB,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,UAAU,EAC/B,iBAAiB,EAAE,MAAM,GACxB,MAAM,CAOR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,iBAAiB,EACvB,iBAAiB,EAAE,MAAM,EACzB,gBAAgB,EAAE,UAAU,EAC5B,gBAAgB,EAAE,UAAU,GAC3B,MAAM,CAMR"}
package/dist/index.js ADDED
@@ -0,0 +1,100 @@
1
+ /**
2
+ * `@opaquecash/stealth-wasm` — load and call the Opaque Rust/WASM cryptography module (wasm-pack `--target web`).
3
+ *
4
+ * Point {@link InitStealthWasmOptions.moduleUrl} at your deployed `cryptography.js` (or bundle it).
5
+ * The same module backs stealth scanning, key reconstruction, and PSR witness helpers.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ let cached = null;
10
+ /**
11
+ * Load the cryptography WASM module and return the API singleton.
12
+ *
13
+ * Idempotent: subsequent calls resolve the same initialized instance when `forceReload` is false.
14
+ *
15
+ * @param options - How to resolve the wasm-pack JavaScript entry; or pass a pre-imported module.
16
+ * @returns Initialized {@link StealthWasmModule}.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const wasm = await initStealthWasm({
21
+ * moduleSpecifier: new URL("/pkg/cryptography.js", import.meta.url).href,
22
+ * });
23
+ * const key = wasm.reconstruct_signing_key_wasm(spend, view, ephemeral);
24
+ * ```
25
+ */
26
+ export async function initStealthWasm(options) {
27
+ if (cached && !options?.forceReload)
28
+ return cached;
29
+ const spec = options?.moduleSpecifier ?? options?.moduleUrl?.toString();
30
+ if (!spec) {
31
+ throw new Error("initStealthWasm: provide `moduleSpecifier` or `moduleUrl` to your cryptography.js entry");
32
+ }
33
+ const mod = (await import(/* webpackIgnore: true */ spec));
34
+ const initFn = mod.default ?? mod.init;
35
+ if (typeof initFn === "function") {
36
+ await initFn(options?.wasmBinaryUrl !== undefined
37
+ ? { module_or_path: options.wasmBinaryUrl }
38
+ : undefined);
39
+ }
40
+ else if (typeof mod.init === "function") {
41
+ mod.init();
42
+ }
43
+ cached = mod;
44
+ return cached;
45
+ }
46
+ /**
47
+ * Reset the cached WASM instance (mainly for tests or hot reload).
48
+ */
49
+ export function resetStealthWasmCache() {
50
+ cached = null;
51
+ }
52
+ /**
53
+ * Cheap filter: compare announcement view tag to recipient viewing key + ephemeral pubkey.
54
+ *
55
+ * @param wasm - Initialized module from {@link initStealthWasm}.
56
+ * @param viewTag - First metadata byte from the announcement.
57
+ * @param viewPrivkeyBytes - 32-byte viewing private key.
58
+ * @param ephemeralPubkeyBytes - 33-byte compressed ephemeral public key.
59
+ * @returns `"PossibleMatch"` if the tag might match; `"NoMatch"` to skip full ECDH.
60
+ */
61
+ export function checkAnnouncementViewTag(wasm, viewTag, viewPrivkeyBytes, ephemeralPubkeyBytes) {
62
+ return wasm.check_announcement_view_tag_wasm(viewTag, viewPrivkeyBytes, ephemeralPubkeyBytes);
63
+ }
64
+ /**
65
+ * Verify that an announcement belongs to this recipient (full check).
66
+ */
67
+ export function checkAnnouncement(wasm, announcementStealthAddress, viewTag, viewPrivkeyBytes, spendPubkeyBytes, ephemeralPubkeyBytes) {
68
+ return wasm.check_announcement_wasm(announcementStealthAddress, viewTag, viewPrivkeyBytes, spendPubkeyBytes, ephemeralPubkeyBytes);
69
+ }
70
+ /**
71
+ * Reconstruct the 32-byte one-time stealth private key for the given announcement keys.
72
+ */
73
+ export function reconstructSigningKey(wasm, masterSpendPrivBytes, masterViewPrivBytes, ephemeralPubkeyBytes) {
74
+ return wasm.reconstruct_signing_key_wasm(masterSpendPrivBytes, masterViewPrivBytes, ephemeralPubkeyBytes);
75
+ }
76
+ /**
77
+ * Derive stealth address + view tag using WASM (sender flow).
78
+ */
79
+ export function deriveStealthAddress(wasm, viewPrivkeyBytes, spendPubkeyBytes, ephemeralPubkeyBytes) {
80
+ return wasm.derive_stealth_address_wasm(viewPrivkeyBytes, spendPubkeyBytes, ephemeralPubkeyBytes);
81
+ }
82
+ /**
83
+ * Encode announcement metadata for a PSR attestation (view tag byte + attestation id).
84
+ */
85
+ export function encodeAttestationMetadata(wasm, viewTag, attestationId) {
86
+ return wasm.encode_attestation_metadata_wasm(viewTag, attestationId);
87
+ }
88
+ /**
89
+ * Run WASM witness generation for the reputation circuit from a JSON attestation list.
90
+ */
91
+ export function generateReputationWitnessJson(wasm, attestationsJson, targetTraitId, stealthPrivkeyBytes, externalNullifier) {
92
+ return wasm.generate_reputation_witness(attestationsJson, targetTraitId, stealthPrivkeyBytes, externalNullifier);
93
+ }
94
+ /**
95
+ * Scan announcements JSON and return JSON string of matching stealth attestations.
96
+ */
97
+ export function scanAttestationsJson(wasm, announcementsJson, viewPrivkeyBytes, spendPubkeyBytes) {
98
+ return wasm.scan_attestations_wasm(announcementsJson, viewPrivkeyBytes, spendPubkeyBytes);
99
+ }
100
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],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,48 @@
1
+ /**
2
+ * Shape of the Opaque `cryptography` wasm-pack module (`init`, `reconstruct_signing_key_wasm`, …).
3
+ *
4
+ * Implementations are generated by Rust; this interface is the stable SDK surface.
5
+ */
6
+ export interface StealthWasmModule {
7
+ /**
8
+ * One-time WASM runtime initialization (safe to call once per page/worker).
9
+ */
10
+ init?(): void;
11
+ /**
12
+ * Fast view-tag prefilter: returns `"NoMatch"` or `"PossibleMatch"`.
13
+ */
14
+ check_announcement_view_tag_wasm(viewTag: number, viewPrivkeyBytes: Uint8Array, ephemeralPubkeyBytes: Uint8Array): string;
15
+ /**
16
+ * Full ownership check for an announcement against view key + spend pubkey + ephemeral key.
17
+ */
18
+ check_announcement_wasm(announcementStealthAddress: string, viewTag: number, viewPrivkeyBytes: Uint8Array, spendPubkeyBytes: Uint8Array, ephemeralPubkeyBytes: Uint8Array): boolean;
19
+ /**
20
+ * Derive one-time stealth address and view tag (sender-side helper).
21
+ */
22
+ derive_stealth_address_wasm(viewPrivkeyBytes: Uint8Array, spendPubkeyBytes: Uint8Array, ephemeralPubkeyBytes: Uint8Array): {
23
+ stealthAddress: string;
24
+ viewTag: number;
25
+ };
26
+ /**
27
+ * Encode PSR attestation metadata for `announce` calldata (view tag + attestation id).
28
+ */
29
+ encode_attestation_metadata_wasm(viewTag: number, attestationId: bigint): string;
30
+ /**
31
+ * Build a Circom JSON witness from indexed attestations (see Rust docs).
32
+ */
33
+ generate_reputation_witness(attestationsJson: string, targetTraitId: string, stealthPrivkeyBytes: Uint8Array, externalNullifier: string): string;
34
+ /**
35
+ * Reconstruct the 32-byte one-time stealth **private** key for spend / PSR witness input.
36
+ */
37
+ reconstruct_signing_key_wasm(masterSpendPrivBytes: Uint8Array, masterViewPrivBytes: Uint8Array, ephemeralPubkeyBytes: Uint8Array): Uint8Array;
38
+ /**
39
+ * Scan announcements JSON for attestation markers for this recipient.
40
+ */
41
+ scan_attestations_wasm(announcementsJson: string, viewPrivkeyBytes: Uint8Array, spendPubkeyBytes: Uint8Array): string;
42
+ }
43
+ /** Module shape including default `init` export from wasm-bindgen. */
44
+ export type StealthWasmEntry = StealthWasmModule & {
45
+ default?: (input?: unknown) => Promise<StealthWasmModule>;
46
+ init?: (input?: unknown) => Promise<StealthWasmModule>;
47
+ };
48
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,CAAC,IAAI,IAAI,CAAC;IAEd;;OAEG;IACH,gCAAgC,CAC9B,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,UAAU,EAC5B,oBAAoB,EAAE,UAAU,GAC/B,MAAM,CAAC;IAEV;;OAEG;IACH,uBAAuB,CACrB,0BAA0B,EAAE,MAAM,EAClC,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,UAAU,EAC5B,gBAAgB,EAAE,UAAU,EAC5B,oBAAoB,EAAE,UAAU,GAC/B,OAAO,CAAC;IAEX;;OAEG;IACH,2BAA2B,CACzB,gBAAgB,EAAE,UAAU,EAC5B,gBAAgB,EAAE,UAAU,EAC5B,oBAAoB,EAAE,UAAU,GAC/B;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAE/C;;OAEG;IACH,gCAAgC,CAC9B,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACpB,MAAM,CAAC;IAEV;;OAEG;IACH,2BAA2B,CACzB,gBAAgB,EAAE,MAAM,EACxB,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,UAAU,EAC/B,iBAAiB,EAAE,MAAM,GACxB,MAAM,CAAC;IAEV;;OAEG;IACH,4BAA4B,CAC1B,oBAAoB,EAAE,UAAU,EAChC,mBAAmB,EAAE,UAAU,EAC/B,oBAAoB,EAAE,UAAU,GAC/B,UAAU,CAAC;IAEd;;OAEG;IACH,sBAAsB,CACpB,iBAAiB,EAAE,MAAM,EACzB,gBAAgB,EAAE,UAAU,EAC5B,gBAAgB,EAAE,UAAU,GAC3B,MAAM,CAAC;CACX;AAED,sEAAsE;AACtE,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;IACjD,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC1D,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACxD,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@opaquecash/stealth-wasm",
3
+ "version": "0.1.0",
4
+ "description": "Loader and TypeScript bindings for Opaque cryptography (wasm-pack) module",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsc -p tsconfig.json",
19
+ "clean": "rm -rf dist"
20
+ },
21
+ "sideEffects": false
22
+ }