@routedock/routedock 0.1.2 → 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.
Files changed (74) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +227 -4
  3. package/dist/MppSessionHandler-B4TyD7Xg.d.cts +121 -0
  4. package/dist/MppSessionHandler-CLB5SzgN.d.ts +121 -0
  5. package/dist/ProviderRegistry-BJ9oJLVz.d.cts +142 -0
  6. package/dist/ProviderRegistry-C50nyhaF.d.ts +142 -0
  7. package/dist/RouteDockClient-B1roCa8h.d.cts +455 -0
  8. package/dist/RouteDockClient-BbkqjhMG.d.ts +455 -0
  9. package/dist/SessionReconciler-Dscw43F3.d.ts +125 -0
  10. package/dist/SessionReconciler-bi0z2qtN.d.cts +125 -0
  11. package/dist/SessionStore-BpK8vv0L.d.cts +111 -0
  12. package/dist/SessionStore-DvkZv8-E.d.ts +111 -0
  13. package/dist/client.cjs +2419 -202
  14. package/dist/client.d.cts +50 -81
  15. package/dist/client.d.ts +50 -81
  16. package/dist/client.js +2373 -203
  17. package/dist/index.cjs +3080 -298
  18. package/dist/index.d.cts +12 -3
  19. package/dist/index.d.ts +12 -3
  20. package/dist/index.js +3026 -298
  21. package/dist/provider/fastify.cjs +882 -0
  22. package/dist/provider/fastify.d.cts +35 -0
  23. package/dist/provider/fastify.d.ts +35 -0
  24. package/dist/provider/fastify.js +880 -0
  25. package/dist/provider/hono.cjs +948 -0
  26. package/dist/provider/hono.d.cts +99 -0
  27. package/dist/provider/hono.d.ts +99 -0
  28. package/dist/provider/hono.js +938 -0
  29. package/dist/provider.cjs +827 -97
  30. package/dist/provider.d.cts +32 -25
  31. package/dist/provider.d.ts +32 -25
  32. package/dist/provider.js +810 -99
  33. package/dist/react.cjs +2641 -0
  34. package/dist/react.d.cts +107 -0
  35. package/dist/react.d.ts +107 -0
  36. package/dist/react.js +2634 -0
  37. package/dist/routedockMiddleware-BlDsHuPl.d.ts +59 -0
  38. package/dist/routedockMiddleware-D97A5ptQ.d.cts +59 -0
  39. package/dist/schema.cjs +364 -0
  40. package/dist/schema.d.cts +3 -0
  41. package/dist/schema.d.ts +3 -0
  42. package/dist/schema.js +359 -0
  43. package/dist/sign-CUf3rhTx.d.cts +53 -0
  44. package/dist/sign-Dpj2Mp7k.d.ts +53 -0
  45. package/dist/testing.cjs +57 -0
  46. package/dist/testing.d.cts +95 -0
  47. package/dist/testing.d.ts +95 -0
  48. package/dist/testing.js +54 -0
  49. package/dist/types-DmhmfLzP.d.cts +410 -0
  50. package/dist/types-DmhmfLzP.d.ts +410 -0
  51. package/package.json +143 -23
  52. package/PUBLISH_CHECKLIST.md +0 -70
  53. package/dist/SessionStore-CCVO0PHM.d.cts +0 -152
  54. package/dist/SessionStore-CCVO0PHM.d.ts +0 -152
  55. package/dist/routedockMiddleware-B7WTB3LT.d.cts +0 -53
  56. package/dist/routedockMiddleware-DRgdrycG.d.ts +0 -53
  57. package/src/client/ModeRouter.ts +0 -104
  58. package/src/client/MppChargeClient.ts +0 -44
  59. package/src/client/MppSessionClient.ts +0 -144
  60. package/src/client/RouteDockClient.ts +0 -124
  61. package/src/client/index.ts +0 -8
  62. package/src/client/x402Client.ts +0 -84
  63. package/src/index.ts +0 -9
  64. package/src/provider/MppChargeHandler.ts +0 -90
  65. package/src/provider/MppSessionHandler.ts +0 -157
  66. package/src/provider/index.ts +0 -7
  67. package/src/provider/routedockMiddleware.ts +0 -154
  68. package/src/provider/x402Handler.ts +0 -164
  69. package/src/schemas/routedock.schema.json +0 -159
  70. package/src/store/SessionStore.ts +0 -90
  71. package/src/tests/smoke.test.ts +0 -228
  72. package/src/types.ts +0 -165
  73. package/tsconfig.json +0 -14
  74. package/tsup.config.ts +0 -15
package/dist/client.d.cts CHANGED
@@ -1,83 +1,15 @@
1
- import { P as PaymentMode, c as RouteDockManifest, a as PaymentResult, h as SessionHandle } from './SessionStore-CCVO0PHM.cjs';
2
- export { b as PricingConfig, R as RouteDockError, d as RouteDockManifestError, e as RouteDockNoSupportedModeError, f as RouteDockPolicyRejectedError, g as RouteDockSessionError, S as SessionCloseResult, i as SessionPricingConfig, j as SessionState, k as SessionStore, l as SupabaseSessionStore } from './SessionStore-CCVO0PHM.cjs';
1
+ import { R as RouteDockManifest, k as SessionOptions, j as SessionHandle } from './types-DmhmfLzP.cjs';
2
+ export { D as DEFAULT_MAX_SESSION_DURATION_MS, a as DisputeStatus, E as EndpointDescriptor, b as EstimateCostResult, P as PaymentMode, c as PaymentResult, d as PreflightResult, e as PricingConfig, S as SLAConfig, f as SessionCloseFailedPayload, g as SessionCloseResult, h as SessionEvent, i as SessionEventPayloadMap, l as SessionPricingConfig, m as SessionState, n as SessionStats, o as SessionTimeoutPayload, p as StreamOptions, V as VaultMode } from './types-DmhmfLzP.cjs';
3
+ export { R as RouteDockChannelStateError, a as RouteDockClientVersionError, b as RouteDockDisputeError, c as RouteDockError, d as RouteDockErrorCode, e as RouteDockErrorOptions, f as RouteDockFacilitatorError, g as RouteDockManifestError, h as RouteDockManifestSunsetError, i as RouteDockManifestTimeoutError, j as RouteDockNetworkError, k as RouteDockNoSupportedModeError, l as RouteDockPolicyRejectError, m as RouteDockPolicyRejectedError, n as RouteDockRefundWindowError, o as RouteDockSessionError, p as RouteDockSignatureError, q as RouteDockTrustlineError, r as RouteDockVoucherMonotonicityError, S as SessionStore, s as SupabaseSessionStore, t as httpStatusToError, u as parseRetryAfterMs, w as wrapFetchError } from './SessionStore-BpK8vv0L.cjs';
4
+ import { R as RetryPolicy } from './RouteDockClient-B1roCa8h.cjs';
5
+ export { D as DEFAULT_RETRY_POLICY, a as DailySpend, I as InMemorySpendStore, b as InMemorySpendStoreOptions, M as ModeSelectOptions, N as NulthAuthSignature, c as NulthClientConfig, d as NulthPolicyError, e as NulthPolicyState, f as NulthProof, g as NulthSignerConfig, h as NulthStellarSigner, i as NulthVaultConfig, P as PaymentAuthContext, j as RouteDockClient, k as RouteDockClientConfig, l as RouteDockLogger, S as SpendCap, m as SpendStore, V as VaultConfig, n as assertEndpointActive, o as assertManifestValid, p as assertNulthVaultManifest, q as backoffDelayMs, r as configureManifestCache, s as createNulthSigner, t as createPolicyState, u as decodeAuthSignature, v as fetchLedgerSequence, w as fetchManifest, x as invalidateManifest, y as paymentContextFromManifest, z as prepareNulthSigner, A as rankProvidersByLatency, B as selectMode, C as setNulthPaymentContext, E as usdcToMicros, F as withRetry } from './RouteDockClient-B1roCa8h.cjs';
6
+ export { F as FileSpendStore, M as MppChargeClient, O as OnChainProviderInfo, a as OnChainRegistry, P as ProviderRecord, b as ProviderRegistry, c as ProviderRegistryConfig, X as X402Client, u as usdcToUnits } from './ProviderRegistry-BJ9oJLVz.cjs';
3
7
  import { Keypair } from '@stellar/stellar-sdk';
8
+ export { USDC_DECIMALS, usdcToStroops } from '@routedock/nulth-sdk';
9
+ import 'mppx';
4
10
  import '@supabase/supabase-js';
5
-
6
- interface ModeSelectOptions {
7
- /** Force mpp-session if the provider supports it */
8
- sustained?: boolean;
9
- session?: boolean;
10
- /**
11
- * Override mode selection and use this specific mode.
12
- * Throws RouteDockNoSupportedModeError if the provider does not support it.
13
- */
14
- forceMode?: PaymentMode;
15
- }
16
- /** Fetch, validate, and cache a RouteDock manifest from `baseUrl`. */
17
- declare function fetchManifest(baseUrl: string): Promise<RouteDockManifest>;
18
- /**
19
- * Deterministic mode selection per Section 6.3 of ROUTEDOCK_MASTER.md:
20
- * 1. If { sustained | session } AND manifest supports mpp-session → mpp-session
21
- * 2. Else if manifest supports mpp-charge AND network is Stellar → mpp-charge
22
- * 3. Else if manifest supports x402 → x402
23
- * 4. Else throw RouteDockNoSupportedModeError
24
- */
25
- declare function selectMode(manifest: RouteDockManifest, options?: ModeSelectOptions): PaymentMode;
26
-
27
- interface SpendCap {
28
- /** Maximum total USDC spend per day (decimal string, e.g. "1.00") */
29
- daily: string;
30
- asset: 'USDC';
31
- }
32
- interface RouteDockClientConfig {
33
- /** Stellar keypair or raw secret key (S...) */
34
- wallet: Keypair | string;
35
- network: 'testnet' | 'mainnet';
36
- /** Optional local daily spend cap — checked before every payment */
37
- spendCap?: SpendCap;
38
- /** Ed25519 secret key (S...) for signing channel commitments. Required for mpp-session. */
39
- commitmentSecret?: string | undefined;
40
- }
41
- declare class RouteDockClient {
42
- private readonly keypair;
43
- private readonly network;
44
- private readonly spendCap;
45
- private readonly commitmentSecret;
46
- /** Local daily accumulator keyed by YYYY-MM-DD */
47
- private dailySpend;
48
- private readonly x402;
49
- private readonly charge;
50
- private readonly session;
51
- constructor(config: RouteDockClientConfig);
52
- /**
53
- * Pay for one request at `url`. Fetches manifest, selects payment mode,
54
- * checks local spend cap, executes payment, returns result.
55
- */
56
- pay(url: string, options?: ModeSelectOptions): Promise<PaymentResult>;
57
- /**
58
- * Open a sustained MPP session at `url`. Verifies mpp-session is supported
59
- * before opening a channel. Returns a SessionHandle for streaming + closing.
60
- */
61
- openSession(url: string): Promise<SessionHandle>;
62
- /** Check local daily cap and record the spend. Throws if cap exceeded. */
63
- private _checkAndRecordSpend;
64
- }
65
-
66
- type Network = 'testnet' | 'mainnet';
67
- declare class X402Client {
68
- private readonly secretKey;
69
- private readonly network;
70
- private readonly httpClient;
71
- constructor(secretKey: string, network: Network);
72
- pay(url: string, manifest: RouteDockManifest): Promise<PaymentResult>;
73
- }
74
-
75
- declare class MppChargeClient {
76
- private readonly keypair;
77
- private readonly network;
78
- constructor(keypair: Keypair, network: 'testnet' | 'mainnet');
79
- pay(url: string, manifest: RouteDockManifest): Promise<PaymentResult>;
80
- }
11
+ import '@x402/stellar';
12
+ import '@stellar/stellar-sdk/contract';
81
13
 
82
14
  /**
83
15
  * MppSessionClient — uses @stellar/mpp channel/client for off-chain
@@ -88,11 +20,48 @@ declare class MppChargeClient {
88
20
  * @stellar/mpp library handles the 402 challenge-response cycle.
89
21
  */
90
22
 
23
+ /** A WebSocket socket as consumed by the mpp-session-ws stream. */
24
+ interface WebSocketLike {
25
+ readyState: number;
26
+ close(code?: number, reason?: string): void;
27
+ }
28
+ /** Callbacks a WebSocket factory must wire to the underlying socket. */
29
+ interface WebSocketHandlers {
30
+ onOpen(): void;
31
+ onMessage(data: string): void;
32
+ onClose(code: number, reason: string): void;
33
+ onError(): void;
34
+ }
35
+ /**
36
+ * Creates a WebSocket connection with the given handshake headers.
37
+ * Injected for testability; defaults to the runtime WebSocket global
38
+ * (undici in Node ≥ 22 supports handshake headers via its options object).
39
+ */
40
+ type WebSocketFactory = (url: string, init: {
41
+ headers: Record<string, string>;
42
+ }, handlers: WebSocketHandlers) => WebSocketLike;
91
43
  declare class MppSessionClient {
92
44
  private readonly keypair;
93
45
  private readonly network;
94
- constructor(keypair: Keypair, network: 'testnet' | 'mainnet');
95
- openSession(url: string, manifest: RouteDockManifest, commitmentSecret: string): Promise<SessionHandle>;
46
+ private readonly retryPolicy?;
47
+ private readonly webSocketFactory;
48
+ constructor(keypair: Keypair, network: 'testnet' | 'mainnet', retryPolicy?: RetryPolicy | undefined, webSocketFactory?: WebSocketFactory);
49
+ openSession(url: string, manifest: RouteDockManifest, commitmentSecret: string, options?: SessionOptions, onSpend?: (amount: string) => Promise<void>): Promise<SessionHandle>;
50
+ /**
51
+ * mpp-session-ws streaming transport.
52
+ *
53
+ * Mirrors the issue's three-step sequence:
54
+ * 1. open the channel — probe the provider URL over HTTP;
55
+ * 2. negotiate the voucher — sign the mppx 402 challenge into a credential;
56
+ * 3. upgrade the HTTP connection to WebSocket — hand the signed voucher to
57
+ * the provider as the Authorization header of the WebSocket handshake.
58
+ *
59
+ * Each server frame is yielded (JSON frames parsed; raw strings yielded
60
+ * as-is). The stream ends when the server closes the socket with a normal
61
+ * close code (1000/1001); abnormal closes and connection failures surface as
62
+ * RouteDockChannelStateError.
63
+ */
64
+ private streamWebSocket;
96
65
  }
97
66
 
98
- export { type ModeSelectOptions, MppChargeClient, MppSessionClient, PaymentMode, PaymentResult, RouteDockClient, type RouteDockClientConfig, RouteDockManifest, SessionHandle, type SpendCap, X402Client, fetchManifest, selectMode };
67
+ export { MppSessionClient, RetryPolicy, RouteDockManifest, SessionHandle, SessionOptions, type WebSocketFactory, type WebSocketHandlers, type WebSocketLike };
package/dist/client.d.ts CHANGED
@@ -1,83 +1,15 @@
1
- import { P as PaymentMode, c as RouteDockManifest, a as PaymentResult, h as SessionHandle } from './SessionStore-CCVO0PHM.js';
2
- export { b as PricingConfig, R as RouteDockError, d as RouteDockManifestError, e as RouteDockNoSupportedModeError, f as RouteDockPolicyRejectedError, g as RouteDockSessionError, S as SessionCloseResult, i as SessionPricingConfig, j as SessionState, k as SessionStore, l as SupabaseSessionStore } from './SessionStore-CCVO0PHM.js';
1
+ import { R as RouteDockManifest, k as SessionOptions, j as SessionHandle } from './types-DmhmfLzP.js';
2
+ export { D as DEFAULT_MAX_SESSION_DURATION_MS, a as DisputeStatus, E as EndpointDescriptor, b as EstimateCostResult, P as PaymentMode, c as PaymentResult, d as PreflightResult, e as PricingConfig, S as SLAConfig, f as SessionCloseFailedPayload, g as SessionCloseResult, h as SessionEvent, i as SessionEventPayloadMap, l as SessionPricingConfig, m as SessionState, n as SessionStats, o as SessionTimeoutPayload, p as StreamOptions, V as VaultMode } from './types-DmhmfLzP.js';
3
+ export { R as RouteDockChannelStateError, a as RouteDockClientVersionError, b as RouteDockDisputeError, c as RouteDockError, d as RouteDockErrorCode, e as RouteDockErrorOptions, f as RouteDockFacilitatorError, g as RouteDockManifestError, h as RouteDockManifestSunsetError, i as RouteDockManifestTimeoutError, j as RouteDockNetworkError, k as RouteDockNoSupportedModeError, l as RouteDockPolicyRejectError, m as RouteDockPolicyRejectedError, n as RouteDockRefundWindowError, o as RouteDockSessionError, p as RouteDockSignatureError, q as RouteDockTrustlineError, r as RouteDockVoucherMonotonicityError, S as SessionStore, s as SupabaseSessionStore, t as httpStatusToError, u as parseRetryAfterMs, w as wrapFetchError } from './SessionStore-DvkZv8-E.js';
4
+ import { R as RetryPolicy } from './RouteDockClient-BbkqjhMG.js';
5
+ export { D as DEFAULT_RETRY_POLICY, a as DailySpend, I as InMemorySpendStore, b as InMemorySpendStoreOptions, M as ModeSelectOptions, N as NulthAuthSignature, c as NulthClientConfig, d as NulthPolicyError, e as NulthPolicyState, f as NulthProof, g as NulthSignerConfig, h as NulthStellarSigner, i as NulthVaultConfig, P as PaymentAuthContext, j as RouteDockClient, k as RouteDockClientConfig, l as RouteDockLogger, S as SpendCap, m as SpendStore, V as VaultConfig, n as assertEndpointActive, o as assertManifestValid, p as assertNulthVaultManifest, q as backoffDelayMs, r as configureManifestCache, s as createNulthSigner, t as createPolicyState, u as decodeAuthSignature, v as fetchLedgerSequence, w as fetchManifest, x as invalidateManifest, y as paymentContextFromManifest, z as prepareNulthSigner, A as rankProvidersByLatency, B as selectMode, C as setNulthPaymentContext, E as usdcToMicros, F as withRetry } from './RouteDockClient-BbkqjhMG.js';
6
+ export { F as FileSpendStore, M as MppChargeClient, O as OnChainProviderInfo, a as OnChainRegistry, P as ProviderRecord, b as ProviderRegistry, c as ProviderRegistryConfig, X as X402Client, u as usdcToUnits } from './ProviderRegistry-C50nyhaF.js';
3
7
  import { Keypair } from '@stellar/stellar-sdk';
8
+ export { USDC_DECIMALS, usdcToStroops } from '@routedock/nulth-sdk';
9
+ import 'mppx';
4
10
  import '@supabase/supabase-js';
5
-
6
- interface ModeSelectOptions {
7
- /** Force mpp-session if the provider supports it */
8
- sustained?: boolean;
9
- session?: boolean;
10
- /**
11
- * Override mode selection and use this specific mode.
12
- * Throws RouteDockNoSupportedModeError if the provider does not support it.
13
- */
14
- forceMode?: PaymentMode;
15
- }
16
- /** Fetch, validate, and cache a RouteDock manifest from `baseUrl`. */
17
- declare function fetchManifest(baseUrl: string): Promise<RouteDockManifest>;
18
- /**
19
- * Deterministic mode selection per Section 6.3 of ROUTEDOCK_MASTER.md:
20
- * 1. If { sustained | session } AND manifest supports mpp-session → mpp-session
21
- * 2. Else if manifest supports mpp-charge AND network is Stellar → mpp-charge
22
- * 3. Else if manifest supports x402 → x402
23
- * 4. Else throw RouteDockNoSupportedModeError
24
- */
25
- declare function selectMode(manifest: RouteDockManifest, options?: ModeSelectOptions): PaymentMode;
26
-
27
- interface SpendCap {
28
- /** Maximum total USDC spend per day (decimal string, e.g. "1.00") */
29
- daily: string;
30
- asset: 'USDC';
31
- }
32
- interface RouteDockClientConfig {
33
- /** Stellar keypair or raw secret key (S...) */
34
- wallet: Keypair | string;
35
- network: 'testnet' | 'mainnet';
36
- /** Optional local daily spend cap — checked before every payment */
37
- spendCap?: SpendCap;
38
- /** Ed25519 secret key (S...) for signing channel commitments. Required for mpp-session. */
39
- commitmentSecret?: string | undefined;
40
- }
41
- declare class RouteDockClient {
42
- private readonly keypair;
43
- private readonly network;
44
- private readonly spendCap;
45
- private readonly commitmentSecret;
46
- /** Local daily accumulator keyed by YYYY-MM-DD */
47
- private dailySpend;
48
- private readonly x402;
49
- private readonly charge;
50
- private readonly session;
51
- constructor(config: RouteDockClientConfig);
52
- /**
53
- * Pay for one request at `url`. Fetches manifest, selects payment mode,
54
- * checks local spend cap, executes payment, returns result.
55
- */
56
- pay(url: string, options?: ModeSelectOptions): Promise<PaymentResult>;
57
- /**
58
- * Open a sustained MPP session at `url`. Verifies mpp-session is supported
59
- * before opening a channel. Returns a SessionHandle for streaming + closing.
60
- */
61
- openSession(url: string): Promise<SessionHandle>;
62
- /** Check local daily cap and record the spend. Throws if cap exceeded. */
63
- private _checkAndRecordSpend;
64
- }
65
-
66
- type Network = 'testnet' | 'mainnet';
67
- declare class X402Client {
68
- private readonly secretKey;
69
- private readonly network;
70
- private readonly httpClient;
71
- constructor(secretKey: string, network: Network);
72
- pay(url: string, manifest: RouteDockManifest): Promise<PaymentResult>;
73
- }
74
-
75
- declare class MppChargeClient {
76
- private readonly keypair;
77
- private readonly network;
78
- constructor(keypair: Keypair, network: 'testnet' | 'mainnet');
79
- pay(url: string, manifest: RouteDockManifest): Promise<PaymentResult>;
80
- }
11
+ import '@x402/stellar';
12
+ import '@stellar/stellar-sdk/contract';
81
13
 
82
14
  /**
83
15
  * MppSessionClient — uses @stellar/mpp channel/client for off-chain
@@ -88,11 +20,48 @@ declare class MppChargeClient {
88
20
  * @stellar/mpp library handles the 402 challenge-response cycle.
89
21
  */
90
22
 
23
+ /** A WebSocket socket as consumed by the mpp-session-ws stream. */
24
+ interface WebSocketLike {
25
+ readyState: number;
26
+ close(code?: number, reason?: string): void;
27
+ }
28
+ /** Callbacks a WebSocket factory must wire to the underlying socket. */
29
+ interface WebSocketHandlers {
30
+ onOpen(): void;
31
+ onMessage(data: string): void;
32
+ onClose(code: number, reason: string): void;
33
+ onError(): void;
34
+ }
35
+ /**
36
+ * Creates a WebSocket connection with the given handshake headers.
37
+ * Injected for testability; defaults to the runtime WebSocket global
38
+ * (undici in Node ≥ 22 supports handshake headers via its options object).
39
+ */
40
+ type WebSocketFactory = (url: string, init: {
41
+ headers: Record<string, string>;
42
+ }, handlers: WebSocketHandlers) => WebSocketLike;
91
43
  declare class MppSessionClient {
92
44
  private readonly keypair;
93
45
  private readonly network;
94
- constructor(keypair: Keypair, network: 'testnet' | 'mainnet');
95
- openSession(url: string, manifest: RouteDockManifest, commitmentSecret: string): Promise<SessionHandle>;
46
+ private readonly retryPolicy?;
47
+ private readonly webSocketFactory;
48
+ constructor(keypair: Keypair, network: 'testnet' | 'mainnet', retryPolicy?: RetryPolicy | undefined, webSocketFactory?: WebSocketFactory);
49
+ openSession(url: string, manifest: RouteDockManifest, commitmentSecret: string, options?: SessionOptions, onSpend?: (amount: string) => Promise<void>): Promise<SessionHandle>;
50
+ /**
51
+ * mpp-session-ws streaming transport.
52
+ *
53
+ * Mirrors the issue's three-step sequence:
54
+ * 1. open the channel — probe the provider URL over HTTP;
55
+ * 2. negotiate the voucher — sign the mppx 402 challenge into a credential;
56
+ * 3. upgrade the HTTP connection to WebSocket — hand the signed voucher to
57
+ * the provider as the Authorization header of the WebSocket handshake.
58
+ *
59
+ * Each server frame is yielded (JSON frames parsed; raw strings yielded
60
+ * as-is). The stream ends when the server closes the socket with a normal
61
+ * close code (1000/1001); abnormal closes and connection failures surface as
62
+ * RouteDockChannelStateError.
63
+ */
64
+ private streamWebSocket;
96
65
  }
97
66
 
98
- export { type ModeSelectOptions, MppChargeClient, MppSessionClient, PaymentMode, PaymentResult, RouteDockClient, type RouteDockClientConfig, RouteDockManifest, SessionHandle, type SpendCap, X402Client, fetchManifest, selectMode };
67
+ export { MppSessionClient, RetryPolicy, RouteDockManifest, SessionHandle, SessionOptions, type WebSocketFactory, type WebSocketHandlers, type WebSocketLike };