@dmarket/p2p-tracker-headless 0.0.0-bootstrap.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.
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +4 -0
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
- package/VERSION +14 -0
- package/dmarket-p2p-tracker-core-domain.mjs +16699 -0
- package/dmarket-p2p-tracker-core-domain.mjs.map +1 -0
- package/index.d.ts +195 -0
- package/kotlin-kotlin-stdlib.mjs +18834 -0
- package/kotlin-kotlin-stdlib.mjs.map +1 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -0
- package/kotlinx-atomicfu.mjs +251 -0
- package/kotlinx-atomicfu.mjs.map +1 -0
- package/kotlinx-browser.mjs +8 -0
- package/kotlinx-browser.mjs.map +1 -0
- package/kotlinx-coroutines-core.mjs +12437 -0
- package/kotlinx-coroutines-core.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-bytestring.mjs +202 -0
- package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-core.mjs +2034 -0
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +6163 -0
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
- package/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +5957 -0
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
- package/ktor-ktor-client-content-negotiation.mjs +4 -0
- package/ktor-ktor-client-content-negotiation.mjs.map +1 -0
- package/ktor-ktor-client-core.mjs +9986 -0
- package/ktor-ktor-client-core.mjs.map +1 -0
- package/ktor-ktor-events.mjs +82 -0
- package/ktor-ktor-events.mjs.map +1 -0
- package/ktor-ktor-http-cio.mjs +2253 -0
- package/ktor-ktor-http-cio.mjs.map +1 -0
- package/ktor-ktor-http.mjs +3261 -0
- package/ktor-ktor-http.mjs.map +1 -0
- package/ktor-ktor-io.mjs +3546 -0
- package/ktor-ktor-io.mjs.map +1 -0
- package/ktor-ktor-openapi-schema.mjs +4 -0
- package/ktor-ktor-openapi-schema.mjs.map +1 -0
- package/ktor-ktor-serialization-kotlinx-json.mjs +4 -0
- package/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -0
- package/ktor-ktor-serialization-kotlinx.mjs +4 -0
- package/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
- package/ktor-ktor-serialization.mjs +4 -0
- package/ktor-ktor-serialization.mjs.map +1 -0
- package/ktor-ktor-sse.mjs +4 -0
- package/ktor-ktor-sse.mjs.map +1 -0
- package/ktor-ktor-utils.mjs +3427 -0
- package/ktor-ktor-utils.mjs.map +1 -0
- package/ktor-ktor-websocket-serialization.mjs +4 -0
- package/ktor-ktor-websocket-serialization.mjs.map +1 -0
- package/ktor-ktor-websockets.mjs +2589 -0
- package/ktor-ktor-websockets.mjs.map +1 -0
- package/p2p-tracker-core.mjs +41977 -0
- package/p2p-tracker-core.mjs.map +1 -0
- package/p2p-tracker-headless.mjs +4939 -0
- package/p2p-tracker-headless.mjs.map +1 -0
- package/package.json +58 -0
- package/pkg/README.md +104 -0
- package/pkg/client_wasm.d.ts +316 -0
- package/pkg/client_wasm.js +1199 -0
- package/pkg/client_wasm_bg.wasm +0 -0
- package/pkg/client_wasm_bg.wasm.d.ts +32 -0
- package/pkg/package.json +19 -0
- package/pkg/snippets/web-spawn-05868593a72e2d44/js/spawn.js +73 -0
- package/pkg/spawn.js +73 -0
- package/prover-child.mjs +2 -0
- package/transport/README.md +240 -0
- package/transport/dist/channel.d.ts +48 -0
- package/transport/dist/channel.d.ts.map +1 -0
- package/transport/dist/channel.js +150 -0
- package/transport/dist/channel.js.map +1 -0
- package/transport/dist/index.d.ts +10 -0
- package/transport/dist/index.d.ts.map +1 -0
- package/transport/dist/index.js +19 -0
- package/transport/dist/index.js.map +1 -0
- package/transport/dist/node.d.ts +4 -0
- package/transport/dist/node.d.ts.map +1 -0
- package/transport/dist/node.js +62 -0
- package/transport/dist/node.js.map +1 -0
- package/transport/dist/prover.d.ts +105 -0
- package/transport/dist/prover.d.ts.map +1 -0
- package/transport/dist/prover.js +139 -0
- package/transport/dist/prover.js.map +1 -0
- package/transport/dist/tcp.d.ts +38 -0
- package/transport/dist/tcp.d.ts.map +1 -0
- package/transport/dist/tcp.js +88 -0
- package/transport/dist/tcp.js.map +1 -0
- package/transport/dist/transport.d.ts +31 -0
- package/transport/dist/transport.d.ts.map +1 -0
- package/transport/dist/transport.js +75 -0
- package/transport/dist/transport.js.map +1 -0
- package/transport/dist/types.d.ts +162 -0
- package/transport/dist/types.d.ts.map +1 -0
- package/transport/dist/types.js +21 -0
- package/transport/dist/types.js.map +1 -0
- package/transport/dist/wasm-compat.d.ts +2 -0
- package/transport/dist/wasm-compat.d.ts.map +1 -0
- package/transport/dist/wasm-compat.js +15 -0
- package/transport/dist/wasm-compat.js.map +1 -0
- package/transport/package.json +34 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The duplex byte channel `prove()` drives. Mirrors the `IoChannel`
|
|
3
|
+
* `typescript_custom_section` in `client-wasm/src/io.rs` (asserted identical
|
|
4
|
+
* in `wasm-compat.ts`); implemented by `WsIoChannel` and `TcpIoChannel`.
|
|
5
|
+
*/
|
|
6
|
+
export interface IoChannel {
|
|
7
|
+
/** Next inbound chunk, or `null` on EOF (Rust maps it to `Ok(0)`). */
|
|
8
|
+
read(): Promise<Uint8Array | null>;
|
|
9
|
+
write(data: Uint8Array): Promise<void>;
|
|
10
|
+
close(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
/** Verbosity level for a subscriber or a per-crate filter. */
|
|
13
|
+
export type LoggingLevel = "Off" | "Trace" | "Debug" | "Info" | "Warn" | "Error";
|
|
14
|
+
/** A per-crate (per-`target`) level override. */
|
|
15
|
+
export interface CrateLogFilter {
|
|
16
|
+
level: LoggingLevel;
|
|
17
|
+
name: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Logging options for `Prover.initialize`. Façade shape: both fields are
|
|
21
|
+
* truly optional (the generated `LoggingConfig` marks them required-but-
|
|
22
|
+
* nullable), and `crateFilters` is camelCase — the wasm wire field is
|
|
23
|
+
* `crate_filters`, the one snake_case field in the whole generated surface
|
|
24
|
+
* (`client-wasm/src/log.rs` lacks `rename_all = "camelCase"`; journal 21).
|
|
25
|
+
* `createProver` converts.
|
|
26
|
+
*/
|
|
27
|
+
export interface LoggingConfig {
|
|
28
|
+
/** Default level applied to all targets. Defaults to `Info`. */
|
|
29
|
+
level?: LoggingLevel;
|
|
30
|
+
/** Optional per-crate (target-prefix) overrides. */
|
|
31
|
+
crateFilters?: CrateLogFilter[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* One-variant helper so the untagged `RootStore` union renders the bare
|
|
35
|
+
* string `"mozilla"` (see `client-wasm/src/types.rs`).
|
|
36
|
+
*/
|
|
37
|
+
export type RootStorePreset = "mozilla";
|
|
38
|
+
/**
|
|
39
|
+
* Where to anchor the target server's certificate chain. `"mozilla"` (and an
|
|
40
|
+
* absent `rootStore`) keeps the `client_core` default (the Mozilla public-
|
|
41
|
+
* web-PKI set); `{ pem }` supplies a custom CA bundle for test fixtures or
|
|
42
|
+
* private endpoints.
|
|
43
|
+
*/
|
|
44
|
+
export type RootStore = RootStorePreset | {
|
|
45
|
+
pem: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* The issuance configuration (the locked OQ-D surface). Omitted caps keep the
|
|
49
|
+
* `client_core` contract defaults; omitted `rootStore` keeps the Mozilla
|
|
50
|
+
* roots. Identical to the generated `IssuanceConfig` — passed through as-is.
|
|
51
|
+
*/
|
|
52
|
+
export interface IssuanceConfig {
|
|
53
|
+
serverName: string;
|
|
54
|
+
maxSentData?: number;
|
|
55
|
+
/** Optional sent application-data record budget. */
|
|
56
|
+
maxSentRecords?: number;
|
|
57
|
+
/** Response bytes preprocessed for online decryption (default: 2 KiB). */
|
|
58
|
+
maxRecvDataOnline?: number;
|
|
59
|
+
/** Optional received application-data record budget for online decryption. */
|
|
60
|
+
maxRecvRecordsOnline?: number;
|
|
61
|
+
maxRecvData?: number;
|
|
62
|
+
rootStore?: RootStore;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The HTTP request to prove. Protocol-load-bearing headers (`Host`,
|
|
66
|
+
* `Accept-Encoding: identity`, `Connection: close`) are injected by
|
|
67
|
+
* `client_core::issue`; caller `headers` merge on top.
|
|
68
|
+
*
|
|
69
|
+
* Façade shape: `body` also accepts a `Uint8Array` — the wasm wire type is
|
|
70
|
+
* `number[]` (tsify's `Vec<u8>` rendering); `createProver` converts.
|
|
71
|
+
*/
|
|
72
|
+
export interface HttpRequest {
|
|
73
|
+
method: string;
|
|
74
|
+
uri: string;
|
|
75
|
+
headers?: [string, string][];
|
|
76
|
+
body?: Uint8Array | number[];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The target's HTTP response, captured during issuance and returned for
|
|
80
|
+
* convenience (the cryptographic material is the attestation/secrets blobs,
|
|
81
|
+
* not this).
|
|
82
|
+
*
|
|
83
|
+
* Façade shape: `body` is a `Uint8Array` — the wasm wire type is `number[]`
|
|
84
|
+
* (tsify's `Vec<u8>` rendering); `createProver` converts.
|
|
85
|
+
*/
|
|
86
|
+
export interface HttpResponse {
|
|
87
|
+
status: number;
|
|
88
|
+
headers: [string, string][];
|
|
89
|
+
body: Uint8Array;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* How much of the response body to reveal in a presentation.
|
|
93
|
+
* `"all" | "none" | { jsonPaths: [...] }`. Identical to the generated type.
|
|
94
|
+
*
|
|
95
|
+
* `jsonPaths` reveals each selected field **with the key path that names it**
|
|
96
|
+
* (plus the enclosing braces and commas), not just the value — a value on its
|
|
97
|
+
* own proves those bytes were in the authenticated response, but nothing ties
|
|
98
|
+
* them to the field they came from. Two things to plan for: the revealed body
|
|
99
|
+
* is **not** directly `JSON.parse`-able, because hidden siblings come back as
|
|
100
|
+
* `'#'` sentinel runs (the structure is recoverable — commas and braces are
|
|
101
|
+
* revealed — but the bytes are not JSON); and a path that indexes into an
|
|
102
|
+
* array, e.g. `"favoriteColors.0"`, reveals the **whole array**, because the
|
|
103
|
+
* notary never commits array elements individually so an element cannot be
|
|
104
|
+
* proven on its own.
|
|
105
|
+
*/
|
|
106
|
+
export type BodyReveal = "all" | "none" | {
|
|
107
|
+
jsonPaths: string[];
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* The selective-disclosure policy for `present`. Identical to the generated
|
|
111
|
+
* type, **all fields required** by design: a silently-empty
|
|
112
|
+
* `redactRequestHeaderValues` would leak `authorization` / `cookie` /
|
|
113
|
+
* `user-agent`, so a caller who supplies a policy supplies it fully. Omitting
|
|
114
|
+
* the whole policy falls back to `client_core::HttpRevealPolicy::default`,
|
|
115
|
+
* which redacts those three header values — but note it also keeps
|
|
116
|
+
* `revealRequestTarget: true`, i.e. **the default reveals the request
|
|
117
|
+
* path+query**; pass an explicit policy with `revealRequestTarget: false` to
|
|
118
|
+
* withhold a credential-bearing query string.
|
|
119
|
+
*/
|
|
120
|
+
export interface RevealPolicy {
|
|
121
|
+
redactRequestHeaderValues: string[];
|
|
122
|
+
revealRequestTarget: boolean;
|
|
123
|
+
revealResponseHeaders: boolean;
|
|
124
|
+
revealResponseBody: BodyReveal;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The successful result of `Prover.prove`: the two opaque `postcard` blobs to
|
|
128
|
+
* persist **together** — later handed to `present` — plus the target's HTTP
|
|
129
|
+
* response.
|
|
130
|
+
*
|
|
131
|
+
* Façade shape: a plain object, not the wasm `ProveOutput` class. The façade
|
|
132
|
+
* copies the fields out and `free()`s the wasm-side handle, so callers get no
|
|
133
|
+
* `free()` / `[Symbol.dispose]()` obligation (and no `ESNext.Disposable` lib
|
|
134
|
+
* requirement — journal 21).
|
|
135
|
+
*/
|
|
136
|
+
export interface ProveOutput {
|
|
137
|
+
/** The notary-signed attestation, `postcard`-encoded. */
|
|
138
|
+
attestation: Uint8Array;
|
|
139
|
+
/** The connection secrets, `postcard`-encoded. Persist alongside `attestation`. */
|
|
140
|
+
secrets: Uint8Array;
|
|
141
|
+
/** The target's HTTP response observed during issuance (convenience only). */
|
|
142
|
+
response: HttpResponse;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* The progress event delivered to `prove`'s progress callback. Shape mirrors
|
|
146
|
+
* the Rust `emit_progress` in `client-wasm/src/lib.rs` — `step` / `progress`
|
|
147
|
+
* come from `client_core::ProgressStage` (stable across bindings); `message`
|
|
148
|
+
* is wasm-side UI copy; `source` is always `"wasm"`.
|
|
149
|
+
*/
|
|
150
|
+
export interface ProveProgress {
|
|
151
|
+
/** Stable stage id, e.g. `"mpc_setup"`, `"reveal"`, `"finalized"`. */
|
|
152
|
+
step: string;
|
|
153
|
+
/** Nominal completion in `[0, 1]`. */
|
|
154
|
+
progress: number;
|
|
155
|
+
/** Human-readable status line for the current stage. */
|
|
156
|
+
message: string;
|
|
157
|
+
/** Always `"wasm"` (distinguishes wasm-emitted events from host-side ones). */
|
|
158
|
+
source: "wasm";
|
|
159
|
+
}
|
|
160
|
+
/** A `prove()` progress callback (the generated signature types it `Function`). */
|
|
161
|
+
export type ProgressCallback = (event: ProveProgress) => void;
|
|
162
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,sEAAsE;IACtE,IAAI,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACnC,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,8DAA8D;AAC9D,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEjF,iDAAiD;AACjD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,oDAAoD;IACpD,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8EAA8E;IAC9E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC7B,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,EAAE,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC5B,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG;IAAE,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAElE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAY;IAC3B,yBAAyB,EAAE,MAAM,EAAE,CAAC;IACpC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,EAAE,UAAU,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,WAAW,EAAE,UAAU,CAAC;IACxB,mFAAmF;IACnF,OAAO,EAAE,UAAU,CAAC;IACpB,8EAA8E;IAC9E,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,mFAAmF;AACnF,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Public DTO types for the `client-wasm` prover façade.
|
|
2
|
+
//
|
|
3
|
+
// These are declared *locally* (not re-exported from the generated
|
|
4
|
+
// `pkg/client_wasm.d.ts`) so the emitted `dist/*.d.ts` is self-contained: a
|
|
5
|
+
// value or type re-export `from "client-wasm"` would ship a dangling module
|
|
6
|
+
// reference no consumer can resolve (the pkg is unpublished — branch journal
|
|
7
|
+
// entry 21 measured exactly that defect in the previous revision's dist).
|
|
8
|
+
//
|
|
9
|
+
// The single source of truth is still the Rust side (`client-wasm/src/io.rs`
|
|
10
|
+
// `typescript_custom_section` and `client-wasm/src/types.rs`): `wasm-compat.ts`
|
|
11
|
+
// asserts, at compile time, that every type here stays mutually assignable
|
|
12
|
+
// with its generated counterpart, so drift fails `npm run typecheck` instead
|
|
13
|
+
// of surfacing at runtime.
|
|
14
|
+
//
|
|
15
|
+
// Where a type here deliberately *differs* from the generated one, it is a
|
|
16
|
+
// façade conversion `createProver` performs (bytes as `Uint8Array` instead of
|
|
17
|
+
// tsify's `number[]` rendering of `Vec<u8>`; camelCase instead of the one
|
|
18
|
+
// snake_case wart; truly-optional instead of required-but-nullable). Those
|
|
19
|
+
// types are checked one-directionally or not at all — see `wasm-compat.ts`.
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,mEAAmE;AACnE,4EAA4E;AAC5E,4EAA4E;AAC5E,6EAA6E;AAC7E,0EAA0E;AAC1E,EAAE;AACF,6EAA6E;AAC7E,gFAAgF;AAChF,2EAA2E;AAC3E,6EAA6E;AAC7E,2BAA2B;AAC3B,EAAE;AACF,2EAA2E;AAC3E,8EAA8E;AAC9E,0EAA0E;AAC1E,2EAA2E;AAC3E,4EAA4E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasm-compat.d.ts","sourceRoot":"","sources":["../src/wasm-compat.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Compile-time drift alarm: asserts the locally-declared types in this
|
|
2
|
+
// package against the generated `pkg/client_wasm.d.ts` (resolved through the
|
|
3
|
+
// tsconfig `paths` alias — build `../pkg` first, see README).
|
|
4
|
+
//
|
|
5
|
+
// The package declares its DTOs locally so the emitted `dist/*.d.ts` is
|
|
6
|
+
// self-contained (a `from "client-wasm"` re-export would dangle for every
|
|
7
|
+
// consumer — journal 21). The single source of truth stays the Rust side;
|
|
8
|
+
// this file is what enforces it: if `client-wasm/src/{io,types,log}.rs`
|
|
9
|
+
// changes shape, `npm run typecheck` fails here instead of a caller failing
|
|
10
|
+
// at runtime.
|
|
11
|
+
//
|
|
12
|
+
// Everything below is type-level only — nothing survives into dist (the
|
|
13
|
+
// emitted .js is empty and the .d.ts is `export {};`).
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=wasm-compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasm-compat.js","sourceRoot":"","sources":["../src/wasm-compat.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,6EAA6E;AAC7E,8DAA8D;AAC9D,EAAE;AACF,wEAAwE;AACxE,0EAA0E;AAC1E,0EAA0E;AAC1E,wEAAwE;AACxE,4EAA4E;AAC5E,cAAc;AACd,EAAE;AACF,wEAAwE;AACxE,uDAAuD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "client-wasm-transport",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "WebSocket and direct TCP transports + injection-based prover façade for client-wasm.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./node": {
|
|
14
|
+
"types": "./dist/node.d.ts",
|
|
15
|
+
"default": "./dist/node.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"src",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc -p tsconfig.json",
|
|
25
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
26
|
+
"test": "npm run build && node --test test/*.test.mjs",
|
|
27
|
+
"clean": "rm -rf dist"
|
|
28
|
+
},
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/node": "^22.0.0",
|
|
32
|
+
"typescript": ">=5.6.0"
|
|
33
|
+
}
|
|
34
|
+
}
|