@partylayer/provider 0.1.1
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 +94 -0
- package/dist/index.d.mts +389 -0
- package/dist/index.d.ts +389 -0
- package/dist/index.js +938 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +897 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +51 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
import { CIP0103Provider, CIP0103RequestPayload, CIP0103EventListener, PartyLayerError, CIP0103ConnectResult, CIP0103TxChangedEvent, CIP0103Network, CIP0103RequestParams } from '@partylayer/core';
|
|
2
|
+
export { CIP0103Account, CIP0103AccountStatus, CIP0103ConnectResult, CIP0103Event, CIP0103EventListener, CIP0103LedgerApiRequest, CIP0103LedgerApiResponse, CIP0103Method, CIP0103Network, CIP0103Provider, CIP0103ProviderInfo, CIP0103ProviderRpcError, CIP0103ProviderType, CIP0103RequestParams, CIP0103RequestPayload, CIP0103SignMessageRequest, CIP0103StatusEvent, CIP0103TxChangedEvent, CIP0103TxExecutedPayload, CIP0103TxFailedPayload, CIP0103TxPendingPayload, CIP0103TxSignedPayload, CIP0103TxStatus, CIP0103_EVENTS, CIP0103_MANDATORY_METHODS, CIP0103_METHODS } from '@partylayer/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CIP-0103 Wallet Discovery
|
|
6
|
+
*
|
|
7
|
+
* Discovers CIP-0103-compliant wallet Providers from the global scope.
|
|
8
|
+
* Wallet-agnostic: no hardcoded wallet logic, only duck-type checking
|
|
9
|
+
* for the Provider interface shape.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Metadata about a discovered CIP-0103 wallet provider */
|
|
13
|
+
interface DiscoveredProvider {
|
|
14
|
+
/** Identifier (e.g. "canton.console", "consoleWallet") */
|
|
15
|
+
id: string;
|
|
16
|
+
/** The native CIP-0103 Provider instance */
|
|
17
|
+
provider: CIP0103Provider;
|
|
18
|
+
/** How it was discovered */
|
|
19
|
+
source: 'injected' | 'registry';
|
|
20
|
+
/** Whether the provider supports async flows (userUrl) */
|
|
21
|
+
isAsync?: boolean;
|
|
22
|
+
/** Display name (if discoverable from status) */
|
|
23
|
+
name?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if an object implements the CIP-0103 Provider interface.
|
|
27
|
+
*
|
|
28
|
+
* This is a structural (duck-type) check — it verifies the presence of
|
|
29
|
+
* the four required methods without checking implementation correctness.
|
|
30
|
+
*/
|
|
31
|
+
declare function isCIP0103Provider(obj: unknown): obj is CIP0103Provider;
|
|
32
|
+
/**
|
|
33
|
+
* Discover all injected CIP-0103 providers from the global scope.
|
|
34
|
+
*
|
|
35
|
+
* Scans well-known window paths and their sub-properties for objects
|
|
36
|
+
* that implement the Provider interface.
|
|
37
|
+
*/
|
|
38
|
+
declare function discoverInjectedProviders(): DiscoveredProvider[];
|
|
39
|
+
/**
|
|
40
|
+
* Wait for a specific provider to be injected (with timeout).
|
|
41
|
+
*
|
|
42
|
+
* Extensions may inject their provider after page load. This function
|
|
43
|
+
* polls at 100ms intervals until the provider appears or the timeout
|
|
44
|
+
* expires.
|
|
45
|
+
*
|
|
46
|
+
* @param id - Provider id to match (exact or suffix match)
|
|
47
|
+
* @param timeoutMs - Maximum wait time (default 3000ms)
|
|
48
|
+
*/
|
|
49
|
+
declare function waitForProvider(id: string, timeoutMs?: number): Promise<DiscoveredProvider | null>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* PartyLayerProvider — CIP-0103 Native Provider Implementation
|
|
53
|
+
*
|
|
54
|
+
* This is the core Provider class. It wraps a single native CIP-0103
|
|
55
|
+
* wallet provider and adds:
|
|
56
|
+
*
|
|
57
|
+
* - Method routing with orchestrated overrides (connect, disconnect, etc.)
|
|
58
|
+
* - Event forwarding from the native wallet to the dApp
|
|
59
|
+
* - Async wallet support (userUrl flows)
|
|
60
|
+
* - Error normalization to ProviderRpcError
|
|
61
|
+
* - Forward compatibility for unknown methods and events
|
|
62
|
+
*
|
|
63
|
+
* IMPORTANT: No wallet-specific logic lives here. The Provider is purely
|
|
64
|
+
* a router and normalizer.
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
interface PartyLayerProviderOptions {
|
|
68
|
+
/** Discovered wallet provider to wrap */
|
|
69
|
+
walletProvider?: DiscoveredProvider;
|
|
70
|
+
/** Timeout for async operations (ms). Default 300_000 (5 min). */
|
|
71
|
+
asyncTimeoutMs?: number;
|
|
72
|
+
/** Callback when a userUrl is available (for async wallets) */
|
|
73
|
+
onUserUrl?: (url: string) => void;
|
|
74
|
+
}
|
|
75
|
+
declare class PartyLayerProvider implements CIP0103Provider {
|
|
76
|
+
private readonly eventBus;
|
|
77
|
+
private readonly router;
|
|
78
|
+
private readonly options;
|
|
79
|
+
private nativeProvider;
|
|
80
|
+
private connected;
|
|
81
|
+
/** Event forwarders from the native provider, keyed by event name */
|
|
82
|
+
private nativeForwarders;
|
|
83
|
+
constructor(options?: PartyLayerProviderOptions);
|
|
84
|
+
request<T = unknown>(args: CIP0103RequestPayload): Promise<T>;
|
|
85
|
+
on<T = unknown>(event: string, listener: CIP0103EventListener<T>): this;
|
|
86
|
+
emit<T = unknown>(event: string, ...args: T[]): boolean;
|
|
87
|
+
removeListener<T = unknown>(event: string, listenerToRemove: CIP0103EventListener<T>): this;
|
|
88
|
+
/** Whether the provider is currently in a connected state */
|
|
89
|
+
get isConnected(): boolean;
|
|
90
|
+
/** Switch the underlying wallet provider (e.g. user selects a different wallet) */
|
|
91
|
+
setWalletProvider(discovered: DiscoveredProvider): void;
|
|
92
|
+
/** Get the currently attached native provider (if any) */
|
|
93
|
+
getNativeProvider(): CIP0103Provider | null;
|
|
94
|
+
/** Tear down: unsubscribe all events and release the native provider */
|
|
95
|
+
destroy(): void;
|
|
96
|
+
private registerOrchestratedMethods;
|
|
97
|
+
private forwardNativeEvents;
|
|
98
|
+
private unforwardNativeEvents;
|
|
99
|
+
/** Emit statusChanged by querying the current wallet provider status */
|
|
100
|
+
private emitStatusChanged;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* PartyLayerClient → CIP-0103 Provider Bridge
|
|
105
|
+
*
|
|
106
|
+
* Creates a CIP-0103-compliant Provider backed by an existing
|
|
107
|
+
* PartyLayerClient instance. This is the backward-compatibility path:
|
|
108
|
+
* existing dApps using PartyLayerClient can obtain a standard Provider
|
|
109
|
+
* without rewiring their wallet adapter stack.
|
|
110
|
+
*
|
|
111
|
+
* Usage:
|
|
112
|
+
* const provider = createProviderBridge(client);
|
|
113
|
+
* // or (added to PartyLayerClient):
|
|
114
|
+
* const provider = client.asProvider();
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Minimal interface for the PartyLayerClient consumed by the bridge.
|
|
119
|
+
* Using an interface avoids importing the full SDK (prevents circular deps).
|
|
120
|
+
*/
|
|
121
|
+
interface BridgeableClient {
|
|
122
|
+
connect(options?: unknown): Promise<{
|
|
123
|
+
sessionId: unknown;
|
|
124
|
+
walletId: unknown;
|
|
125
|
+
partyId: unknown;
|
|
126
|
+
network: string;
|
|
127
|
+
expiresAt?: number;
|
|
128
|
+
capabilitiesSnapshot?: string[];
|
|
129
|
+
}>;
|
|
130
|
+
disconnect(): Promise<void>;
|
|
131
|
+
getActiveSession(): Promise<{
|
|
132
|
+
sessionId: unknown;
|
|
133
|
+
walletId: unknown;
|
|
134
|
+
partyId: unknown;
|
|
135
|
+
network: string;
|
|
136
|
+
expiresAt?: number;
|
|
137
|
+
capabilitiesSnapshot?: string[];
|
|
138
|
+
} | null>;
|
|
139
|
+
signMessage(params: {
|
|
140
|
+
message: string;
|
|
141
|
+
nonce?: string;
|
|
142
|
+
domain?: string;
|
|
143
|
+
}): Promise<{
|
|
144
|
+
signature: unknown;
|
|
145
|
+
}>;
|
|
146
|
+
signTransaction(params: {
|
|
147
|
+
tx: unknown;
|
|
148
|
+
}): Promise<{
|
|
149
|
+
transactionHash: unknown;
|
|
150
|
+
signedTx?: unknown;
|
|
151
|
+
partyId?: unknown;
|
|
152
|
+
}>;
|
|
153
|
+
submitTransaction(params: {
|
|
154
|
+
signedTx: unknown;
|
|
155
|
+
}): Promise<{
|
|
156
|
+
transactionHash: unknown;
|
|
157
|
+
submittedAt?: number;
|
|
158
|
+
commandId?: string;
|
|
159
|
+
updateId?: string;
|
|
160
|
+
}>;
|
|
161
|
+
ledgerApi?(params: {
|
|
162
|
+
requestMethod: string;
|
|
163
|
+
resource: string;
|
|
164
|
+
body?: string;
|
|
165
|
+
}): Promise<{
|
|
166
|
+
response: string;
|
|
167
|
+
}>;
|
|
168
|
+
getRegistryStatus(): unknown;
|
|
169
|
+
on(event: string, handler: (event: unknown) => void | Promise<void>): () => void;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Create a CIP-0103 Provider backed by a PartyLayerClient.
|
|
173
|
+
*
|
|
174
|
+
* All `request()` calls are mapped to PartyLayerClient methods.
|
|
175
|
+
* PartyLayer events are forwarded as CIP-0103 events.
|
|
176
|
+
*/
|
|
177
|
+
declare function createProviderBridge(client: BridgeableClient): CIP0103Provider;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* CIP-0103 / EIP-1193 / EIP-1474 Error Model
|
|
181
|
+
*
|
|
182
|
+
* All errors on the Provider surface MUST be ProviderRpcError instances
|
|
183
|
+
* with numeric codes. No PartyLayer string-based ErrorCode is ever exposed.
|
|
184
|
+
*
|
|
185
|
+
* Reference: https://eips.ethereum.org/EIPS/eip-1193
|
|
186
|
+
* Reference: https://eips.ethereum.org/EIPS/eip-1474
|
|
187
|
+
*/
|
|
188
|
+
declare class ProviderRpcError extends Error {
|
|
189
|
+
readonly code: number;
|
|
190
|
+
readonly data?: unknown;
|
|
191
|
+
constructor(message: string, code: number, data?: unknown);
|
|
192
|
+
toJSON(): Record<string, unknown>;
|
|
193
|
+
}
|
|
194
|
+
declare const RPC_ERRORS: {
|
|
195
|
+
/** User rejected the request */
|
|
196
|
+
readonly USER_REJECTED: 4001;
|
|
197
|
+
/** The requested method/account is not authorized */
|
|
198
|
+
readonly UNAUTHORIZED: 4100;
|
|
199
|
+
/** Provider does not support the requested method */
|
|
200
|
+
readonly UNSUPPORTED_METHOD: 4200;
|
|
201
|
+
/** Provider is disconnected from all chains */
|
|
202
|
+
readonly DISCONNECTED: 4900;
|
|
203
|
+
/** Provider is not connected to the requested chain */
|
|
204
|
+
readonly CHAIN_DISCONNECTED: 4901;
|
|
205
|
+
};
|
|
206
|
+
declare const JSON_RPC_ERRORS: {
|
|
207
|
+
/** Invalid JSON (parse error) */
|
|
208
|
+
readonly PARSE_ERROR: -32700;
|
|
209
|
+
/** Invalid request object */
|
|
210
|
+
readonly INVALID_REQUEST: -32600;
|
|
211
|
+
/** Method not found */
|
|
212
|
+
readonly METHOD_NOT_FOUND: -32601;
|
|
213
|
+
/** Invalid method parameters */
|
|
214
|
+
readonly INVALID_PARAMS: -32602;
|
|
215
|
+
/** Internal JSON-RPC error */
|
|
216
|
+
readonly INTERNAL_ERROR: -32603;
|
|
217
|
+
/** Invalid input / missing or invalid parameters */
|
|
218
|
+
readonly INVALID_INPUT: -32000;
|
|
219
|
+
/** Resource not found */
|
|
220
|
+
readonly RESOURCE_NOT_FOUND: -32001;
|
|
221
|
+
/** Resource unavailable */
|
|
222
|
+
readonly RESOURCE_UNAVAILABLE: -32002;
|
|
223
|
+
/** Transaction rejected */
|
|
224
|
+
readonly TRANSACTION_REJECTED: -32003;
|
|
225
|
+
/** Method not supported */
|
|
226
|
+
readonly METHOD_NOT_SUPPORTED: -32004;
|
|
227
|
+
/** Rate limit exceeded */
|
|
228
|
+
readonly RATE_LIMIT_EXCEEDED: -32005;
|
|
229
|
+
};
|
|
230
|
+
declare function userRejected(message?: string, data?: unknown): ProviderRpcError;
|
|
231
|
+
declare function unauthorized(message?: string, data?: unknown): ProviderRpcError;
|
|
232
|
+
declare function unsupportedMethod(method: string): ProviderRpcError;
|
|
233
|
+
declare function disconnected(message?: string): ProviderRpcError;
|
|
234
|
+
declare function chainDisconnected(message?: string): ProviderRpcError;
|
|
235
|
+
declare function internalError(message: string, data?: unknown): ProviderRpcError;
|
|
236
|
+
declare function invalidParams(message: string, data?: unknown): ProviderRpcError;
|
|
237
|
+
declare function methodNotFound(method: string): ProviderRpcError;
|
|
238
|
+
declare function resourceNotFound(message: string, data?: unknown): ProviderRpcError;
|
|
239
|
+
declare function resourceUnavailable(message: string, data?: unknown): ProviderRpcError;
|
|
240
|
+
declare function transactionRejected(message?: string, data?: unknown): ProviderRpcError;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Bidirectional error mapping between PartyLayer ErrorCode and CIP-0103 numeric codes
|
|
244
|
+
*
|
|
245
|
+
* This module ensures no PartyLayer internals leak through the Provider surface,
|
|
246
|
+
* and provides a reverse path for the bridge.
|
|
247
|
+
*/
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Convert any error into a ProviderRpcError for the CIP-0103 surface.
|
|
251
|
+
*
|
|
252
|
+
* This is the single normalization point — every error that escapes
|
|
253
|
+
* the Provider MUST pass through this function.
|
|
254
|
+
*/
|
|
255
|
+
declare function toProviderRpcError(err: unknown): ProviderRpcError;
|
|
256
|
+
/**
|
|
257
|
+
* Convert ProviderRpcError back to a PartyLayerError.
|
|
258
|
+
*
|
|
259
|
+
* Used by the bridge path when errors from the Provider surface
|
|
260
|
+
* need to flow back into the PartyLayerClient world.
|
|
261
|
+
*/
|
|
262
|
+
declare function toPartyLayerError(err: ProviderRpcError): PartyLayerError;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Async Wallet Handling
|
|
266
|
+
*
|
|
267
|
+
* CIP-0103 async wallet extensions allow methods like `connect` and
|
|
268
|
+
* `prepareExecute` to return a `{ userUrl }` instead of completing
|
|
269
|
+
* synchronously. The user must visit the URL (e.g., mobile wallet
|
|
270
|
+
* approval screen), and the wallet provider emits an event when the
|
|
271
|
+
* operation completes.
|
|
272
|
+
*
|
|
273
|
+
* This module provides helpers that abstract the wait-for-event pattern
|
|
274
|
+
* so the Provider implementation can offer a unified surface to dApps.
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
interface AsyncConnectOptions {
|
|
278
|
+
/** Timeout for waiting for the async connect event (ms) */
|
|
279
|
+
timeoutMs?: number;
|
|
280
|
+
/** Callback when userUrl is available (for UI to redirect / show QR) */
|
|
281
|
+
onUserUrl?: (url: string) => void;
|
|
282
|
+
}
|
|
283
|
+
interface AsyncPrepareExecuteOptions {
|
|
284
|
+
timeoutMs?: number;
|
|
285
|
+
onUserUrl?: (url: string) => void;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Handle an async connect flow:
|
|
289
|
+
*
|
|
290
|
+
* 1. If connectResult is already isConnected (sync wallet), return immediately.
|
|
291
|
+
* 2. If connectResult has userUrl, invoke onUserUrl callback for UI.
|
|
292
|
+
* 3. Wait for 'connected' event from the wallet provider.
|
|
293
|
+
* 4. Return the final ConnectResult.
|
|
294
|
+
*/
|
|
295
|
+
declare function handleAsyncConnect(walletProvider: CIP0103Provider, connectResult: CIP0103ConnectResult, options?: AsyncConnectOptions): Promise<CIP0103ConnectResult>;
|
|
296
|
+
/**
|
|
297
|
+
* Handle an async prepareExecute flow:
|
|
298
|
+
*
|
|
299
|
+
* 1. If result has userUrl, invoke onUserUrl callback for UI.
|
|
300
|
+
* 2. Wait for 'txChanged' event with matching commandId.
|
|
301
|
+
* 3. Return when txChanged reaches a terminal state (executed / failed).
|
|
302
|
+
*/
|
|
303
|
+
declare function handleAsyncPrepareExecute(walletProvider: CIP0103Provider, commandId: string, userUrl: string | undefined, options?: AsyncPrepareExecuteOptions): Promise<CIP0103TxChangedEvent>;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* CAIP-2 Network Identity Utilities
|
|
307
|
+
*
|
|
308
|
+
* All CIP-0103 network identifiers use CAIP-2 format: "namespace:reference"
|
|
309
|
+
* e.g. "canton:da-mainnet", "canton:da-devnet"
|
|
310
|
+
*
|
|
311
|
+
* Reference: https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md
|
|
312
|
+
*/
|
|
313
|
+
|
|
314
|
+
declare const CANTON_NETWORKS: Record<string, string>;
|
|
315
|
+
/**
|
|
316
|
+
* Convert a legacy PartyLayer NetworkId (e.g. "devnet") or already-CAIP-2
|
|
317
|
+
* string to a CIP-0103 Network object.
|
|
318
|
+
*
|
|
319
|
+
* @throws {Error} if the resulting network ID is not valid CAIP-2
|
|
320
|
+
*/
|
|
321
|
+
declare function toCAIP2Network(networkId: string): CIP0103Network;
|
|
322
|
+
/**
|
|
323
|
+
* Extract the short network name from a CAIP-2 ID.
|
|
324
|
+
* Returns the original string if no reverse mapping exists.
|
|
325
|
+
*/
|
|
326
|
+
declare function fromCAIP2Network(caip2: string): string;
|
|
327
|
+
/**
|
|
328
|
+
* Validate that a string conforms to CAIP-2 format.
|
|
329
|
+
*
|
|
330
|
+
* CAIP-2 format: namespace:reference
|
|
331
|
+
* - namespace: [-a-z0-9]{3,8}
|
|
332
|
+
* - reference: [-_a-zA-Z0-9]{1,32}
|
|
333
|
+
*/
|
|
334
|
+
declare function isValidCAIP2(networkId: string): boolean;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* CIP-0103 Event Bus
|
|
338
|
+
*
|
|
339
|
+
* Minimal, spec-compliant event emitter.
|
|
340
|
+
* - on() and removeListener() return the Provider (for chaining)
|
|
341
|
+
* - emit() returns boolean (true if any listener was called)
|
|
342
|
+
* - Listener errors are swallowed to prevent one handler from
|
|
343
|
+
* breaking others
|
|
344
|
+
*/
|
|
345
|
+
|
|
346
|
+
declare class CIP0103EventBus {
|
|
347
|
+
private listeners;
|
|
348
|
+
private owner;
|
|
349
|
+
/** Set the owning Provider instance (for chaining returns) */
|
|
350
|
+
setOwner(owner: CIP0103Provider): void;
|
|
351
|
+
on<T = unknown>(event: string, listener: CIP0103EventListener<T>): CIP0103Provider;
|
|
352
|
+
emit<T = unknown>(event: string, ...args: T[]): boolean;
|
|
353
|
+
removeListener<T = unknown>(event: string, listenerToRemove: CIP0103EventListener<T>): CIP0103Provider;
|
|
354
|
+
/** Remove all listeners, optionally scoped to a single event */
|
|
355
|
+
removeAllListeners(event?: string): void;
|
|
356
|
+
/** Number of listeners for a given event */
|
|
357
|
+
listenerCount(event: string): number;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* CIP-0103 Method Router
|
|
362
|
+
*
|
|
363
|
+
* Routes request({ method, params }) calls to the correct handler function.
|
|
364
|
+
* By default, all 10 mandatory CIP-0103 methods are registered as passthrough
|
|
365
|
+
* handlers that delegate to the native wallet Provider.
|
|
366
|
+
*
|
|
367
|
+
* Forward-compatible: unknown methods are passed through to the wallet provider
|
|
368
|
+
* rather than rejected, allowing support for future CIP extensions.
|
|
369
|
+
*/
|
|
370
|
+
|
|
371
|
+
type MethodHandler<T = unknown> = (walletProvider: CIP0103Provider, params?: CIP0103RequestParams) => Promise<T>;
|
|
372
|
+
declare class MethodRouter {
|
|
373
|
+
private handlers;
|
|
374
|
+
private walletProvider;
|
|
375
|
+
constructor();
|
|
376
|
+
/** Set / swap the underlying native wallet provider */
|
|
377
|
+
setWalletProvider(provider: CIP0103Provider | null): void;
|
|
378
|
+
/** Get the current wallet provider */
|
|
379
|
+
getWalletProvider(): CIP0103Provider | null;
|
|
380
|
+
/** Register (or override) a handler for a method name */
|
|
381
|
+
register<T>(method: string, handler: MethodHandler<T>): void;
|
|
382
|
+
/** Route a request to the appropriate handler */
|
|
383
|
+
route<T>(payload: CIP0103RequestPayload): Promise<T>;
|
|
384
|
+
/** Check whether a handler is registered for a given method */
|
|
385
|
+
hasHandler(method: string): boolean;
|
|
386
|
+
private registerDefaults;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export { type AsyncConnectOptions, type AsyncPrepareExecuteOptions, CANTON_NETWORKS, CIP0103EventBus, type DiscoveredProvider, JSON_RPC_ERRORS, type MethodHandler, MethodRouter, PartyLayerProvider, type PartyLayerProviderOptions, ProviderRpcError, RPC_ERRORS, chainDisconnected, createProviderBridge, disconnected, discoverInjectedProviders, fromCAIP2Network, handleAsyncConnect, handleAsyncPrepareExecute, internalError, invalidParams, isCIP0103Provider, isValidCAIP2, methodNotFound, resourceNotFound, resourceUnavailable, toCAIP2Network, toPartyLayerError, toProviderRpcError, transactionRejected, unauthorized, unsupportedMethod, userRejected, waitForProvider };
|