@hyperdag/proof-verifier 0.1.0 → 0.2.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.
@@ -1,176 +1,176 @@
1
- /* @ts-self-types="./hyperdag_proof_verifier.d.ts" */
2
-
3
- function init_panic_hook() {
4
- wasm.init_panic_hook();
5
- }
6
- exports.init_panic_hook = init_panic_hook;
7
-
8
- /**
9
- * @param {string} input_json
10
- * @returns {string}
11
- */
12
- function verify_proof(input_json) {
13
- let deferred2_0;
14
- let deferred2_1;
15
- try {
16
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
17
- const ptr0 = passStringToWasm0(input_json, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
18
- const len0 = WASM_VECTOR_LEN;
19
- wasm.verify_proof(retptr, ptr0, len0);
20
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
21
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
22
- deferred2_0 = r0;
23
- deferred2_1 = r1;
24
- return getStringFromWasm0(r0, r1);
25
- } finally {
26
- wasm.__wbindgen_add_to_stack_pointer(16);
27
- wasm.__wbindgen_export(deferred2_0, deferred2_1, 1);
28
- }
29
- }
30
- exports.verify_proof = verify_proof;
31
- function __wbg_get_imports() {
32
- const import0 = {
33
- __proto__: null,
34
- __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
35
- let deferred0_0;
36
- let deferred0_1;
37
- try {
38
- deferred0_0 = arg0;
39
- deferred0_1 = arg1;
40
- console.error(getStringFromWasm0(arg0, arg1));
41
- } finally {
42
- wasm.__wbindgen_export(deferred0_0, deferred0_1, 1);
43
- }
44
- },
45
- __wbg_new_227d7c05414eb861: function() {
46
- const ret = new Error();
47
- return addHeapObject(ret);
48
- },
49
- __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
50
- const ret = getObject(arg1).stack;
51
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
52
- const len1 = WASM_VECTOR_LEN;
53
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
54
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
55
- },
56
- __wbindgen_object_drop_ref: function(arg0) {
57
- takeObject(arg0);
58
- },
59
- };
60
- return {
61
- __proto__: null,
62
- "./hyperdag_proof_verifier_bg.js": import0,
63
- };
64
- }
65
-
66
- function addHeapObject(obj) {
67
- if (heap_next === heap.length) heap.push(heap.length + 1);
68
- const idx = heap_next;
69
- heap_next = heap[idx];
70
-
71
- heap[idx] = obj;
72
- return idx;
73
- }
74
-
75
- function dropObject(idx) {
76
- if (idx < 1028) return;
77
- heap[idx] = heap_next;
78
- heap_next = idx;
79
- }
80
-
81
- let cachedDataViewMemory0 = null;
82
- function getDataViewMemory0() {
83
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
84
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
85
- }
86
- return cachedDataViewMemory0;
87
- }
88
-
89
- function getStringFromWasm0(ptr, len) {
90
- return decodeText(ptr >>> 0, len);
91
- }
92
-
93
- let cachedUint8ArrayMemory0 = null;
94
- function getUint8ArrayMemory0() {
95
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
96
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
97
- }
98
- return cachedUint8ArrayMemory0;
99
- }
100
-
101
- function getObject(idx) { return heap[idx]; }
102
-
103
- let heap = new Array(1024).fill(undefined);
104
- heap.push(undefined, null, true, false);
105
-
106
- let heap_next = heap.length;
107
-
108
- function passStringToWasm0(arg, malloc, realloc) {
109
- if (realloc === undefined) {
110
- const buf = cachedTextEncoder.encode(arg);
111
- const ptr = malloc(buf.length, 1) >>> 0;
112
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
113
- WASM_VECTOR_LEN = buf.length;
114
- return ptr;
115
- }
116
-
117
- let len = arg.length;
118
- let ptr = malloc(len, 1) >>> 0;
119
-
120
- const mem = getUint8ArrayMemory0();
121
-
122
- let offset = 0;
123
-
124
- for (; offset < len; offset++) {
125
- const code = arg.charCodeAt(offset);
126
- if (code > 0x7F) break;
127
- mem[ptr + offset] = code;
128
- }
129
- if (offset !== len) {
130
- if (offset !== 0) {
131
- arg = arg.slice(offset);
132
- }
133
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
134
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
135
- const ret = cachedTextEncoder.encodeInto(arg, view);
136
-
137
- offset += ret.written;
138
- ptr = realloc(ptr, len, offset, 1) >>> 0;
139
- }
140
-
141
- WASM_VECTOR_LEN = offset;
142
- return ptr;
143
- }
144
-
145
- function takeObject(idx) {
146
- const ret = getObject(idx);
147
- dropObject(idx);
148
- return ret;
149
- }
150
-
151
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
152
- cachedTextDecoder.decode();
153
- function decodeText(ptr, len) {
154
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
155
- }
156
-
157
- const cachedTextEncoder = new TextEncoder();
158
-
159
- if (!('encodeInto' in cachedTextEncoder)) {
160
- cachedTextEncoder.encodeInto = function (arg, view) {
161
- const buf = cachedTextEncoder.encode(arg);
162
- view.set(buf);
163
- return {
164
- read: arg.length,
165
- written: buf.length
166
- };
167
- };
168
- }
169
-
170
- let WASM_VECTOR_LEN = 0;
171
-
172
- const wasmPath = `${__dirname}/hyperdag_proof_verifier_bg.wasm`;
173
- const wasmBytes = require('fs').readFileSync(wasmPath);
174
- const wasmModule = new WebAssembly.Module(wasmBytes);
175
- let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
176
- let wasm = wasmInstance.exports;
1
+ /* @ts-self-types="./hyperdag_proof_verifier.d.ts" */
2
+
3
+ function init_panic_hook() {
4
+ wasm.init_panic_hook();
5
+ }
6
+ exports.init_panic_hook = init_panic_hook;
7
+
8
+ /**
9
+ * @param {string} input_json
10
+ * @returns {string}
11
+ */
12
+ function verify_proof(input_json) {
13
+ let deferred2_0;
14
+ let deferred2_1;
15
+ try {
16
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
17
+ const ptr0 = passStringToWasm0(input_json, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
18
+ const len0 = WASM_VECTOR_LEN;
19
+ wasm.verify_proof(retptr, ptr0, len0);
20
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
21
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
22
+ deferred2_0 = r0;
23
+ deferred2_1 = r1;
24
+ return getStringFromWasm0(r0, r1);
25
+ } finally {
26
+ wasm.__wbindgen_add_to_stack_pointer(16);
27
+ wasm.__wbindgen_export(deferred2_0, deferred2_1, 1);
28
+ }
29
+ }
30
+ exports.verify_proof = verify_proof;
31
+ function __wbg_get_imports() {
32
+ const import0 = {
33
+ __proto__: null,
34
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
35
+ let deferred0_0;
36
+ let deferred0_1;
37
+ try {
38
+ deferred0_0 = arg0;
39
+ deferred0_1 = arg1;
40
+ console.error(getStringFromWasm0(arg0, arg1));
41
+ } finally {
42
+ wasm.__wbindgen_export(deferred0_0, deferred0_1, 1);
43
+ }
44
+ },
45
+ __wbg_new_227d7c05414eb861: function() {
46
+ const ret = new Error();
47
+ return addHeapObject(ret);
48
+ },
49
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
50
+ const ret = getObject(arg1).stack;
51
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
52
+ const len1 = WASM_VECTOR_LEN;
53
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
54
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
55
+ },
56
+ __wbindgen_object_drop_ref: function(arg0) {
57
+ takeObject(arg0);
58
+ },
59
+ };
60
+ return {
61
+ __proto__: null,
62
+ "./hyperdag_proof_verifier_bg.js": import0,
63
+ };
64
+ }
65
+
66
+ function addHeapObject(obj) {
67
+ if (heap_next === heap.length) heap.push(heap.length + 1);
68
+ const idx = heap_next;
69
+ heap_next = heap[idx];
70
+
71
+ heap[idx] = obj;
72
+ return idx;
73
+ }
74
+
75
+ function dropObject(idx) {
76
+ if (idx < 1028) return;
77
+ heap[idx] = heap_next;
78
+ heap_next = idx;
79
+ }
80
+
81
+ let cachedDataViewMemory0 = null;
82
+ function getDataViewMemory0() {
83
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
84
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
85
+ }
86
+ return cachedDataViewMemory0;
87
+ }
88
+
89
+ function getStringFromWasm0(ptr, len) {
90
+ return decodeText(ptr >>> 0, len);
91
+ }
92
+
93
+ let cachedUint8ArrayMemory0 = null;
94
+ function getUint8ArrayMemory0() {
95
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
96
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
97
+ }
98
+ return cachedUint8ArrayMemory0;
99
+ }
100
+
101
+ function getObject(idx) { return heap[idx]; }
102
+
103
+ let heap = new Array(1024).fill(undefined);
104
+ heap.push(undefined, null, true, false);
105
+
106
+ let heap_next = heap.length;
107
+
108
+ function passStringToWasm0(arg, malloc, realloc) {
109
+ if (realloc === undefined) {
110
+ const buf = cachedTextEncoder.encode(arg);
111
+ const ptr = malloc(buf.length, 1) >>> 0;
112
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
113
+ WASM_VECTOR_LEN = buf.length;
114
+ return ptr;
115
+ }
116
+
117
+ let len = arg.length;
118
+ let ptr = malloc(len, 1) >>> 0;
119
+
120
+ const mem = getUint8ArrayMemory0();
121
+
122
+ let offset = 0;
123
+
124
+ for (; offset < len; offset++) {
125
+ const code = arg.charCodeAt(offset);
126
+ if (code > 0x7F) break;
127
+ mem[ptr + offset] = code;
128
+ }
129
+ if (offset !== len) {
130
+ if (offset !== 0) {
131
+ arg = arg.slice(offset);
132
+ }
133
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
134
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
135
+ const ret = cachedTextEncoder.encodeInto(arg, view);
136
+
137
+ offset += ret.written;
138
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
139
+ }
140
+
141
+ WASM_VECTOR_LEN = offset;
142
+ return ptr;
143
+ }
144
+
145
+ function takeObject(idx) {
146
+ const ret = getObject(idx);
147
+ dropObject(idx);
148
+ return ret;
149
+ }
150
+
151
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
152
+ cachedTextDecoder.decode();
153
+ function decodeText(ptr, len) {
154
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
155
+ }
156
+
157
+ const cachedTextEncoder = new TextEncoder();
158
+
159
+ if (!('encodeInto' in cachedTextEncoder)) {
160
+ cachedTextEncoder.encodeInto = function (arg, view) {
161
+ const buf = cachedTextEncoder.encode(arg);
162
+ view.set(buf);
163
+ return {
164
+ read: arg.length,
165
+ written: buf.length
166
+ };
167
+ };
168
+ }
169
+
170
+ let WASM_VECTOR_LEN = 0;
171
+
172
+ const wasmPath = `${__dirname}/hyperdag_proof_verifier_bg.wasm`;
173
+ const wasmBytes = require('fs').readFileSync(wasmPath);
174
+ const wasmModule = new WebAssembly.Module(wasmBytes);
175
+ let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
176
+ let wasm = wasmInstance.exports;
@@ -1,9 +1,9 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- export const memory: WebAssembly.Memory;
4
- export const verify_proof: (a: number, b: number, c: number) => void;
5
- export const init_panic_hook: () => void;
6
- export const __wbindgen_export: (a: number, b: number, c: number) => void;
7
- export const __wbindgen_export2: (a: number, b: number) => number;
8
- export const __wbindgen_export3: (a: number, b: number, c: number, d: number) => number;
9
- export const __wbindgen_add_to_stack_pointer: (a: number) => number;
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const verify_proof: (a: number, b: number, c: number) => void;
5
+ export const init_panic_hook: () => void;
6
+ export const __wbindgen_export: (a: number, b: number, c: number) => void;
7
+ export const __wbindgen_export2: (a: number, b: number) => number;
8
+ export const __wbindgen_export3: (a: number, b: number, c: number, d: number) => number;
9
+ export const __wbindgen_add_to_stack_pointer: (a: number) => number;
@@ -1,17 +1,19 @@
1
- {
2
- "name": "hyperdag-proof-verifier",
3
- "description": "Client-side Plonky3 STARK verifier for HyperDAG RepID proofs",
4
- "version": "0.1.0",
5
- "license": "MIT OR Apache-2.0",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/DealAppSeo/hyperdag-proof-verifier"
9
- },
10
- "files": [
11
- "hyperdag_proof_verifier_bg.wasm",
12
- "hyperdag_proof_verifier.js",
13
- "hyperdag_proof_verifier.d.ts"
14
- ],
15
- "main": "hyperdag_proof_verifier.js",
16
- "types": "hyperdag_proof_verifier.d.ts"
1
+ {
2
+ "name": "hyperdag-proof-verifier",
3
+ "description": "Client-side Plonky3 STARK verifier for HyperDAG RepID proofs",
4
+ "version": "0.2.0",
5
+ "license": "MIT OR Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/DealAppSeo/hyperdag-proof-verifier"
9
+ },
10
+ "files": [
11
+ "hyperdag_proof_verifier_bg.wasm",
12
+ "hyperdag_proof_verifier.js",
13
+ "hyperdag_proof_verifier.d.ts",
14
+ "LICENSE-APACHE",
15
+ "LICENSE-MIT"
16
+ ],
17
+ "main": "hyperdag_proof_verifier.js",
18
+ "types": "hyperdag_proof_verifier.d.ts"
17
19
  }
package/pkg-web/README.md CHANGED
@@ -1,50 +1,51 @@
1
- # @hyperdag/proof-verifier
2
- Verify HyperDAG STARK proofs in your browser or Node app. No server trust.
3
-
4
- ## Why this exists
5
- HyperDAG's zkp-postcard service generates Plonky3 STARK proofs for every agent decision. If you trust HyperDAG's server when it says `verified: true`, you're just trusting a server. With this package, your code verifies the cryptographic proof itself — locally, deterministically, with no network call.
6
-
7
- ## Install
8
- ```bash
9
- npm install @hyperdag/proof-verifier
10
- ```
11
-
12
- ## Usage (3 lines)
13
- ```js
14
- import { verify } from '@hyperdag/proof-verifier';
15
- const result = await verify(proofBytes, statement);
16
- console.log(result.verified); // true | false
17
- ```
18
-
19
- ## End-to-end example with the SDK
20
- ```js
21
- import { TrustShell } from '@hyperdag/trustshell';
22
- import { verify } from '@hyperdag/proof-verifier';
23
-
24
- const trust = new TrustShell({ ...config });
25
- const decision = await trust.report({ ... });
26
- const proof = await trust.getProof(decision.proof_job_id);
27
- const result = await verify(proof.proof_bytes, proof.statement);
28
- if (!result.verified) throw new Error('proof failed verification — DO NOT TRUST');
29
- ```
30
-
31
- ## What gets verified
32
- - The agent had the claimed RepID at the claimed time.
33
- - The RepID fits within the 32-bit range check relative to the threshold.
34
- - The statement claim (score > threshold) is cryptographically consistent with the proof.
35
-
36
- ## Bundle size
37
- | Target | .wasm size |
38
- |---------|-----------|
39
- | bundler | TBD |
40
- | nodejs | TBD |
41
- | web | TBD |
42
-
43
- ## Performance
44
- Verify time (10-run avg on Node 20, Windows): TBD ms
45
-
46
- ## Plonky3 version pinning
47
- This verifier is pinned to the EXACT Plonky3 revisions used by zkp-postcard. Mismatched versions cannot verify. See Cargo.toml.
48
-
49
- ## License
50
- MIT OR Apache-2.0
1
+ # @hyperdag/proof-verifier
2
+ Verify HyperDAG STARK proofs in your browser or Node app. No server trust.
3
+
4
+ ## Why this exists
5
+ HyperDAG's zkp-postcard service generates Plonky3 STARK proofs for every agent decision. If you trust HyperDAG's server when it says `verified: true`, you're just trusting a server. With this package, your code verifies the cryptographic proof itself — locally, deterministically, with no network call.
6
+
7
+ ## Install
8
+ ```bash
9
+ npm install @hyperdag/proof-verifier
10
+ ```
11
+
12
+ ## Usage (3 lines)
13
+ ```js
14
+ import { verify } from '@hyperdag/proof-verifier';
15
+ const result = await verify(proofBytes, statement);
16
+ console.log(result.verified); // true | false
17
+ ```
18
+
19
+ ## End-to-end example with the SDK
20
+ ```js
21
+ import { TrustShell } from '@hyperdag/trustshell';
22
+ import { verify } from '@hyperdag/proof-verifier';
23
+
24
+ const trust = new TrustShell({ ...config });
25
+ const decision = await trust.report({ ... });
26
+ const proof = await trust.getProof(decision.proof_job_id);
27
+ const result = await verify(proof.proof_bytes, proof.statement);
28
+ if (!result.verified) throw new Error('proof failed verification — DO NOT TRUST');
29
+ ```
30
+
31
+ ## What gets verified
32
+ - The agent had the claimed RepID at the claimed time.
33
+ - The RepID fits within the 32-bit range check relative to the threshold.
34
+ - The statement claim (score > threshold) is cryptographically consistent with the proof.
35
+
36
+ ## Bundle size
37
+ | Target | .wasm size |
38
+ |---------|-----------|
39
+ | bundler | 230 KB |
40
+ | nodejs | 230 KB |
41
+ | web | 230 KB |
42
+
43
+ ## Performance
44
+ Verify time (avg on Node 22, Windows): ~110 ms
45
+ Verify time (estimated Chrome/M3): ~150 ms
46
+
47
+ ## Plonky3 version pinning
48
+ This verifier is pinned to the EXACT Plonky3 revisions used by zkp-postcard. Mismatched versions cannot verify. See Cargo.toml.
49
+
50
+ ## License
51
+ MIT OR Apache-2.0
@@ -1,40 +1,40 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
-
4
- export function init_panic_hook(): void;
5
-
6
- export function verify_proof(input_json: string): string;
7
-
8
- export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
9
-
10
- export interface InitOutput {
11
- readonly memory: WebAssembly.Memory;
12
- readonly verify_proof: (a: number, b: number, c: number) => void;
13
- readonly init_panic_hook: () => void;
14
- readonly __wbindgen_export: (a: number, b: number, c: number) => void;
15
- readonly __wbindgen_export2: (a: number, b: number) => number;
16
- readonly __wbindgen_export3: (a: number, b: number, c: number, d: number) => number;
17
- readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
18
- }
19
-
20
- export type SyncInitInput = BufferSource | WebAssembly.Module;
21
-
22
- /**
23
- * Instantiates the given `module`, which can either be bytes or
24
- * a precompiled `WebAssembly.Module`.
25
- *
26
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
27
- *
28
- * @returns {InitOutput}
29
- */
30
- export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
31
-
32
- /**
33
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
34
- * for everything else, calls `WebAssembly.instantiate` directly.
35
- *
36
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
37
- *
38
- * @returns {Promise<InitOutput>}
39
- */
40
- export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ export function init_panic_hook(): void;
5
+
6
+ export function verify_proof(input_json: string): string;
7
+
8
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
9
+
10
+ export interface InitOutput {
11
+ readonly memory: WebAssembly.Memory;
12
+ readonly verify_proof: (a: number, b: number, c: number) => void;
13
+ readonly init_panic_hook: () => void;
14
+ readonly __wbindgen_export: (a: number, b: number, c: number) => void;
15
+ readonly __wbindgen_export2: (a: number, b: number) => number;
16
+ readonly __wbindgen_export3: (a: number, b: number, c: number, d: number) => number;
17
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
18
+ }
19
+
20
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
21
+
22
+ /**
23
+ * Instantiates the given `module`, which can either be bytes or
24
+ * a precompiled `WebAssembly.Module`.
25
+ *
26
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
27
+ *
28
+ * @returns {InitOutput}
29
+ */
30
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
31
+
32
+ /**
33
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
34
+ * for everything else, calls `WebAssembly.instantiate` directly.
35
+ *
36
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
37
+ *
38
+ * @returns {Promise<InitOutput>}
39
+ */
40
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;