@dmarket/p2p-tracker-core 0.1.0-SNAPSHOT.99 → 1.0.1-beta

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.
Files changed (66) hide show
  1. package/VERSION +14 -0
  2. package/dmarket-p2p-tracker-core-domain.mjs +11510 -4975
  3. package/dmarket-p2p-tracker-core-domain.mjs.map +1 -1
  4. package/kotlin-kotlin-stdlib.mjs +3168 -2664
  5. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  6. package/kotlinx-atomicfu.mjs +13 -13
  7. package/kotlinx-coroutines-core.mjs +2758 -2428
  8. package/kotlinx-coroutines-core.mjs.map +1 -1
  9. package/kotlinx-io-kotlinx-io-bytestring.mjs +44 -44
  10. package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -1
  11. package/kotlinx-io-kotlinx-io-core.mjs +517 -497
  12. package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
  13. package/kotlinx-serialization-kotlinx-serialization-core.mjs +1791 -1790
  14. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
  15. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1586 -1564
  16. package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
  17. package/ktor-ktor-client-core.mjs +3047 -3048
  18. package/ktor-ktor-client-core.mjs.map +1 -1
  19. package/ktor-ktor-events.mjs +6 -6
  20. package/ktor-ktor-http-cio.mjs +491 -491
  21. package/ktor-ktor-http.mjs +666 -646
  22. package/ktor-ktor-http.mjs.map +1 -1
  23. package/ktor-ktor-io.mjs +1145 -1059
  24. package/ktor-ktor-io.mjs.map +1 -1
  25. package/ktor-ktor-utils.mjs +794 -786
  26. package/ktor-ktor-utils.mjs.map +1 -1
  27. package/ktor-ktor-websockets.mjs +855 -799
  28. package/ktor-ktor-websockets.mjs.map +1 -1
  29. package/p2p-tracker-core.d.mts +110 -40
  30. package/p2p-tracker-core.mjs +28378 -11117
  31. package/p2p-tracker-core.mjs.map +1 -1
  32. package/package.json +2 -4
  33. package/pkg/README.md +92 -0
  34. package/pkg/client_wasm.d.ts +312 -0
  35. package/pkg/client_wasm.js +1187 -0
  36. package/pkg/client_wasm_bg.wasm +0 -0
  37. package/pkg/client_wasm_bg.wasm.d.ts +32 -0
  38. package/pkg/package.json +19 -0
  39. package/pkg/snippets/web-spawn-05868593a72e2d44/js/spawn.js +73 -0
  40. package/pkg/spawn.js +73 -0
  41. package/transport/README.md +172 -0
  42. package/transport/dist/channel.d.ts +48 -0
  43. package/transport/dist/channel.d.ts.map +1 -0
  44. package/transport/dist/channel.js +150 -0
  45. package/transport/dist/channel.js.map +1 -0
  46. package/transport/dist/index.d.ts +8 -0
  47. package/transport/dist/index.d.ts.map +1 -0
  48. package/transport/dist/index.js +18 -0
  49. package/transport/dist/index.js.map +1 -0
  50. package/transport/dist/prover.d.ts +103 -0
  51. package/transport/dist/prover.d.ts.map +1 -0
  52. package/transport/dist/prover.js +139 -0
  53. package/transport/dist/prover.js.map +1 -0
  54. package/transport/dist/transport.d.ts +31 -0
  55. package/transport/dist/transport.d.ts.map +1 -0
  56. package/transport/dist/transport.js +75 -0
  57. package/transport/dist/transport.js.map +1 -0
  58. package/transport/dist/types.d.ts +162 -0
  59. package/transport/dist/types.d.ts.map +1 -0
  60. package/transport/dist/types.js +21 -0
  61. package/transport/dist/types.js.map +1 -0
  62. package/transport/dist/wasm-compat.d.ts +2 -0
  63. package/transport/dist/wasm-compat.d.ts.map +1 -0
  64. package/transport/dist/wasm-compat.js +15 -0
  65. package/transport/dist/wasm-compat.js.map +1 -0
  66. package/transport/package.json +28 -0
package/package.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "name": "@dmarket/p2p-tracker-core",
3
- "version": "0.1.0-SNAPSHOT.99",
3
+ "version": "1.0.1-beta",
4
4
  "main": "p2p-tracker-core.mjs",
5
5
  "types": "p2p-tracker-core.d.mts",
6
6
  "devDependencies": {
7
7
  "typescript": "5.9.3"
8
8
  },
9
- "dependencies": {
10
- "ws": "8.20.1"
11
- },
9
+ "dependencies": {},
12
10
  "peerDependencies": {},
13
11
  "optionalDependencies": {},
14
12
  "bundledDependencies": [],
package/pkg/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # client-wasm — browser-extension prover (wasm `cdylib`)
2
+
3
+ > **Status — bindings + packaging shipped; live e2e deferred to its own scope.**
4
+ > The `#[wasm_bindgen]` surface (`initialize` / `prove` / `present` +
5
+ > `ProveOutput`), the tsify DTOs, and the JS-injected IO adapter (`src/io.rs`
6
+ > `JsIo`/`JsIoAdapter`) are all in place and the crate links for
7
+ > `wasm32-unknown-unknown`. `build.sh` packages it with `wasm-pack` into `pkg/`,
8
+ > and the WebSocket transport lives in [`ts/`](ts/README.md). The **automated
9
+ > end-to-end run is deferred to a later, separately-scoped effort** — both host
10
+ > paths carry real cost (Node needs a single-threaded rebuild; headless Chrome
11
+ > pulls in Chromium). The manual recipe is kept in [`RUN_E2E.md`](RUN_E2E.md).
12
+ > (Branch journal `feature/DMA-61/wasm-client`, entries 10–12.)
13
+
14
+ This crate is the wasm `cdylib` half of the prover: it injects a JS-backed
15
+ futures-io transport and calls `client-core`'s issuance + presentation flow. It
16
+ is **excluded from the root Cargo workspace** because it carries its own wasm
17
+ build target (nightly + `build-std` + a crate-local `.cargo/config.toml`), which
18
+ would break a host `cargo build` if it were a member — the same reason `dep/tlsn`
19
+ is excluded. It is reached only via path-deps. The whole crate is
20
+ `#![cfg(target_arch = "wasm32")]`, so on any other target it compiles to nothing.
21
+
22
+ ## Exported bindings (over `client-core`, diverging from upstream `tlsn` wasm)
23
+
24
+ Upstream `dep/tlsn/crates/wasm` is the *interactive-verifier* prover and ends at
25
+ `reveal(reveal, commit)` over `tlsn-sdk-core` — no signed attestation. We instead
26
+ expose the **attestation** flow over `client-core` (which binds `tlsn` +
27
+ `tlsn-attestation`). The generated `pkg/client_wasm.d.ts` is the authoritative
28
+ signature source; in brief:
29
+
30
+ | export | shape | notes |
31
+ | --- | --- | --- |
32
+ | `initialize(logging?, threadCount)` | `Promise<void>` | installs logging + the panic hook, starts the `web-spawn` spawner, builds the rayon MPC pool. **Await once** before `prove`. |
33
+ | `prove(notaryIo, serverIo, config, request, progressCb?)` | `Promise<ProveOutput>` | runs MPC-TLS + the length-prefixed phase-2 exchange → `client_core::issue_with_progress`. |
34
+ | `ProveOutput` | `{ attestation, secrets: Uint8Array; response: HttpResponse }` | the two opaque `postcard` blobs to persist together, plus the target's HTTP response. `Uint8Array` (not tsify `number[]`) so the large blobs don't bloat — journal 08. |
35
+ | `present(attestation, secrets, policy?)` | `Uint8Array` | offline (no notary/network, no `initialize`) → `client_core::present`; omit `policy` for the safe default redactions. |
36
+
37
+ DTOs (`src/types.rs`, tsify): `IssuanceConfig`, `HttpRequest`, `HttpResponse`,
38
+ `RevealPolicy`, `RootStore` (`"mozilla" | { pem }`), `BodyReveal` (`"all" |
39
+ "none" | { jsonPaths }` — `jsonPaths` reveals each field **with its key path**,
40
+ is not directly `JSON.parse`-able, and widens to the whole array for any path
41
+ that indexes into one). Logging config: `LoggingConfig` / `LoggingLevel` /
42
+ `CrateLogFilter`. `progressCb` receives `{ step, progress, message, source:
43
+ "wasm" }` at each `ProgressStage` boundary.
44
+
45
+ The IO channels are **not** opened here — a browser extension can't open raw TCP
46
+ and can't set an `Authorization` header on a WebSocket. The transport that
47
+ performs the `Sec-WebSocket-Protocol` bearer handshake and supplies the two
48
+ channels lives in [`ts/`](ts/README.md); the client just consumes the injected
49
+ `IoChannel` (the interface is exported into the `.d.ts` from a
50
+ `typescript_custom_section` in `src/io.rs` — the single source of truth).
51
+
52
+ ## Build & packaging
53
+
54
+ `./build.sh` runs `wasm-pack build --profile wasm --target web` and emits `pkg/`
55
+ (`client_wasm.js`, `client_wasm_bg.wasm`, `client_wasm.d.ts`, `package.json`, and
56
+ the patched `spawn.js` + `snippets/`). Pass args through — `./build.sh --dev` for
57
+ a fast unoptimized build.
58
+
59
+ - **Prerequisite: an LLVM `clang` with the wasm backend** (Apple clang won't
60
+ compile `ring`'s C). `build.sh` sets `CC_wasm32_unknown_unknown` /
61
+ `AR_wasm32_unknown_unknown` automatically on macOS; no-op on Linux.
62
+ - **`wasm-pack ≥ 0.14.0`** (for the custom `--profile`). `build.sh` guards the
63
+ version.
64
+ - **Toolchain** (`rust-toolchain`, `.cargo/config.toml`): nightly + `rust-src`,
65
+ `build-std=["panic_abort","std"]`, and the multi-threaded rustflags
66
+ (`+atomics,+bulk-memory,+mutable-globals,+simd128`, `--shared-memory`,
67
+ `--import-memory`, TLS/heap exports, `getrandom_backend="wasm_js"`).
68
+ - `[profile.wasm]` in `Cargo.toml` (lto, `panic="abort"`, `codegen-units=1`) —
69
+ needed because the crate is its own build root (excluded from the workspace, so
70
+ it can't inherit a workspace profile). Optimized `pkg/` is ~10 MB (dev ~51 MB).
71
+
72
+ ## The JS/TS transport → [`ts/`](ts/README.md)
73
+
74
+ `client-wasm-transport`: the two browser-`WebSocket` `IoChannel`s that `prove()`
75
+ consumes (`connectNotary` / `connectProxy`), the browser mirror of the native
76
+ `test-full-e2e/src/ws.rs`. Type-only coupling to `pkg/` (no runtime import); see
77
+ its README for the contract, semantics, and a usage example.
78
+
79
+ ## Running end-to-end → [`RUN_E2E.md`](RUN_E2E.md) (deferred scope)
80
+
81
+ The live run — wasm `prove()`/`present()` against the in-repo notary + echo
82
+ server through the ws→tcp proxy, verified by the validator — is **deferred to its
83
+ own future effort**. `RUN_E2E.md` holds the manual recipe, the two host options
84
+ (A: Node single-threaded — needs a rebuild dropping the threading rustflags +
85
+ `tlsn default-features=false`; B: headless Chrome + COOP/COEP), and the
86
+ `wrangler`/proxy prerequisite, as the starting point when that scope opens.
87
+
88
+ ## Integrator note (cross-origin isolation)
89
+
90
+ The multi-threaded wasm build uses `SharedArrayBuffer`, so the embedding
91
+ page/extension **must be cross-origin isolated** (COOP `same-origin` + COEP
92
+ `require-corp`). Plan the extension/page headers accordingly.
@@ -0,0 +1,312 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ export interface IoChannel {
5
+ read(): Promise<Uint8Array | null>;
6
+ write(data: Uint8Array): Promise<void>;
7
+ close(): Promise<void>;
8
+ }
9
+
10
+
11
+ /**
12
+ * A per-crate (per-`target`) level override.
13
+ */
14
+ export interface CrateLogFilter {
15
+ level: LoggingLevel;
16
+ name: string;
17
+ }
18
+
19
+ /**
20
+ * How much of the response body to reveal.
21
+ *
22
+ * TS: `\"all\" | \"none\" | { jsonPaths: string[] }`.
23
+ *
24
+ * `jsonPaths` reveals each selected field **with the key path that names it**
25
+ * (and the enclosing braces/commas), not just the value — a value on its own
26
+ * proves the bytes were in the response but not the field they came from. Two
27
+ * consequences: the revealed body is not directly parseable JSON (hidden
28
+ * siblings are `\'#\'` sentinel runs, though the structure is recoverable), and a
29
+ * path that indexes into an array reveals the **whole array** — upstream never
30
+ * commits array elements individually. Full account:
31
+ * [`client_core::BodyReveal::JsonPaths`].
32
+ */
33
+ export type BodyReveal = "all" | "none" | { jsonPaths: string[] };
34
+
35
+ /**
36
+ * Logging configuration passed from JS to [`crate::initialize`].
37
+ */
38
+ export interface LoggingConfig {
39
+ /**
40
+ * Default level applied to all targets. Defaults to `Info`.
41
+ */
42
+ level: LoggingLevel | undefined;
43
+ /**
44
+ * Optional per-crate (target-prefix) overrides.
45
+ */
46
+ crate_filters: CrateLogFilter[] | undefined;
47
+ }
48
+
49
+ /**
50
+ * One-variant helper so the untagged [`RootStore`] union renders the bare
51
+ * string `\"mozilla\"`. serde `untagged` matches a unit variant against `null`,
52
+ * not a string, so the standard workaround is a `rename_all = \"lowercase\"`
53
+ * single-variant enum whose only value serializes as `\"mozilla\"`.
54
+ */
55
+ export type RootStorePreset = "mozilla";
56
+
57
+ /**
58
+ * The HTTP request to prove.
59
+ *
60
+ * TS: `{ method: string; uri: string; headers?: [string, string][];
61
+ * body?: number[] }`. Protocol-load-bearing headers (`Host`,
62
+ * `Accept-Encoding: identity`, `Connection: close`) are injected by
63
+ * [`client_core::issue`]; caller `headers` merge on top.
64
+ */
65
+ export interface HttpRequest {
66
+ method: string;
67
+ uri: string;
68
+ headers?: [string, string][];
69
+ body?: number[];
70
+ }
71
+
72
+ /**
73
+ * The issuance configuration (the locked OQ-D surface).
74
+ *
75
+ * TS: `{ serverName: string; maxSentData?: number; maxSentRecords?: number;
76
+ * maxRecvDataOnline?: number; maxRecvRecordsOnline?: number;
77
+ * maxRecvData?: number; rootStore?: RootStore }`.
78
+ * Omitted caps keep the [`client_core`] contract defaults; omitted `rootStore`
79
+ * keeps the Mozilla roots.
80
+ */
81
+ export interface IssuanceConfig {
82
+ serverName: string;
83
+ maxSentData?: number;
84
+ maxSentRecords?: number;
85
+ maxRecvDataOnline?: number;
86
+ maxRecvRecordsOnline?: number;
87
+ maxRecvData?: number;
88
+ rootStore?: RootStore;
89
+ }
90
+
91
+ /**
92
+ * The selective-disclosure policy for [`present`](client_core::present).
93
+ *
94
+ * TS: `{ redactRequestHeaderValues: string[]; revealRequestTarget: boolean;
95
+ * revealResponseHeaders: boolean; revealResponseBody: BodyReveal }`. All
96
+ * fields are **required**: a silently-empty `redactRequestHeaderValues` would
97
+ * leak `authorization` / `cookie` / `user-agent` (which
98
+ * [`client_core::HttpRevealPolicy::default`] redacts), so a caller who
99
+ * supplies a policy supplies it fully. `revealRequestTarget: false` withholds
100
+ * the request line\'s whole path+query span from the presentation — query
101
+ * strings routinely carry credentials (e.g. `?access_token=…`); the core
102
+ * default (and pre-existing behavior) is `true`. The `present()` binding makes
103
+ * the *whole policy* optional and falls back to the safe default when omitted.
104
+ */
105
+ export interface RevealPolicy {
106
+ redactRequestHeaderValues: string[];
107
+ revealRequestTarget: boolean;
108
+ revealResponseHeaders: boolean;
109
+ revealResponseBody: BodyReveal;
110
+ }
111
+
112
+ /**
113
+ * The target\'s HTTP response, captured during issuance and returned to JS for
114
+ * convenience (the cryptographic material is the attestation/secrets blobs, not
115
+ * this).
116
+ *
117
+ * TS: `{ status: number; headers: [string, string][]; body: number[] }`.
118
+ */
119
+ export interface HttpResponse {
120
+ status: number;
121
+ headers: [string, string][];
122
+ body: number[];
123
+ }
124
+
125
+ /**
126
+ * Verbosity level for a subscriber or a per-crate filter.
127
+ */
128
+ export type LoggingLevel = "Off" | "Trace" | "Debug" | "Info" | "Warn" | "Error";
129
+
130
+ /**
131
+ * Where to anchor the target server\'s certificate chain.
132
+ *
133
+ * TS: `\"mozilla\" | { pem: string }`. `\"mozilla\"` (and an absent `rootStore`)
134
+ * keeps the [`client_core::IssuanceConfig::new`] default (the Mozilla
135
+ * public-web-PKI set); `{ pem }` supplies a custom CA bundle for test fixtures
136
+ * or private endpoints.
137
+ */
138
+ export type RootStore = RootStorePreset | { pem: string };
139
+
140
+
141
+ /**
142
+ * The successful result of [`prove`]: the two opaque `postcard` blobs the
143
+ * extension persists — `attestation` and `secrets` — plus the target's HTTP
144
+ * `response`.
145
+ *
146
+ * `attestation` and `secrets` are `Uint8Array` (wasm-bindgen's native `Vec<u8>`
147
+ * mapping), **not** tsify `number[]`: tsify renders `Vec<u8>` as `number[]`,
148
+ * which would bloat these large blobs, so they are returned as byte arrays via
149
+ * this `#[wasm_bindgen]` class rather than as fields of a tsify struct (branch
150
+ * journal 08). Persist `attestation` + `secrets` together and later hand them
151
+ * to [`present`].
152
+ */
153
+ export class ProveOutput {
154
+ private constructor();
155
+ free(): void;
156
+ [Symbol.dispose](): void;
157
+ /**
158
+ * The notary-signed attestation, `postcard`-encoded (`Uint8Array`).
159
+ */
160
+ readonly attestation: Uint8Array;
161
+ /**
162
+ * The target's HTTP response observed during issuance (convenience only —
163
+ * the cryptographic material is `attestation` + `secrets`, not this).
164
+ */
165
+ readonly response: HttpResponse;
166
+ /**
167
+ * The connection secrets, `postcard`-encoded (`Uint8Array`). Required by
168
+ * [`present`]; persist alongside `attestation`.
169
+ */
170
+ readonly secrets: Uint8Array;
171
+ }
172
+
173
+ /**
174
+ * Global spawner which spawns closures into web workers.
175
+ */
176
+ export class Spawner {
177
+ private constructor();
178
+ free(): void;
179
+ [Symbol.dispose](): void;
180
+ intoRaw(): number;
181
+ /**
182
+ * Runs the spawner.
183
+ */
184
+ run(url: string): Promise<void>;
185
+ }
186
+
187
+ export class WorkerData {
188
+ private constructor();
189
+ free(): void;
190
+ [Symbol.dispose](): void;
191
+ }
192
+
193
+ /**
194
+ * Initializes the module: installs logging + the panic hook, starts the
195
+ * `web-spawn` spawner, and builds the rayon global thread pool used by the MPC
196
+ * backend. Call (and await) it before [`prove`](crate)ing.
197
+ *
198
+ * **Idempotent.** The tracing subscriber and rayon's *global* thread pool can
199
+ * each be installed only once — a second attempt panics / throws — and
200
+ * `web-spawn`'s spawner would start a second worker if re-run. Extension
201
+ * lifecycle code can easily call `initialize` more than once, so a duplicate
202
+ * call here is a no-op that returns `Ok(())`. On failure the one-time claim is
203
+ * released, so a genuine retry (e.g. after the page adds the COOP/COEP headers
204
+ * `start_spawner` needs) can proceed.
205
+ *
206
+ * A near-verbatim port of upstream `dep/tlsn/crates/wasm/src/lib.rs`, with the
207
+ * idempotency guard added and logging configured locally rather than via
208
+ * `tlsn-sdk-core` (see [`log`]).
209
+ */
210
+ export function initialize(logging_config: LoggingConfig | null | undefined, thread_count: number): Promise<void>;
211
+
212
+ /**
213
+ * Builds a verifiable `Presentation` from a persisted `(attestation, secrets)`
214
+ * pair, revealing exactly what `policy` permits. Offline — no notary, no
215
+ * network — so this needs no IO channel and no prior [`initialize`].
216
+ *
217
+ * `attestation_bytes` / `secrets_bytes` are the `postcard` blobs from a prior
218
+ * [`prove`] (its [`ProveOutput`] `attestation` / `secrets`). `policy` is
219
+ * optional: when omitted it falls back to the **safe**
220
+ * `client_core::HttpRevealPolicy::default`, which redacts the `authorization` /
221
+ * `cookie` / `user-agent` request-header values. Returns the `postcard`-encoded
222
+ * `Presentation` (`Uint8Array`) to ship to a verifying backend.
223
+ */
224
+ export function present(attestation_bytes: Uint8Array, secrets_bytes: Uint8Array, policy?: RevealPolicy | null): Uint8Array;
225
+
226
+ /**
227
+ * Runs one full issuance over the two JS-supplied IO channels: MPC-TLS commit
228
+ * with the notary over `notary_io`, the single HTTP exchange with the target
229
+ * over `server_io`, the selective-disclosure prove step, then the
230
+ * length-prefixed `postcard(AttestationRequest)` → `Attestation` phase-2
231
+ * exchange — yielding a notary-signed attestation validated against the
232
+ * prover's own view.
233
+ *
234
+ * - `config` — the locked issuance surface ([`IssuanceConfig`]).
235
+ * - `request` — the single HTTP request to prove ([`HttpRequest`]).
236
+ * - `progress_cb` — optional; invoked at each `ProgressStage` boundary with
237
+ * `{ step, progress, message, source: "wasm" }` (shape mirrors upstream
238
+ * tlsn-wasm's progress events).
239
+ *
240
+ * [`initialize`] must have been called (and awaited) first — it installs the
241
+ * rayon pool the MPC backend needs. The returned `Promise` rejects with the
242
+ * stringified error on any failure.
243
+ */
244
+ export function prove(notary_io: IoChannel, server_io: IoChannel, config: IssuanceConfig, request: HttpRequest, progress_cb?: Function | null): Promise<ProveOutput>;
245
+
246
+ /**
247
+ * Starts the thread spawner on a dedicated worker thread.
248
+ */
249
+ export function startSpawner(): Promise<any>;
250
+
251
+ export function web_spawn_recover_spawner(spawner: number): Spawner;
252
+
253
+ export function web_spawn_start_worker(worker: number): void;
254
+
255
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
256
+
257
+ export interface InitOutput {
258
+ readonly __wbg_proveoutput_free: (a: number, b: number) => void;
259
+ readonly initialize: (a: number, b: number) => any;
260
+ readonly present: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
261
+ readonly prove: (a: any, b: any, c: any, d: any, e: number) => any;
262
+ readonly proveoutput_attestation: (a: number) => [number, number];
263
+ readonly proveoutput_response: (a: number) => any;
264
+ readonly proveoutput_secrets: (a: number) => [number, number];
265
+ readonly __wbg_spawner_free: (a: number, b: number) => void;
266
+ readonly __wbg_workerdata_free: (a: number, b: number) => void;
267
+ readonly spawner_intoRaw: (a: number) => number;
268
+ readonly spawner_run: (a: number, b: number, c: number) => any;
269
+ readonly startSpawner: () => any;
270
+ readonly web_spawn_recover_spawner: (a: number) => number;
271
+ readonly web_spawn_start_worker: (a: number) => void;
272
+ readonly ring_core_0_17_14__bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
273
+ readonly wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___wasm_bindgen_1fa5c626ec3a32f9___JsValue__core_b7b33017ae0f8bb5___result__Result_____wasm_bindgen_1fa5c626ec3a32f9___JsError___true_: (a: number, b: number, c: any) => [number, number];
274
+ readonly wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___js_sys_27d0ccca2911ffcd___Function_fn_wasm_bindgen_1fa5c626ec3a32f9___JsValue_____wasm_bindgen_1fa5c626ec3a32f9___sys__Undefined___js_sys_27d0ccca2911ffcd___Function_fn_wasm_bindgen_1fa5c626ec3a32f9___JsValue_____wasm_bindgen_1fa5c626ec3a32f9___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
275
+ readonly wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___wasm_bindgen_1fa5c626ec3a32f9___JsValue______true_: (a: number, b: number, c: any) => void;
276
+ readonly wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___js_sys_27d0ccca2911ffcd___futures__task__wait_async_polyfill__MessageEvent______true_: (a: number, b: number, c: any) => void;
277
+ readonly memory: WebAssembly.Memory;
278
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
279
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
280
+ readonly __wbindgen_exn_store: (a: number) => void;
281
+ readonly __externref_table_alloc: () => number;
282
+ readonly __wbindgen_externrefs: WebAssembly.Table;
283
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
284
+ readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
285
+ readonly __externref_table_dealloc: (a: number) => void;
286
+ readonly __wbindgen_thread_destroy: (a?: number, b?: number, c?: number) => void;
287
+ readonly __wbindgen_start: (a: number) => void;
288
+ }
289
+
290
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
291
+
292
+ /**
293
+ * Instantiates the given `module`, which can either be bytes or
294
+ * a precompiled `WebAssembly.Module`.
295
+ *
296
+ * @param {{ module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number }} module - Passing `SyncInitInput` directly is deprecated.
297
+ * @param {WebAssembly.Memory} memory - Deprecated.
298
+ *
299
+ * @returns {InitOutput}
300
+ */
301
+ export function initSync(module: { module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number } | SyncInitInput, memory?: WebAssembly.Memory): InitOutput;
302
+
303
+ /**
304
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
305
+ * for everything else, calls `WebAssembly.instantiate` directly.
306
+ *
307
+ * @param {{ module_or_path: InitInput | Promise<InitInput>, memory?: WebAssembly.Memory, thread_stack_size?: number }} module_or_path - Passing `InitInput` directly is deprecated.
308
+ * @param {WebAssembly.Memory} memory - Deprecated.
309
+ *
310
+ * @returns {Promise<InitOutput>}
311
+ */
312
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput>, memory?: WebAssembly.Memory, thread_stack_size?: number } | InitInput | Promise<InitInput>, memory?: WebAssembly.Memory): Promise<InitOutput>;