@veridex/sdk 1.1.5 → 1.1.7

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 (102) hide show
  1. package/dist/{EVMClient-Bmy9czkE.d.mts → EVMClient-DqDiFak8.d.mts} +1 -1
  2. package/dist/auth/prepareAuth.d.mts +5 -4
  3. package/dist/auth/prepareAuth.js +143 -1422
  4. package/dist/auth/prepareAuth.js.map +1 -1
  5. package/dist/auth/prepareAuth.mjs +17 -96
  6. package/dist/auth/prepareAuth.mjs.map +1 -1
  7. package/dist/chains/aptos/index.d.mts +1 -1
  8. package/dist/chains/aptos/index.js +11 -33
  9. package/dist/chains/aptos/index.js.map +1 -1
  10. package/dist/chains/aptos/index.mjs +2 -2
  11. package/dist/chains/avalanche/index.d.mts +2 -2
  12. package/dist/chains/avalanche/index.js +19 -115
  13. package/dist/chains/avalanche/index.js.map +1 -1
  14. package/dist/chains/avalanche/index.mjs +3 -3
  15. package/dist/chains/evm/index.d.mts +5 -4
  16. package/dist/chains/evm/index.js +19 -115
  17. package/dist/chains/evm/index.js.map +1 -1
  18. package/dist/chains/evm/index.mjs +2 -2
  19. package/dist/chains/solana/index.d.mts +1 -1
  20. package/dist/chains/solana/index.js +11 -33
  21. package/dist/chains/solana/index.js.map +1 -1
  22. package/dist/chains/solana/index.mjs +2 -2
  23. package/dist/chains/stacks/index.d.mts +1 -1
  24. package/dist/chains/stacks/index.js +11 -38
  25. package/dist/chains/stacks/index.js.map +1 -1
  26. package/dist/chains/stacks/index.mjs +2 -2
  27. package/dist/chains/starknet/index.d.mts +36 -2
  28. package/dist/chains/starknet/index.js +208 -37
  29. package/dist/chains/starknet/index.js.map +1 -1
  30. package/dist/chains/starknet/index.mjs +9 -4
  31. package/dist/chains/stellar/index.d.mts +2 -1
  32. package/dist/chains/sui/index.d.mts +1 -1
  33. package/dist/chains/sui/index.js +11 -27
  34. package/dist/chains/sui/index.js.map +1 -1
  35. package/dist/chains/sui/index.mjs +2 -2
  36. package/dist/{chunk-ZNIVNPGF.mjs → chunk-3PCAVZUZ.mjs} +173 -37
  37. package/dist/chunk-3PCAVZUZ.mjs.map +1 -0
  38. package/dist/{chunk-DQOW3G7M.mjs → chunk-6BINP4RT.mjs} +48 -9
  39. package/dist/{chunk-DQOW3G7M.mjs.map → chunk-6BINP4RT.mjs.map} +1 -1
  40. package/dist/{chunk-7KN6Y4GX.mjs → chunk-AK5HWYX4.mjs} +12 -40
  41. package/dist/chunk-AK5HWYX4.mjs.map +1 -0
  42. package/dist/{chunk-QVTADARB.mjs → chunk-FPSCAGYS.mjs} +12 -35
  43. package/dist/chunk-FPSCAGYS.mjs.map +1 -0
  44. package/dist/{chunk-USVZH4QC.mjs → chunk-H3WRT6Y4.mjs} +20 -117
  45. package/dist/chunk-H3WRT6Y4.mjs.map +1 -0
  46. package/dist/{chunk-GXJUY2SC.mjs → chunk-MNH22BM2.mjs} +12 -35
  47. package/dist/chunk-MNH22BM2.mjs.map +1 -0
  48. package/dist/chunk-N42LPFPJ.mjs +177 -0
  49. package/dist/chunk-N42LPFPJ.mjs.map +1 -0
  50. package/dist/{chunk-D57UJ4L5.mjs → chunk-NKSRF45N.mjs} +12 -29
  51. package/dist/chunk-NKSRF45N.mjs.map +1 -0
  52. package/dist/{chunk-BJH5HJL5.mjs → chunk-SKZLZFE2.mjs} +91 -65
  53. package/dist/chunk-SKZLZFE2.mjs.map +1 -0
  54. package/dist/{chunk-NVRAQPSF.mjs → chunk-UF5NWMSQ.mjs} +20 -4
  55. package/dist/chunk-UF5NWMSQ.mjs.map +1 -0
  56. package/dist/chunk-WC4X3MAO.mjs +58 -0
  57. package/dist/chunk-WC4X3MAO.mjs.map +1 -0
  58. package/dist/{chunk-5FH67KLG.mjs → chunk-XHDOSV2F.mjs} +2 -2
  59. package/dist/{index-CKKUV4J7.d.mts → index-D1nb2JV9.d.mts} +2 -2
  60. package/dist/index-qyOqd8tx.d.mts +517 -0
  61. package/dist/index.d.mts +30 -366
  62. package/dist/index.js +2412 -2486
  63. package/dist/index.js.map +1 -1
  64. package/dist/index.mjs +986 -55
  65. package/dist/index.mjs.map +1 -1
  66. package/dist/passkey-fh8bo2w-.d.mts +241 -0
  67. package/dist/passkey.d.mts +2 -182
  68. package/dist/passkey.js +86 -7
  69. package/dist/passkey.js.map +1 -1
  70. package/dist/passkey.mjs +2 -1
  71. package/dist/payload.d.mts +22 -28
  72. package/dist/payload.js +50 -9
  73. package/dist/payload.js.map +1 -1
  74. package/dist/payload.mjs +7 -3
  75. package/dist/platform/index.d.mts +3 -0
  76. package/dist/platform/index.js +216 -0
  77. package/dist/platform/index.js.map +1 -0
  78. package/dist/platform/index.mjs +21 -0
  79. package/dist/platform/index.mjs.map +1 -0
  80. package/dist/{portfolio-W2FQ2G3O.mjs → portfolio-MLP2JIFK.mjs} +2 -3
  81. package/dist/queries/index.mjs +324 -10
  82. package/dist/queries/index.mjs.map +1 -1
  83. package/dist/{types-DP2CQT8p.d.mts → types-CdlEbixV.d.mts} +12 -1
  84. package/dist/types.d.mts +1 -0
  85. package/dist/types.js.map +1 -1
  86. package/package.json +7 -1
  87. package/dist/chunk-72ZA3OYQ.mjs +0 -20
  88. package/dist/chunk-72ZA3OYQ.mjs.map +0 -1
  89. package/dist/chunk-7KN6Y4GX.mjs.map +0 -1
  90. package/dist/chunk-BJH5HJL5.mjs.map +0 -1
  91. package/dist/chunk-D57UJ4L5.mjs.map +0 -1
  92. package/dist/chunk-GXJUY2SC.mjs.map +0 -1
  93. package/dist/chunk-NVRAQPSF.mjs.map +0 -1
  94. package/dist/chunk-QVTADARB.mjs.map +0 -1
  95. package/dist/chunk-USVZH4QC.mjs.map +0 -1
  96. package/dist/chunk-XDIIFIW6.mjs +0 -330
  97. package/dist/chunk-XDIIFIW6.mjs.map +0 -1
  98. package/dist/chunk-ZNIVNPGF.mjs.map +0 -1
  99. package/dist/chunk-ZXMTPBSP.mjs +0 -857
  100. package/dist/chunk-ZXMTPBSP.mjs.map +0 -1
  101. /package/dist/{chunk-5FH67KLG.mjs.map → chunk-XHDOSV2F.mjs.map} +0 -0
  102. /package/dist/{portfolio-W2FQ2G3O.mjs.map → portfolio-MLP2JIFK.mjs.map} +0 -0
@@ -0,0 +1,517 @@
1
+ import * as _veridex_platform_events from '@veridex/platform-events';
2
+ import { Environment, AtomicAmount, SponsorshipQuote, ChargeAuthorization } from '@veridex/platform-events';
3
+ import { D as DispatchDestinationV3 } from './types-CdlEbixV.mjs';
4
+
5
+ /**
6
+ * Veridex Protocol SDK - Relayer Client
7
+ *
8
+ * Client for interacting with the Veridex relayer service.
9
+ * The relayer automatically submits VAAs to destination chains.
10
+ *
11
+ * Features:
12
+ * - Submit VAA for relay
13
+ * - Check relay status
14
+ * - Get supported routes
15
+ * - Fee estimation
16
+ */
17
+
18
+ /**
19
+ * Relay request status
20
+ */
21
+ type RelayStatus = 'pending' | 'processing' | 'submitted' | 'confirmed' | 'failed';
22
+ /**
23
+ * Relay request result
24
+ */
25
+ interface RelayRequest {
26
+ /** Unique relay request ID */
27
+ id: string;
28
+ /** VAA sequence number */
29
+ sequence: bigint;
30
+ /** Source chain Wormhole ID */
31
+ sourceChain: number;
32
+ /** Destination chain Wormhole ID */
33
+ destinationChain: number;
34
+ /** Relay status */
35
+ status: RelayStatus;
36
+ /** Source transaction hash */
37
+ sourceTxHash: string;
38
+ /** Destination transaction hash (when completed) */
39
+ destinationTxHash?: string;
40
+ /** Timestamp when request was created */
41
+ createdAt: number;
42
+ /** Timestamp when request was last updated */
43
+ updatedAt: number;
44
+ /** Error message if failed */
45
+ error?: string;
46
+ /** Gas used on destination chain */
47
+ gasUsed?: bigint;
48
+ /** Fee paid */
49
+ feePaid?: bigint;
50
+ }
51
+ /**
52
+ * Supported route information
53
+ */
54
+ interface RelayRoute {
55
+ /** Source chain Wormhole ID */
56
+ sourceChain: number;
57
+ /** Destination chain Wormhole ID */
58
+ destinationChain: number;
59
+ /** Whether the route is active */
60
+ active: boolean;
61
+ /** Estimated relay time in seconds */
62
+ estimatedTimeSeconds: number;
63
+ /** Base fee in destination chain native token */
64
+ baseFee: bigint;
65
+ /** Fee per gas unit */
66
+ gasPrice: bigint;
67
+ /** Maximum gas limit */
68
+ maxGas: bigint;
69
+ }
70
+ /**
71
+ * Relayer service info
72
+ */
73
+ interface RelayerInfo {
74
+ /** Relayer name/identifier */
75
+ name: string;
76
+ /** Relayer version */
77
+ version: string;
78
+ /** Supported chains */
79
+ supportedChains: number[];
80
+ /** Available routes */
81
+ routes: RelayRoute[];
82
+ /** Whether the relayer is online */
83
+ online: boolean;
84
+ /** Current queue depth */
85
+ queueDepth: number;
86
+ }
87
+ /**
88
+ * Request body for submitting a signed action to the relayer (gasless)
89
+ * Uses full WebAuthn data for authenticateAndDispatch
90
+ */
91
+ interface SubmitSignedActionRequest {
92
+ /** WebAuthn authenticatorData (hex) */
93
+ authenticatorData: string;
94
+ /** WebAuthn clientDataJSON (raw string) */
95
+ clientDataJSON: string;
96
+ /** Index of "challenge":"..." in clientDataJSON */
97
+ challengeIndex: number;
98
+ /** Index of "type":"..." in clientDataJSON */
99
+ typeIndex: number;
100
+ /** P-256 signature r component (hex) */
101
+ r: string;
102
+ /** P-256 signature s component (hex) */
103
+ s: string;
104
+ /** P-256 public key X coordinate (hex) */
105
+ publicKeyX: string;
106
+ /** P-256 public key Y coordinate (hex) */
107
+ publicKeyY: string;
108
+ /** Target chain Wormhole ID */
109
+ targetChain: number;
110
+ /** Destination chain in the Veridex namespace */
111
+ veridexChainId: number;
112
+ /** Exact destination execution contract as bytes32 */
113
+ executor: string;
114
+ /** Minimum assurance tier committed by the signature */
115
+ minTier: number;
116
+ /** Action payload (hex) */
117
+ actionPayload: string;
118
+ /** User nonce as a decimal uint64 string */
119
+ nonce: string;
120
+ }
121
+ /**
122
+ * Response from submitting a signed action
123
+ */
124
+ interface SubmitActionResult {
125
+ /** Whether the submission was successful */
126
+ success: boolean;
127
+ /** Transaction hash on Hub chain */
128
+ txHash?: string;
129
+ /** Wormhole sequence number */
130
+ sequence?: string;
131
+ /** Error message if failed */
132
+ error?: string;
133
+ /** Human-readable message */
134
+ message?: string;
135
+ }
136
+ /**
137
+ * Query submission request (Issue #11/#12)
138
+ * For optimistic execution via Wormhole Query proofs (~5-7s vs ~120s)
139
+ */
140
+ interface SubmitQueryRequest {
141
+ /** Target spoke chain Wormhole ID */
142
+ targetChain: number;
143
+ /** User's key hash */
144
+ userKeyHash: string;
145
+ /** Serialized transaction for spoke chain */
146
+ serializedTx: string;
147
+ /** Query proof with Guardian signatures */
148
+ queryProof: {
149
+ /** Raw query response bytes */
150
+ queryResponse: string;
151
+ /** Guardian signatures */
152
+ signatures: string;
153
+ };
154
+ /** Whether to fallback to VAA if Query fails */
155
+ fallbackToVaa?: boolean;
156
+ /** Optional metadata */
157
+ metadata?: {
158
+ /** User's preferred execution path */
159
+ preferredPath?: 'query' | 'vaa';
160
+ /** Transaction value in USD (for routing decisions) */
161
+ estimatedValueUSD?: number;
162
+ };
163
+ }
164
+ /**
165
+ * Query submission result (Issue #11/#12)
166
+ */
167
+ interface SubmitQueryResult {
168
+ /** Whether submission succeeded */
169
+ success: boolean;
170
+ /** Transaction hash on spoke chain */
171
+ txHash?: string;
172
+ /** Execution path used */
173
+ path: 'query' | 'vaa';
174
+ /** Latency in milliseconds */
175
+ latencyMs?: number;
176
+ /** Error message if failed */
177
+ error?: string;
178
+ /** Whether fallback to VAA occurred */
179
+ fellBack?: boolean;
180
+ }
181
+ /**
182
+ * Fee quote for a relay
183
+ */
184
+ interface RelayFeeQuote {
185
+ /** Source chain Wormhole ID */
186
+ sourceChain: number;
187
+ /** Destination chain Wormhole ID */
188
+ destinationChain: number;
189
+ /** Estimated fee in source chain native token */
190
+ feeInSourceToken: bigint;
191
+ /** Estimated fee in destination chain native token */
192
+ feeInDestinationToken: bigint;
193
+ /** Estimated gas on destination */
194
+ estimatedGas: bigint;
195
+ /** Quote expiration timestamp */
196
+ expiresAt: number;
197
+ /** Quote ID for submission */
198
+ quoteId: string;
199
+ }
200
+ /**
201
+ * Configuration for RelayerClient
202
+ */
203
+ interface RelayerClientConfig {
204
+ /** Base URL of the relayer service */
205
+ baseUrl: string;
206
+ /** API key for authentication (optional) */
207
+ apiKey?: string;
208
+ /** Timeout for requests in ms */
209
+ timeoutMs?: number;
210
+ /** Max retries for failed requests */
211
+ maxRetries?: number;
212
+ }
213
+ type RegisteredAppStatus = 'active' | 'suspended' | 'revoked';
214
+ type RegisteredAppTrustLevel = 'verified' | 'registered' | 'pending';
215
+ interface RegisteredAppSummary {
216
+ id: string;
217
+ name: string;
218
+ origin: string;
219
+ trustLevel: RegisteredAppTrustLevel;
220
+ status: RegisteredAppStatus;
221
+ requestCount: number;
222
+ createdAt: number;
223
+ lastUsedAt?: number;
224
+ }
225
+ interface RegisteredAppDetail extends RegisteredAppSummary {
226
+ description?: string;
227
+ apiKey?: string;
228
+ activeSessionCount?: number;
229
+ }
230
+ interface RelayerAppSession {
231
+ id: string;
232
+ keyHash: string;
233
+ appOrigin: string;
234
+ sessionPublicKey: string;
235
+ permissions: string[];
236
+ expiresAt: number;
237
+ createdAt: number;
238
+ revoked: boolean;
239
+ active: boolean;
240
+ }
241
+ interface CredentialMetadataRecord {
242
+ credentialId: string;
243
+ keyHash: string;
244
+ displayName: string;
245
+ platformHint: string;
246
+ backupEligible: boolean | null;
247
+ backupState: boolean | null;
248
+ isRoot: boolean;
249
+ status: 'active' | 'revoked';
250
+ lastUsedAt: number | null;
251
+ useCount: number;
252
+ createdAt: number;
253
+ updatedAt: number;
254
+ }
255
+ /**
256
+ * Client for the Veridex relayer service
257
+ */
258
+ declare class RelayerClient {
259
+ private baseUrl;
260
+ private config;
261
+ constructor(config: RelayerClientConfig);
262
+ getDispatchDestination(targetChain: number): Promise<DispatchDestinationV3>;
263
+ getUserNonce(userKeyHash: string): Promise<bigint>;
264
+ /**
265
+ * Submit a VAA for relay to destination chain
266
+ */
267
+ submitRelay(vaaBase64: string, sourceChain: number, destinationChain: number, sourceTxHash: string, sequence: bigint, feeQuoteId?: string): Promise<RelayRequest>;
268
+ /**
269
+ * Submit a signed action to the relayer for gasless execution
270
+ *
271
+ * This allows users to execute transfers without paying gas themselves.
272
+ * The relayer will submit the transaction to the Hub chain and pay the gas.
273
+ * The relayer then automatically relays the VAA to the destination spoke chain.
274
+ *
275
+ * @param request - The signed action request with passkey signature
276
+ * @returns Result including Hub tx hash and Wormhole sequence
277
+ */
278
+ submitSignedAction(request: SubmitSignedActionRequest): Promise<SubmitActionResult>;
279
+ /**
280
+ * Submit a Query-based transaction for optimistic execution (Issue #11/#12)
281
+ *
282
+ * Uses Wormhole Cross-Chain Queries (CCQ) to achieve ~5-7 second latency
283
+ * vs ~120+ seconds for traditional VAA flow.
284
+ *
285
+ * Flow:
286
+ * 1. Client fetches Hub state via queryHubState() from SDK
287
+ * 2. Client constructs and signs transaction
288
+ * 3. Client submits Query proof + tx to this endpoint
289
+ * 4. Relayer validates format and submits to spoke chain
290
+ * 5. Spoke chain verifies Guardian signatures on-chain
291
+ *
292
+ * @param request - Query submission with Guardian-signed proof
293
+ * @returns Result including spoke tx hash and execution path
294
+ */
295
+ submitQuery(request: SubmitQueryRequest): Promise<SubmitQueryResult>;
296
+ /**
297
+ * Get relay request status
298
+ */
299
+ getRelayStatus(requestId: string): Promise<RelayRequest>;
300
+ /**
301
+ * Get relay status by source transaction hash
302
+ */
303
+ getRelayBySourceTx(sourceTxHash: string): Promise<RelayRequest | null>;
304
+ /**
305
+ * Get relay status by sequence number
306
+ */
307
+ getRelayBySequence(sourceChain: number, sequence: bigint): Promise<RelayRequest | null>;
308
+ /**
309
+ * Cancel a pending relay request
310
+ */
311
+ cancelRelay(requestId: string): Promise<boolean>;
312
+ /**
313
+ * Poll for relay completion
314
+ */
315
+ waitForRelay(requestId: string, timeoutMs?: number, pollingIntervalMs?: number, onProgress?: (status: RelayStatus) => void): Promise<RelayRequest>;
316
+ /**
317
+ * Get fee quote for a relay
318
+ */
319
+ getFeeQuote(sourceChain: number, destinationChain: number, estimatedGas?: bigint): Promise<RelayFeeQuote>;
320
+ /**
321
+ * Get relayer service info
322
+ */
323
+ getInfo(): Promise<RelayerInfo>;
324
+ /**
325
+ * Get supported routes
326
+ */
327
+ getRoutes(): Promise<RelayRoute[]>;
328
+ /**
329
+ * Check if a route is supported
330
+ */
331
+ isRouteSupported(sourceChain: number, destinationChain: number): Promise<boolean>;
332
+ /**
333
+ * Check relayer health
334
+ */
335
+ healthCheck(): Promise<boolean>;
336
+ listApps(): Promise<RegisteredAppSummary[]>;
337
+ getApp(appId: string): Promise<RegisteredAppDetail>;
338
+ updateAppStatus(appId: string, status: RegisteredAppStatus): Promise<void>;
339
+ updateAppTrustLevel(appId: string, trustLevel: RegisteredAppTrustLevel): Promise<void>;
340
+ listAppSessions(appId: string, options?: {
341
+ includeRevoked?: boolean;
342
+ }): Promise<RelayerAppSession[]>;
343
+ revokeAppSessions(appId: string, sessionId?: string): Promise<number>;
344
+ listCredentialMetadata(keyHash: string): Promise<CredentialMetadataRecord[]>;
345
+ /**
346
+ * Get all pending relay requests for a user
347
+ */
348
+ getPendingRelays(userKeyHash: string): Promise<RelayRequest[]>;
349
+ /**
350
+ * Get relay history for a user
351
+ */
352
+ getRelayHistory(userKeyHash: string, limit?: number, offset?: number): Promise<RelayRequest[]>;
353
+ /**
354
+ * SDK version for telemetry
355
+ */
356
+ private static readonly SDK_VERSION;
357
+ /**
358
+ * Make an HTTP request to the relayer
359
+ */
360
+ private fetch;
361
+ /**
362
+ * Sleep helper
363
+ */
364
+ private sleep;
365
+ }
366
+ /**
367
+ * Create a RelayerClient instance
368
+ */
369
+ declare function createRelayerClient(config: RelayerClientConfig): RelayerClient;
370
+
371
+ type SponsorshipFeeLeg = _veridex_platform_events.SponsorshipQuote['feeLegs'][number];
372
+
373
+ interface ExecutionAttempt {
374
+ id: string;
375
+ executionId: string;
376
+ attemptNumber: number;
377
+ chain: string;
378
+ transport: string;
379
+ status: string;
380
+ transactionHash?: string;
381
+ errorCode?: string;
382
+ errorMessage?: string;
383
+ startedAt: string;
384
+ submittedAt?: string;
385
+ completedAt?: string;
386
+ }
387
+ interface ExecutionRecord {
388
+ id: string;
389
+ tenantId: string;
390
+ appId: string;
391
+ environment: Environment;
392
+ status: string;
393
+ actionHash: string;
394
+ sourceNetwork: string;
395
+ destinationNetwork: string;
396
+ targetChain: number;
397
+ attempts?: ExecutionAttempt[];
398
+ receipts?: unknown[];
399
+ nonceLeases?: unknown[];
400
+ }
401
+ interface ReconciliationIssue {
402
+ id: string;
403
+ executionId: string;
404
+ reason: string;
405
+ status: 'open' | 'resolved';
406
+ details?: Record<string, unknown>;
407
+ createdAt: number;
408
+ updatedAt: number;
409
+ resolvedAt?: number;
410
+ }
411
+ interface GatewayTarget {
412
+ network: string;
413
+ facilitatorUrl: string;
414
+ payTo: string;
415
+ asset: string;
416
+ defaultPrice: AtomicAmount;
417
+ }
418
+ interface GatewayConfigData {
419
+ schemaVersion: 'veridex.gateway-config/v1';
420
+ appId: string;
421
+ environment: Environment;
422
+ name: string;
423
+ state: 'draft' | 'active' | 'paused' | 'disabled';
424
+ targets: GatewayTarget[];
425
+ schemes: Array<'exact' | 'upto' | 'batch-settlement'>;
426
+ upstreamUrl: string;
427
+ publicBaseUrl: string;
428
+ allowedMethods: Array<'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'>;
429
+ updatedBy: string;
430
+ }
431
+ interface GatewayConfigResource {
432
+ id: string;
433
+ name: string;
434
+ version: number;
435
+ data: GatewayConfigData;
436
+ }
437
+ interface PlatformClientConfig {
438
+ executionBaseUrl: string;
439
+ controlPlaneBaseUrl?: string;
440
+ apiKey: string;
441
+ tenantId: string;
442
+ appId: string;
443
+ environment: Environment;
444
+ controlPlaneToken?: string;
445
+ timeoutMs?: number;
446
+ }
447
+
448
+ declare class PlatformClient {
449
+ readonly tenantId: string;
450
+ readonly appId: string;
451
+ readonly environment: 'test' | 'live';
452
+ private readonly executionBaseUrl;
453
+ private readonly controlPlaneBaseUrl?;
454
+ private readonly apiKey;
455
+ private readonly controlPlaneToken?;
456
+ private readonly timeoutMs;
457
+ constructor(config: PlatformClientConfig);
458
+ quote(action: SubmitSignedActionRequest, idempotencyKey: string): Promise<{
459
+ quote: SponsorshipQuote;
460
+ simulation: Record<string, string | number>;
461
+ }>;
462
+ reserve(quote: SponsorshipQuote, executionId: string, idempotencyKey: string, chargeAuthorization?: ChargeAuthorization): Promise<{
463
+ executionId: string;
464
+ reservations: unknown[];
465
+ }>;
466
+ submitSponsored(action: SubmitSignedActionRequest, executionId: string): Promise<{
467
+ success: boolean;
468
+ transactionHash?: string;
469
+ sequence?: string;
470
+ actualSponsoredCost?: string;
471
+ }>;
472
+ getExecution(executionId: string): Promise<{
473
+ execution: ExecutionRecord;
474
+ }>;
475
+ listExecutionAttempts(executionId: string): Promise<{
476
+ attempts: ExecutionAttempt[];
477
+ }>;
478
+ cancelExecution(executionId: string, reason?: string): Promise<{
479
+ execution: ExecutionRecord;
480
+ }>;
481
+ listExecutions(limit?: number): Promise<{
482
+ executions: unknown[];
483
+ }>;
484
+ listReconciliationIssues(): Promise<{
485
+ issues: ReconciliationIssue[];
486
+ }>;
487
+ listChainCapabilities(): Promise<{
488
+ capabilities: unknown[];
489
+ }>;
490
+ getSponsorshipPolicy(): Promise<Record<string, unknown>>;
491
+ putSponsorshipPolicy(policy: Record<string, unknown>): Promise<Record<string, unknown>>;
492
+ listGateways(): Promise<GatewayConfigResource[]>;
493
+ createGateway(config: Omit<GatewayConfigData, 'appId' | 'environment' | 'updatedBy'>): Promise<GatewayConfigResource>;
494
+ updateGateway(gatewayId: string, config: Omit<GatewayConfigData, 'appId' | 'environment' | 'updatedBy'>): Promise<GatewayConfigResource>;
495
+ listFinancialSummary(): Promise<Record<string, unknown>>;
496
+ fund(amount: string, asset: string, idempotencyKey: string): Promise<Record<string, unknown>>;
497
+ refund(transactionId: string, reason: string, idempotencyKey: string): Promise<Record<string, unknown>>;
498
+ listPayments(): Promise<{
499
+ payments: unknown[];
500
+ }>;
501
+ listCharges(): Promise<{
502
+ charges: unknown[];
503
+ }>;
504
+ listInvoices(): Promise<{
505
+ invoices: unknown[];
506
+ }>;
507
+ listBazaarResources(query?: string): Promise<{
508
+ resources: unknown[];
509
+ }>;
510
+ publishResource(resourceId: string): Promise<Record<string, unknown>>;
511
+ createChargeAuthorization(authorization: ChargeAuthorization): Promise<Record<string, unknown>>;
512
+ private assertQuoteScope;
513
+ private execution;
514
+ private controlPlane;
515
+ }
516
+
517
+ export { type CredentialMetadataRecord as C, type ExecutionAttempt as E, type GatewayConfigData as G, PlatformClient as P, RelayerClient as R, type SponsorshipFeeLeg as S, type RegisteredAppSummary as a, type RegisteredAppDetail as b, type RegisteredAppStatus as c, type RegisteredAppTrustLevel as d, type RelayerAppSession as e, type ExecutionRecord as f, type GatewayConfigResource as g, type PlatformClientConfig as h, type ReconciliationIssue as i, createRelayerClient as j, type RelayStatus as k, type RelayRequest as l, type RelayRoute as m, type RelayerInfo as n, type RelayFeeQuote as o, type RelayerClientConfig as p, type SubmitSignedActionRequest as q, type SubmitActionResult as r, type SubmitQueryRequest as s, type SubmitQueryResult as t, type GatewayTarget as u };