39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
|
|
/**
|
||
|
|
* @shade/transport-bridge — V3.7
|
||
|
|
*
|
||
|
|
* Transport-agnostic delivery for environments that cannot or will not run
|
||
|
|
* a WebSocket: SSE primary fallback, long-poll secondary, plus a thin WS
|
||
|
|
* adapter for the happy path. All three implementations surface the same
|
||
|
|
* {@link IncomingMessage} shape so application code stays portable.
|
||
|
|
*
|
||
|
|
* Server-side routes live in `@shade/inbox-server`'s `createBridgeRoutes`.
|
||
|
|
* Both ends share the same auth scheme: signed query parameters using the
|
||
|
|
* recipient's Ed25519 signing key, verified against the address-owner key
|
||
|
|
* registered via `/v1/inbox/register`.
|
||
|
|
*/
|
||
|
|
|
||
|
|
export type {
|
||
|
|
IncomingMessage,
|
||
|
|
IncomingMessageHandler,
|
||
|
|
BridgeConnectOptions,
|
||
|
|
BridgeTransport,
|
||
|
|
BridgeWireMessage,
|
||
|
|
} from './types.js';
|
||
|
|
export { decodeWireMessage } from './types.js';
|
||
|
|
|
||
|
|
export { BridgeError } from './errors.js';
|
||
|
|
|
||
|
|
export { signBridgeQuery, bridgeQueryToCanonical } from './auth.js';
|
||
|
|
export type { BridgeKind, BridgeAuthInput } from './auth.js';
|
||
|
|
|
||
|
|
export { SseBridge } from './sse-bridge.js';
|
||
|
|
export type { SseBridgeOptions } from './sse-bridge.js';
|
||
|
|
|
||
|
|
export { LongPollBridge } from './long-poll-bridge.js';
|
||
|
|
export type { LongPollBridgeOptions } from './long-poll-bridge.js';
|
||
|
|
|
||
|
|
export { WsBridge } from './ws-bridge.js';
|
||
|
|
export type { WsBridgeOptions } from './ws-bridge.js';
|
||
|
|
|
||
|
|
export { FallbackBridgeTransport } from './fallback.js';
|