@webtransport-bun/webtransport 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.
- package/LICENSE +21 -0
- package/README.md +54 -0
- package/dist/errors.d.ts +36 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +38 -0
- package/dist/index.d.ts +358 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +848 -0
- package/dist/streams.d.ts +72 -0
- package/dist/streams.d.ts.map +1 -0
- package/dist/streams.js +165 -0
- package/package.json +48 -0
- package/prebuilds/SHA256SUMS +1 -0
- package/prebuilds/webtransport-native.darwin-arm64.node +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 webtransport-bun contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# @webtransport-bun/webtransport
|
|
2
|
+
|
|
3
|
+
Production-focused WebTransport for Bun: datagrams + streams, in-process server/client, backed by Rust `wtransport` via `napi-rs`.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add @webtransport-bun/webtransport
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
- **Runtime**: Bun >= 1.3.9 (required; this package does not run on Node.js)
|
|
14
|
+
- **Platforms**: macOS (arm64, x64), Linux (x64)
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { createServer, connect } from "@webtransport-bun/webtransport";
|
|
20
|
+
|
|
21
|
+
const server = createServer({
|
|
22
|
+
port: 4433,
|
|
23
|
+
tls: { certPem: "...", keyPem: "..." },
|
|
24
|
+
onSession: async (session) => {
|
|
25
|
+
for await (const d of session.incomingDatagrams()) {
|
|
26
|
+
await session.sendDatagram(d);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const session = await connect("https://127.0.0.1:4433", {
|
|
32
|
+
tls: { insecureSkipVerify: true }, // dev only
|
|
33
|
+
});
|
|
34
|
+
await session.sendDatagram(new Uint8Array([1, 2, 3]));
|
|
35
|
+
session.close();
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Troubleshooting
|
|
39
|
+
|
|
40
|
+
### "Native addon not loaded"
|
|
41
|
+
|
|
42
|
+
Prebuilt binaries are included for darwin-arm64, darwin-x64, and linux-x64. If you see this error:
|
|
43
|
+
|
|
44
|
+
- Ensure you are on a supported platform (macOS or Linux, arm64 or x64).
|
|
45
|
+
- Reinstall: `rm -rf node_modules && bun install`
|
|
46
|
+
- For development from source, run `bun run build:native` from the repo root.
|
|
47
|
+
|
|
48
|
+
### "requires Bun"
|
|
49
|
+
|
|
50
|
+
This package runs only on Bun. Use `bun add` and run your app with `bun run`.
|
|
51
|
+
|
|
52
|
+
## Docs
|
|
53
|
+
|
|
54
|
+
Full documentation: [github.com/vmeansdev/webtransport-bun](https://github.com/vmeansdev/webtransport-bun)
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable error codes for WebTransport operations (AGENTS.md / docs/SPEC.md).
|
|
3
|
+
* Use with WebTransportError.code for programmatic handling.
|
|
4
|
+
*/
|
|
5
|
+
/** TLS/certificate failure. */
|
|
6
|
+
export declare const E_TLS = "E_TLS";
|
|
7
|
+
/** Connection handshake timed out (limits.handshakeTimeoutMs). */
|
|
8
|
+
export declare const E_HANDSHAKE_TIMEOUT = "E_HANDSHAKE_TIMEOUT";
|
|
9
|
+
/** Session already closed or in invalid state. */
|
|
10
|
+
export declare const E_SESSION_CLOSED = "E_SESSION_CLOSED";
|
|
11
|
+
/** Session idle timeout exceeded. */
|
|
12
|
+
export declare const E_SESSION_IDLE_TIMEOUT = "E_SESSION_IDLE_TIMEOUT";
|
|
13
|
+
/** Stream was reset by peer. */
|
|
14
|
+
export declare const E_STREAM_RESET = "E_STREAM_RESET";
|
|
15
|
+
/** Peer sent stopSending. */
|
|
16
|
+
export declare const E_STOP_SENDING = "E_STOP_SENDING";
|
|
17
|
+
/** Queue/buffer full (backpressure). */
|
|
18
|
+
export declare const E_QUEUE_FULL = "E_QUEUE_FULL";
|
|
19
|
+
/** Backpressure wait exceeded timeout. */
|
|
20
|
+
export declare const E_BACKPRESSURE_TIMEOUT = "E_BACKPRESSURE_TIMEOUT";
|
|
21
|
+
/** Resource limit exceeded. */
|
|
22
|
+
export declare const E_LIMIT_EXCEEDED = "E_LIMIT_EXCEEDED";
|
|
23
|
+
/** Rate limit (token bucket) exceeded. */
|
|
24
|
+
export declare const E_RATE_LIMITED = "E_RATE_LIMITED";
|
|
25
|
+
/** Internal/unsupported option or unexpected error. */
|
|
26
|
+
export declare const E_INTERNAL = "E_INTERNAL";
|
|
27
|
+
export type ErrorCode = typeof E_TLS | typeof E_HANDSHAKE_TIMEOUT | typeof E_SESSION_CLOSED | typeof E_SESSION_IDLE_TIMEOUT | typeof E_STREAM_RESET | typeof E_STOP_SENDING | typeof E_QUEUE_FULL | typeof E_BACKPRESSURE_TIMEOUT | typeof E_LIMIT_EXCEEDED | typeof E_RATE_LIMITED | typeof E_INTERNAL;
|
|
28
|
+
/**
|
|
29
|
+
* Custom error class for WebTransport errors.
|
|
30
|
+
* Carries a stable error code for programmatic handling.
|
|
31
|
+
*/
|
|
32
|
+
export declare class WebTransportError extends Error {
|
|
33
|
+
readonly code: ErrorCode;
|
|
34
|
+
constructor(code: ErrorCode, message?: string);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,+BAA+B;AAC/B,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,kEAAkE;AAClE,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,kDAAkD;AAClD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,qCAAqC;AACrC,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,gCAAgC;AAChC,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,6BAA6B;AAC7B,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,wCAAwC;AACxC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,0CAA0C;AAC1C,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,+BAA+B;AAC/B,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,0CAA0C;AAC1C,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,uDAAuD;AACvD,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,MAAM,MAAM,SAAS,GACjB,OAAO,KAAK,GACZ,OAAO,mBAAmB,GAC1B,OAAO,gBAAgB,GACvB,OAAO,sBAAsB,GAC7B,OAAO,cAAc,GACrB,OAAO,cAAc,GACrB,OAAO,YAAY,GACnB,OAAO,sBAAsB,GAC7B,OAAO,gBAAgB,GACvB,OAAO,cAAc,GACrB,OAAO,UAAU,CAAC;AAEtB;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;gBAEb,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,MAAM;CAK9C"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable error codes for WebTransport operations (AGENTS.md / docs/SPEC.md).
|
|
3
|
+
* Use with WebTransportError.code for programmatic handling.
|
|
4
|
+
*/
|
|
5
|
+
/** TLS/certificate failure. */
|
|
6
|
+
export const E_TLS = "E_TLS";
|
|
7
|
+
/** Connection handshake timed out (limits.handshakeTimeoutMs). */
|
|
8
|
+
export const E_HANDSHAKE_TIMEOUT = "E_HANDSHAKE_TIMEOUT";
|
|
9
|
+
/** Session already closed or in invalid state. */
|
|
10
|
+
export const E_SESSION_CLOSED = "E_SESSION_CLOSED";
|
|
11
|
+
/** Session idle timeout exceeded. */
|
|
12
|
+
export const E_SESSION_IDLE_TIMEOUT = "E_SESSION_IDLE_TIMEOUT";
|
|
13
|
+
/** Stream was reset by peer. */
|
|
14
|
+
export const E_STREAM_RESET = "E_STREAM_RESET";
|
|
15
|
+
/** Peer sent stopSending. */
|
|
16
|
+
export const E_STOP_SENDING = "E_STOP_SENDING";
|
|
17
|
+
/** Queue/buffer full (backpressure). */
|
|
18
|
+
export const E_QUEUE_FULL = "E_QUEUE_FULL";
|
|
19
|
+
/** Backpressure wait exceeded timeout. */
|
|
20
|
+
export const E_BACKPRESSURE_TIMEOUT = "E_BACKPRESSURE_TIMEOUT";
|
|
21
|
+
/** Resource limit exceeded. */
|
|
22
|
+
export const E_LIMIT_EXCEEDED = "E_LIMIT_EXCEEDED";
|
|
23
|
+
/** Rate limit (token bucket) exceeded. */
|
|
24
|
+
export const E_RATE_LIMITED = "E_RATE_LIMITED";
|
|
25
|
+
/** Internal/unsupported option or unexpected error. */
|
|
26
|
+
export const E_INTERNAL = "E_INTERNAL";
|
|
27
|
+
/**
|
|
28
|
+
* Custom error class for WebTransport errors.
|
|
29
|
+
* Carries a stable error code for programmatic handling.
|
|
30
|
+
*/
|
|
31
|
+
export class WebTransportError extends Error {
|
|
32
|
+
code;
|
|
33
|
+
constructor(code, message) {
|
|
34
|
+
super(message ?? code);
|
|
35
|
+
this.name = "WebTransportError";
|
|
36
|
+
this.code = code;
|
|
37
|
+
}
|
|
38
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @module @webtransport-bun/webtransport
|
|
4
|
+
*
|
|
5
|
+
* Production-ready WebTransport for Bun, backed by napi-rs + wtransport (Rust).
|
|
6
|
+
* Supports in-process server, client (Node API and W3C-style facade), datagrams, and streams.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @example Node client (connect)
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { connect, createServer } from "@webtransport-bun/webtransport";
|
|
12
|
+
* const session = await connect("https://127.0.0.1:4433", {
|
|
13
|
+
* tls: { insecureSkipVerify: true },
|
|
14
|
+
* limits: { handshakeTimeoutMs: 10_000 },
|
|
15
|
+
* });
|
|
16
|
+
* await session.sendDatagram(new Uint8Array([1, 2, 3]));
|
|
17
|
+
* const stream = await session.createBidirectionalStream();
|
|
18
|
+
* stream.write(Buffer.from("hello"));
|
|
19
|
+
* stream.end();
|
|
20
|
+
* session.close();
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example W3C-style client (new WebTransport)
|
|
24
|
+
* ```ts
|
|
25
|
+
* import { WebTransport, createServer } from "@webtransport-bun/webtransport";
|
|
26
|
+
* const wt = new WebTransport("https://127.0.0.1:4433", {
|
|
27
|
+
* tls: { insecureSkipVerify: true },
|
|
28
|
+
* });
|
|
29
|
+
* await wt.ready;
|
|
30
|
+
* const writer = wt.datagrams.writable.getWriter();
|
|
31
|
+
* await writer.write(new Uint8Array([1, 2, 3]));
|
|
32
|
+
* writer.releaseLock();
|
|
33
|
+
* const { readable, writable } = await wt.createBidirectionalStream();
|
|
34
|
+
* // ... use Web Streams ...
|
|
35
|
+
* wt.close({ closeCode: 1000, reason: "done" });
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @see docs/SPEC.md Authoritative API contract
|
|
39
|
+
* @see docs/PARITY_MATRIX.md W3C spec alignment
|
|
40
|
+
*/
|
|
41
|
+
import type { Duplex, Readable, Writable } from "node:stream";
|
|
42
|
+
export { WT_RESET, WT_STOP_SENDING } from "./streams.js";
|
|
43
|
+
export type { Resettable, StopSendable } from "./streams.js";
|
|
44
|
+
/**
|
|
45
|
+
* Stable error codes. Use with {@link WebTransportError.code} for programmatic handling.
|
|
46
|
+
* @see WebTransportError
|
|
47
|
+
*/
|
|
48
|
+
export { E_TLS, E_HANDSHAKE_TIMEOUT, E_SESSION_CLOSED, E_SESSION_IDLE_TIMEOUT, E_STREAM_RESET, E_STOP_SENDING, E_QUEUE_FULL, E_BACKPRESSURE_TIMEOUT, E_LIMIT_EXCEEDED, E_RATE_LIMITED, E_INTERNAL, WebTransportError, } from "./errors.js";
|
|
49
|
+
export type { ErrorCode } from "./errors.js";
|
|
50
|
+
/** Web IDL BufferSource (ArrayBuffer | ArrayBufferView) for spec alignment */
|
|
51
|
+
type BufferSource = ArrayBuffer | ArrayBufferView;
|
|
52
|
+
/** TLS configuration for server (cert/key) or client (CA, SNI). */
|
|
53
|
+
export type TlsOptions = {
|
|
54
|
+
/** PEM-encoded certificate (server) or CA (client). */
|
|
55
|
+
certPem: string | Uint8Array;
|
|
56
|
+
/** PEM-encoded private key (server only). */
|
|
57
|
+
keyPem: string | Uint8Array;
|
|
58
|
+
/** Optional CA PEM for client verification. */
|
|
59
|
+
caPem?: string | Uint8Array;
|
|
60
|
+
/** SNI for client mode; for server, used in logs/metrics. */
|
|
61
|
+
serverName?: string;
|
|
62
|
+
};
|
|
63
|
+
export type RateLimitOptions = {
|
|
64
|
+
handshakesPerSec: number;
|
|
65
|
+
handshakesBurst: number;
|
|
66
|
+
/** Per /24 (IPv4) or /64 (IPv6) prefix; defaults 100 */
|
|
67
|
+
handshakesBurstPerPrefix?: number;
|
|
68
|
+
streamsPerSec: number;
|
|
69
|
+
streamsBurst: number;
|
|
70
|
+
datagramsPerSec: number;
|
|
71
|
+
datagramsBurst: number;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Resource limits. Merge with {@link DEFAULT_LIMITS} for defaults.
|
|
75
|
+
* @see DEFAULT_LIMITS Default values (e.g. handshakeTimeoutMs: 10000, maxDatagramSize: 1200).
|
|
76
|
+
*/
|
|
77
|
+
export type LimitsOptions = {
|
|
78
|
+
maxSessions: number;
|
|
79
|
+
maxHandshakesInFlight: number;
|
|
80
|
+
maxStreamsPerSessionBidi: number;
|
|
81
|
+
maxStreamsPerSessionUni: number;
|
|
82
|
+
maxStreamsGlobal: number;
|
|
83
|
+
/** Hard cap in bytes (also must respect negotiated max). Default 1200. */
|
|
84
|
+
maxDatagramSize: number;
|
|
85
|
+
maxQueuedBytesGlobal: number;
|
|
86
|
+
maxQueuedBytesPerSession: number;
|
|
87
|
+
maxQueuedBytesPerStream: number;
|
|
88
|
+
backpressureTimeoutMs: number;
|
|
89
|
+
/** Connect handshake timeout. Default 10000. */
|
|
90
|
+
handshakeTimeoutMs: number;
|
|
91
|
+
idleTimeoutMs: number;
|
|
92
|
+
};
|
|
93
|
+
/** Default limit values from AGENTS.md */
|
|
94
|
+
export declare const DEFAULT_LIMITS: LimitsOptions;
|
|
95
|
+
/** Default rate-limit values from AGENTS.md */
|
|
96
|
+
export declare const DEFAULT_RATE_LIMITS: RateLimitOptions;
|
|
97
|
+
/** Structured log event. Include sessionId, peerIp, peerPort, error code for incident diagnosis. */
|
|
98
|
+
export type LogEvent = {
|
|
99
|
+
level: "debug" | "info" | "warn" | "error";
|
|
100
|
+
msg: string;
|
|
101
|
+
sessionId?: string;
|
|
102
|
+
peerIp?: string;
|
|
103
|
+
peerPort?: number;
|
|
104
|
+
/** Error code (e.g. E_SESSION_CLOSED), counters context */
|
|
105
|
+
data?: Record<string, unknown>;
|
|
106
|
+
};
|
|
107
|
+
/** Options for {@link createServer}. Limits/rateLimits merge with defaults. */
|
|
108
|
+
export type ServerOptions = {
|
|
109
|
+
host?: string; /** @default "0.0.0.0" */
|
|
110
|
+
port: number;
|
|
111
|
+
tls: TlsOptions;
|
|
112
|
+
limits?: Partial<LimitsOptions>;
|
|
113
|
+
rateLimits?: Partial<RateLimitOptions>;
|
|
114
|
+
/** Called on each accepted session (must not block; long work should be async) */
|
|
115
|
+
onSession: (session: ServerSession) => void | Promise<void>;
|
|
116
|
+
/** Optional logging hook */
|
|
117
|
+
log?: (event: LogEvent) => void;
|
|
118
|
+
/** Debug mode: enables detailed native diagnostics/log payloads (redaction off). */
|
|
119
|
+
debug?: boolean;
|
|
120
|
+
};
|
|
121
|
+
/** Returned by {@link createServer}. Use address, close(), and metricsSnapshot(). */
|
|
122
|
+
export interface WebTransportServer {
|
|
123
|
+
readonly address: {
|
|
124
|
+
host: string;
|
|
125
|
+
port: number;
|
|
126
|
+
};
|
|
127
|
+
close(): Promise<void>;
|
|
128
|
+
metricsSnapshot(): MetricsSnapshot;
|
|
129
|
+
}
|
|
130
|
+
/** Browser-style close info (W3C alignment). Used by {@link WebTransport.close} and {@link WebTransport.closed}. */
|
|
131
|
+
export type WebTransportCloseInfo = {
|
|
132
|
+
closeCode?: number;
|
|
133
|
+
reason?: string;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Options for `new WebTransport(url, options)`.
|
|
137
|
+
* Unsupported: `allowPooling`, `requireUnreliable`, `serverCertificateHashes` (validated then rejected).
|
|
138
|
+
* Stream options `sendOrder`/`sendGroup` are rejected when passed to createBidirectionalStream/createUnidirectionalStream.
|
|
139
|
+
*/
|
|
140
|
+
export type WebTransportClientOptions = {
|
|
141
|
+
serverCertificateHashes?: Array<{
|
|
142
|
+
algorithm: "sha-256";
|
|
143
|
+
value: BufferSource;
|
|
144
|
+
}>;
|
|
145
|
+
allowPooling?: boolean;
|
|
146
|
+
requireUnreliable?: boolean;
|
|
147
|
+
/** Bun backend extension */
|
|
148
|
+
tls?: {
|
|
149
|
+
insecureSkipVerify?: boolean;
|
|
150
|
+
caPem?: string | Uint8Array;
|
|
151
|
+
serverName?: string;
|
|
152
|
+
};
|
|
153
|
+
limits?: Partial<LimitsOptions>;
|
|
154
|
+
};
|
|
155
|
+
/** Options for {@link connect} (Node client API). */
|
|
156
|
+
export type ClientOptions = {
|
|
157
|
+
tls?: {
|
|
158
|
+
caPem?: string | Uint8Array;
|
|
159
|
+
serverName?: string;
|
|
160
|
+
/** Dev only: skips server cert verification. Requires explicit `true`. Emits warning. Never use in production. */
|
|
161
|
+
insecureSkipVerify?: boolean;
|
|
162
|
+
};
|
|
163
|
+
limits?: Partial<LimitsOptions>;
|
|
164
|
+
log?: (event: LogEvent) => void;
|
|
165
|
+
};
|
|
166
|
+
export type CloseInfo = {
|
|
167
|
+
code?: number;
|
|
168
|
+
reason?: string;
|
|
169
|
+
};
|
|
170
|
+
/** Base session interface (server and client). Node streams; use toWebTransport for Web Streams. */
|
|
171
|
+
export interface BaseSession {
|
|
172
|
+
readonly id: string;
|
|
173
|
+
readonly peer: {
|
|
174
|
+
ip: string;
|
|
175
|
+
port: number;
|
|
176
|
+
};
|
|
177
|
+
readonly ready: Promise<void>;
|
|
178
|
+
readonly closed: Promise<CloseInfo>;
|
|
179
|
+
close(info?: CloseInfo): void;
|
|
180
|
+
sendDatagram(data: Uint8Array): Promise<void>;
|
|
181
|
+
incomingDatagrams(): AsyncIterable<Uint8Array>;
|
|
182
|
+
createBidirectionalStream(): Promise<Duplex>;
|
|
183
|
+
incomingBidirectionalStreams(): AsyncIterable<Duplex>;
|
|
184
|
+
createUnidirectionalStream(): Promise<Writable>;
|
|
185
|
+
incomingUnidirectionalStreams(): AsyncIterable<Readable>;
|
|
186
|
+
metricsSnapshot(): SessionMetricsSnapshot;
|
|
187
|
+
}
|
|
188
|
+
export interface ServerSession extends BaseSession {
|
|
189
|
+
}
|
|
190
|
+
export interface ClientSession extends BaseSession {
|
|
191
|
+
}
|
|
192
|
+
export type MetricsSnapshot = {
|
|
193
|
+
nowMs: number;
|
|
194
|
+
sessionsActive: number;
|
|
195
|
+
sessionTasksActive: number;
|
|
196
|
+
streamTasksActive: number;
|
|
197
|
+
handshakesInFlight: number;
|
|
198
|
+
streamsActive: number;
|
|
199
|
+
datagramsIn: number;
|
|
200
|
+
datagramsOut: number;
|
|
201
|
+
datagramsDropped: number;
|
|
202
|
+
queuedBytesGlobal: number;
|
|
203
|
+
backpressureWaitCount: number;
|
|
204
|
+
backpressureTimeoutCount: number;
|
|
205
|
+
rateLimitedCount: number;
|
|
206
|
+
limitExceededCount: number;
|
|
207
|
+
};
|
|
208
|
+
export type SessionMetricsSnapshot = {
|
|
209
|
+
datagramsIn: number;
|
|
210
|
+
datagramsOut: number;
|
|
211
|
+
streamsActive: number;
|
|
212
|
+
queuedBytes: number;
|
|
213
|
+
};
|
|
214
|
+
/** Prometheus metric name prefix. Override via env WEBTRANSPORT_METRICS_PREFIX. */
|
|
215
|
+
export declare const METRICS_PREFIX: string;
|
|
216
|
+
/**
|
|
217
|
+
* Convert MetricsSnapshot to Prometheus exposition format (text).
|
|
218
|
+
* Gauges: sessions_active, handshakes_in_flight, streams_active, session_tasks_active, stream_tasks_active, queued_bytes_global.
|
|
219
|
+
* Counters: datagrams_in, datagrams_out, datagrams_dropped, backpressure_wait_total, backpressure_timeout_total, rate_limited_total, limit_exceeded_total.
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```ts
|
|
223
|
+
* const snapshot = server.metricsSnapshot();
|
|
224
|
+
* const text = metricsToPrometheus(snapshot, { serverId: "main" });
|
|
225
|
+
* response.end(text); // Content-Type: text/plain; version=0.0.4
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
228
|
+
export declare function metricsToPrometheus(m: MetricsSnapshot, labels?: Record<string, string>): string;
|
|
229
|
+
/**
|
|
230
|
+
* Create an in-process WebTransport server.
|
|
231
|
+
*
|
|
232
|
+
* @param opts - Server configuration. Requires `port`, `tls` (certPem, keyPem), and `onSession` callback.
|
|
233
|
+
* @returns WebTransportServer with `address`, `close()`, and `metricsSnapshot()`.
|
|
234
|
+
* @throws Error if native addon is not loaded.
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```ts
|
|
238
|
+
* const server = createServer({
|
|
239
|
+
* port: 4433,
|
|
240
|
+
* tls: { certPem: "...", keyPem: "..." },
|
|
241
|
+
* onSession: async (session) => {
|
|
242
|
+
* for await (const d of session.incomingDatagrams()) {
|
|
243
|
+
* await session.sendDatagram(d);
|
|
244
|
+
* }
|
|
245
|
+
* },
|
|
246
|
+
* });
|
|
247
|
+
* // server.address.port
|
|
248
|
+
* await server.close();
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
251
|
+
export declare function createServer(opts: ServerOptions): WebTransportServer;
|
|
252
|
+
/**
|
|
253
|
+
* Connect to a WebTransport server (Node API).
|
|
254
|
+
*
|
|
255
|
+
* @param url - WebTransport URL (e.g. `https://host:port/path`).
|
|
256
|
+
* @param opts - Optional TLS, limits, and logging. Limits default per {@link DEFAULT_LIMITS}.
|
|
257
|
+
* Use `tls.insecureSkipVerify: true` only for dev; emits a warning.
|
|
258
|
+
* @returns Promise that resolves to ClientSession when handshake completes.
|
|
259
|
+
* @throws WebTransportError with code `E_HANDSHAKE_TIMEOUT` if handshake exceeds `limits.handshakeTimeoutMs` (default 10s).
|
|
260
|
+
* @throws WebTransportError with code `E_TLS` on TLS failure.
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* ```ts
|
|
264
|
+
* const session = await connect("https://127.0.0.1:4433", {
|
|
265
|
+
* tls: { insecureSkipVerify: true },
|
|
266
|
+
* limits: { handshakeTimeoutMs: 5000 },
|
|
267
|
+
* });
|
|
268
|
+
* await session.ready;
|
|
269
|
+
* await session.sendDatagram(new Uint8Array([1, 2, 3]));
|
|
270
|
+
* session.close({ code: 1000, reason: "done" });
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
export declare function connect(url: string, opts?: ClientOptions): Promise<ClientSession>;
|
|
274
|
+
/**
|
|
275
|
+
* Browser-style WebTransport client (W3C facade).
|
|
276
|
+
*
|
|
277
|
+
* Use `new WebTransport(url, options)` to connect, or `toWebTransport(session)` to wrap an existing
|
|
278
|
+
* {@link ClientSession}. Await {@link WebTransport.ready} before using datagrams/streams.
|
|
279
|
+
*
|
|
280
|
+
* Unsupported options (`allowPooling`, `requireUnreliable`, `sendOrder`, `sendGroup`,
|
|
281
|
+
* `serverCertificateHashes`) throw {@link WebTransportError} with code `E_INTERNAL`.
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* ```ts
|
|
285
|
+
* const wt = new WebTransport("https://127.0.0.1:4433", { tls: { insecureSkipVerify: true } });
|
|
286
|
+
* await wt.ready;
|
|
287
|
+
* const { readable, writable } = await wt.createBidirectionalStream();
|
|
288
|
+
* writable.getWriter().write(new Uint8Array([1, 2, 3]));
|
|
289
|
+
* wt.close({ closeCode: 1000, reason: "done" });
|
|
290
|
+
* await wt.closed;
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
export declare class WebTransport {
|
|
294
|
+
#private;
|
|
295
|
+
constructor(urlOrSession: string | ClientSession, options?: WebTransportClientOptions);
|
|
296
|
+
/** Resolves when handshake completes. Rejects with WebTransportError on connect failure. */
|
|
297
|
+
get ready(): Promise<void>;
|
|
298
|
+
/** Resolves with close info when session closes. Never rejects. */
|
|
299
|
+
get closed(): Promise<WebTransportCloseInfo>;
|
|
300
|
+
/** Resolves when session is draining. Currently resolves with closed (partial parity). */
|
|
301
|
+
get draining(): Promise<void>;
|
|
302
|
+
/** Datagram Web Streams (readable/writable). Throws E_SESSION_CLOSED after close. */
|
|
303
|
+
get datagrams(): {
|
|
304
|
+
readable: ReadableStream<Uint8Array>;
|
|
305
|
+
writable: WritableStream<Uint8Array>;
|
|
306
|
+
};
|
|
307
|
+
/** Incoming bidirectional streams as ReadableStream of { readable, writable }. */
|
|
308
|
+
get incomingBidirectionalStreams(): ReadableStream<{
|
|
309
|
+
readable: ReadableStream<Uint8Array>;
|
|
310
|
+
writable: WritableStream<Uint8Array>;
|
|
311
|
+
}>;
|
|
312
|
+
/** Incoming unidirectional streams as ReadableStream of ReadableStream. */
|
|
313
|
+
get incomingUnidirectionalStreams(): ReadableStream<ReadableStream<Uint8Array>>;
|
|
314
|
+
/**
|
|
315
|
+
* Create a bidirectional stream (Web Streams). Rejects sendOrder/sendGroup (unsupported).
|
|
316
|
+
* @throws WebTransportError E_SESSION_CLOSED if session is closed/draining/failed.
|
|
317
|
+
*/
|
|
318
|
+
createBidirectionalStream(options?: {
|
|
319
|
+
sendOrder?: number;
|
|
320
|
+
sendGroup?: number;
|
|
321
|
+
}): Promise<{
|
|
322
|
+
readable: ReadableStream<Uint8Array>;
|
|
323
|
+
writable: WritableStream<Uint8Array>;
|
|
324
|
+
}>;
|
|
325
|
+
/**
|
|
326
|
+
* Create a unidirectional send stream (WritableStream). Rejects sendOrder/sendGroup (unsupported).
|
|
327
|
+
* @throws WebTransportError E_SESSION_CLOSED if session is closed/draining/failed.
|
|
328
|
+
*/
|
|
329
|
+
createUnidirectionalStream(options?: {
|
|
330
|
+
sendOrder?: number;
|
|
331
|
+
sendGroup?: number;
|
|
332
|
+
}): Promise<WritableStream<Uint8Array>>;
|
|
333
|
+
/** Initiate graceful close. Idempotent after first call. */
|
|
334
|
+
close(info?: WebTransportCloseInfo): void;
|
|
335
|
+
/** Internal: session for adapters (not part of spec) */
|
|
336
|
+
_getSession(): Promise<ClientSession>;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Wrap an existing {@link ClientSession} as a browser-style WebTransport.
|
|
340
|
+
*
|
|
341
|
+
* Use when you obtained a session via {@link connect} but want Web Streams and W3C-style API.
|
|
342
|
+
*
|
|
343
|
+
* @param session - Connected ClientSession from {@link connect}.
|
|
344
|
+
* @returns WebTransport with same lifecycle; `ready` resolves immediately if session is connected.
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```ts
|
|
348
|
+
* const session = await connect("https://127.0.0.1:4433", { tls: { insecureSkipVerify: true } });
|
|
349
|
+
* const wt = toWebTransport(session);
|
|
350
|
+
* await wt.ready;
|
|
351
|
+
* const writer = wt.datagrams.writable.getWriter();
|
|
352
|
+
* await writer.write(new Uint8Array([1, 2, 3]));
|
|
353
|
+
* writer.releaseLock();
|
|
354
|
+
* session.close();
|
|
355
|
+
* ```
|
|
356
|
+
*/
|
|
357
|
+
export declare function toWebTransport(session: ClientSession): WebTransport;
|
|
358
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG9D,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,M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