@defuse-protocol/intents-sdk 0.14.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.
@@ -0,0 +1,488 @@
1
+ import { ILogger, solverRelay, RetryOptions, NearIntentsEnv, BaseError } from '@defuse-protocol/internal-utils';
2
+ export { AssertionError, AssertionErrorType, BaseError, BaseErrorType, HttpRequestError, HttpRequestErrorType, ILogger, IntentSettlementError, IntentSettlementErrorType, NearIntentsEnv, PoaWithdrawalInvariantError, PoaWithdrawalInvariantErrorType, PoaWithdrawalNotFoundError, PoaWithdrawalNotFoundErrorType, PoaWithdrawalPendingError, PoaWithdrawalPendingErrorType, QuoteError, QuoteErrorType, RelayPublishError, RelayPublishErrorType, RetryOptions, RpcRequestError, RpcRequestErrorType, TimeoutError, TimeoutErrorType } from '@defuse-protocol/internal-utils';
3
+ import { Intent, MultiPayload } from '@defuse-protocol/contract-types';
4
+ export { MultiPayload } from '@defuse-protocol/contract-types';
5
+ import * as near_api_js from 'near-api-js';
6
+ import { BorshSchema } from 'borsher';
7
+ import { Account } from 'viem';
8
+
9
+ type HotBridgeChain = (typeof HotBridgeChains)[number];
10
+ type HotBridgeEVMChain = Extract<HotBridgeChain, `eip155:${string}`>;
11
+ declare const HotBridgeChains: ("eip155:56" | "eip155:137" | "tvm:-239" | "eip155:10" | "eip155:43114" | "stellar:pubnet")[];
12
+
13
+ declare const BridgeNameEnum: {
14
+ readonly Hot: "hot";
15
+ readonly Poa: "poa";
16
+ readonly None: null;
17
+ };
18
+ type BridgeNameEnum = typeof BridgeNameEnum;
19
+ type BridgeNameEnumValues = (typeof BridgeNameEnum)[keyof typeof BridgeNameEnum];
20
+
21
+ declare const RouteEnum: {
22
+ readonly HotBridge: "hot_bridge";
23
+ readonly PoaBridge: "poa_bridge";
24
+ readonly NearWithdrawal: "near_withdrawal";
25
+ readonly VirtualChain: "virtual_chain";
26
+ readonly InternalTransfer: "internal_transfer";
27
+ };
28
+ type RouteEnum = typeof RouteEnum;
29
+ type RouteEnumValues = (typeof RouteEnum)[keyof typeof RouteEnum];
30
+
31
+ type IntentPrimitive = Intent;
32
+ interface IntentPayload {
33
+ verifying_contract: string;
34
+ deadline: string;
35
+ nonce: string;
36
+ intents: IntentPrimitive[];
37
+ signer_id: string | undefined;
38
+ }
39
+ type IntentPayloadFactory = (intentParams: IntentPayload) => Promise<Partial<IntentPayload>> | Partial<IntentPayload>;
40
+
41
+ type IntentHash = string;
42
+ interface RelayParamsDefault {
43
+ multiPayload: MultiPayload;
44
+ quoteHashes?: string[];
45
+ }
46
+ type IntentRelayParamsFactory<RelayParams = Omit<RelayParamsDefault, "multiPayload">> = () => RelayParams | Promise<RelayParams>;
47
+
48
+ interface IIntentSigner {
49
+ signIntent(intent: IntentPayload): Promise<MultiPayload>;
50
+ }
51
+
52
+ /**
53
+ * Hook function called before publishing an intent.
54
+ * Can be used for persistence, logging, analytics, etc.
55
+ *
56
+ * @param intentData - The intent data about to be published
57
+ * @returns A promise that resolves when the hook is complete
58
+ */
59
+ type OnBeforePublishIntentHook<RelayParams = Omit<RelayParamsDefault, "multiPayload">> = (intentData: {
60
+ intentHash: IntentHash;
61
+ intentPayload: IntentPayload;
62
+ multiPayload: MultiPayload;
63
+ relayParams: RelayParams;
64
+ }) => Promise<void> | void;
65
+
66
+ /**
67
+ * CAIP2 identifiers
68
+ */
69
+ declare const Chains: {
70
+ readonly Bitcoin: "bip122:000000000019d6689c085ae165831e93";
71
+ readonly Ethereum: "eip155:1";
72
+ readonly Base: "eip155:8453";
73
+ readonly Arbitrum: "eip155:42161";
74
+ readonly BNB: "eip155:56";
75
+ readonly Polygon: "eip155:137";
76
+ readonly Near: "near:mainnet";
77
+ readonly Solana: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
78
+ readonly Tron: "tron:27Lqcw";
79
+ readonly Gnosis: "eip155:100";
80
+ readonly XRPL: "xrpl:0";
81
+ readonly Dogecoin: "bip122:1a91e3dace36e2be3bf030a65679fe82";
82
+ readonly Zcash: "zcash:0";
83
+ readonly Berachain: "eip155:80085";
84
+ readonly TON: "tvm:-239";
85
+ readonly Optimism: "eip155:10";
86
+ readonly Avalanche: "eip155:43114";
87
+ readonly Sui: "sui:mainnet";
88
+ readonly Aptos: "aptos:mainnet";
89
+ readonly Stellar: "stellar:pubnet";
90
+ readonly Cardano: "cip34:1-764824073";
91
+ };
92
+ type Chain = (typeof Chains)[keyof typeof Chains];
93
+
94
+ interface IntentPublishResult {
95
+ intentHash: IntentHash;
96
+ }
97
+ interface WithdrawalResult {
98
+ feeEstimation: FeeEstimation;
99
+ intentHash: IntentHash;
100
+ intentTx: NearTxInfo;
101
+ destinationTx: TxInfo | TxNoInfo;
102
+ }
103
+ interface BatchWithdrawalResult {
104
+ feeEstimation: FeeEstimation[];
105
+ intentHash: IntentHash;
106
+ intentTx: NearTxInfo;
107
+ destinationTx: (TxInfo | TxNoInfo)[];
108
+ }
109
+ type IntentSettlementStatus = solverRelay.GetStatusReturnType;
110
+ interface SignAndSendArgs {
111
+ intents: IntentPrimitive[];
112
+ payload?: IntentPayloadFactory;
113
+ relayParams?: IntentRelayParamsFactory;
114
+ signer?: IIntentSigner;
115
+ onBeforePublishIntent?: OnBeforePublishIntentHook;
116
+ logger?: ILogger;
117
+ }
118
+ type SignAndSendWithdrawalArgs<T extends WithdrawalParams | WithdrawalParams[]> = {
119
+ withdrawalParams: T;
120
+ feeEstimation: T extends WithdrawalParams[] ? FeeEstimation[] : FeeEstimation;
121
+ referral?: string;
122
+ intent?: Omit<SignAndSendArgs, "logger" | "intents">;
123
+ logger?: ILogger;
124
+ };
125
+ type ProcessWithdrawalArgs<T extends WithdrawalParams | WithdrawalParams[]> = {
126
+ withdrawalParams: T;
127
+ feeEstimation?: T extends WithdrawalParams[] ? FeeEstimation[] : FeeEstimation;
128
+ intent?: {
129
+ payload?: IntentPayloadFactory;
130
+ relayParams?: IntentRelayParamsFactory;
131
+ signer?: IIntentSigner;
132
+ onBeforePublishIntent?: OnBeforePublishIntentHook;
133
+ };
134
+ referral?: string;
135
+ logger?: ILogger;
136
+ };
137
+ interface IIntentsSDK {
138
+ setIntentSigner(signer: IIntentSigner): void;
139
+ signAndSendIntent(args: SignAndSendArgs): Promise<IntentPublishResult>;
140
+ waitForIntentSettlement(args: {
141
+ intentHash: IntentHash;
142
+ logger?: ILogger;
143
+ }): Promise<NearTxInfo>;
144
+ getIntentStatus(args: {
145
+ intentHash: IntentHash;
146
+ logger?: ILogger;
147
+ }): Promise<IntentSettlementStatus>;
148
+ estimateWithdrawalFee(args: {
149
+ withdrawalParams: WithdrawalParams;
150
+ quoteOptions?: {
151
+ waitMs: number;
152
+ };
153
+ logger?: ILogger;
154
+ }): Promise<FeeEstimation>;
155
+ estimateWithdrawalFee(args: {
156
+ withdrawalParams: WithdrawalParams[];
157
+ quoteOptions?: {
158
+ waitMs: number;
159
+ };
160
+ logger?: ILogger;
161
+ }): Promise<FeeEstimation[]>;
162
+ signAndSendWithdrawalIntent(args: SignAndSendWithdrawalArgs<WithdrawalParams> | SignAndSendWithdrawalArgs<WithdrawalParams[]>): Promise<IntentPublishResult>;
163
+ waitForWithdrawalCompletion(args: {
164
+ withdrawalParams: WithdrawalParams;
165
+ intentTx: NearTxInfo;
166
+ signal?: AbortSignal;
167
+ retryOptions?: RetryOptions;
168
+ logger?: ILogger;
169
+ }): Promise<TxInfo | TxNoInfo>;
170
+ waitForWithdrawalCompletion(args: {
171
+ withdrawalParams: WithdrawalParams[];
172
+ intentTx: NearTxInfo;
173
+ signal?: AbortSignal;
174
+ retryOptions?: RetryOptions;
175
+ logger?: ILogger;
176
+ }): Promise<Array<TxInfo | TxNoInfo>>;
177
+ createWithdrawalIntents(args: {
178
+ withdrawalParams: WithdrawalParams;
179
+ feeEstimation: FeeEstimation;
180
+ referral?: string;
181
+ logger?: ILogger;
182
+ }): Promise<IntentPrimitive[]>;
183
+ parseAssetId(assetId: string): ParsedAssetInfo;
184
+ processWithdrawal(args: ProcessWithdrawalArgs<WithdrawalParams>): Promise<WithdrawalResult>;
185
+ processWithdrawal(args: ProcessWithdrawalArgs<WithdrawalParams[]>): Promise<BatchWithdrawalResult>;
186
+ }
187
+ interface NearTxInfo {
188
+ hash: string;
189
+ accountId: string;
190
+ }
191
+ interface TxInfo {
192
+ hash: string;
193
+ }
194
+ interface TxNoInfo {
195
+ hash: null;
196
+ }
197
+ interface WithdrawalParams {
198
+ assetId: string;
199
+ amount: bigint;
200
+ destinationAddress: string;
201
+ /**
202
+ * XRP Leger chain specific. MEMO IS NOT SUPPORTED FOR STELLAR AND TON.
203
+ */
204
+ destinationMemo?: string | undefined;
205
+ feeInclusive: boolean;
206
+ routeConfig?: RouteConfig | undefined;
207
+ }
208
+ type NearWithdrawalRouteConfig = {
209
+ route: RouteEnum["NearWithdrawal"];
210
+ msg?: string;
211
+ };
212
+ type InternalTransferRouteConfig = {
213
+ route: RouteEnum["InternalTransfer"];
214
+ };
215
+ type VirtualChainRouteConfig = {
216
+ route: RouteEnum["VirtualChain"];
217
+ auroraEngineContractId: string;
218
+ proxyTokenContractId: string | null;
219
+ };
220
+ type PoaBridgeRouteConfig = {
221
+ route: RouteEnum["PoaBridge"];
222
+ chain: Chain;
223
+ };
224
+ type HotBridgeRouteConfig = {
225
+ route: RouteEnum["HotBridge"];
226
+ chain: Chain;
227
+ };
228
+ type RouteConfig = NearWithdrawalRouteConfig | InternalTransferRouteConfig | VirtualChainRouteConfig | PoaBridgeRouteConfig | HotBridgeRouteConfig;
229
+ interface FeeEstimation {
230
+ amount: bigint;
231
+ quote: null | solverRelay.Quote;
232
+ }
233
+ interface Bridge {
234
+ is(routeConfig: RouteConfig): boolean;
235
+ supports(params: Pick<WithdrawalParams, "assetId" | "routeConfig">): boolean;
236
+ parseAssetId(assetId: string): ParsedAssetInfo | null;
237
+ /**
238
+ * Validates withdrawal constraints for the bridge.
239
+ * Each bridge implementation may have different withdrawal requirements.
240
+ * Some bridges (like Aurora Engine, Intents) have no restrictions and will always pass.
241
+ * Others (like POA) check minimum amounts, and HOT Bridge checks trustlines for Stellar.
242
+ * @throws {MinWithdrawalAmountError} If the amount is below the minimum required
243
+ * @throws {TrustlineNotFoundError} If destination address lacks required trustline
244
+ */
245
+ validateWithdrawal(args: {
246
+ assetId: string;
247
+ amount: bigint;
248
+ destinationAddress: string;
249
+ logger?: ILogger;
250
+ }): Promise<void>;
251
+ estimateWithdrawalFee<T extends Pick<WithdrawalParams, "assetId" | "destinationAddress" | "routeConfig">>(args: {
252
+ withdrawalParams: T;
253
+ quoteOptions?: {
254
+ waitMs: number;
255
+ };
256
+ logger?: ILogger;
257
+ }): Promise<FeeEstimation>;
258
+ createWithdrawalIntents(args: {
259
+ withdrawalParams: WithdrawalParams;
260
+ feeEstimation: FeeEstimation;
261
+ referral?: string;
262
+ }): Promise<IntentPrimitive[]>;
263
+ waitForWithdrawalCompletion(args: {
264
+ tx: NearTxInfo;
265
+ index: number;
266
+ routeConfig: RouteConfig;
267
+ signal?: AbortSignal;
268
+ retryOptions?: RetryOptions;
269
+ logger?: ILogger;
270
+ }): Promise<TxInfo | TxNoInfo>;
271
+ }
272
+ interface WithdrawalIdentifier {
273
+ routeConfig: RouteConfig;
274
+ index: number;
275
+ tx: NearTxInfo;
276
+ }
277
+ type ParsedAssetInfo = ({
278
+ blockchain: Chain;
279
+ bridgeName: BridgeNameEnumValues;
280
+ standard: "nep141";
281
+ contractId: string;
282
+ } | {
283
+ blockchain: Chain;
284
+ bridgeName: BridgeNameEnumValues;
285
+ standard: "nep245";
286
+ contractId: string;
287
+ tokenId: string;
288
+ }) & ({
289
+ native: true;
290
+ } | {
291
+ address: string;
292
+ });
293
+ type RPCEndpointMap = Record<typeof Chains.Near | HotBridgeEVMChain, string[]> & {
294
+ [K in typeof Chains.Stellar]: {
295
+ soroban: string[];
296
+ horizon: string[];
297
+ };
298
+ };
299
+ type DeepPartial<T> = T extends object ? T extends Array<infer U> ? Array<DeepPartial<U>> : T extends Function ? T : {
300
+ [P in keyof T]?: DeepPartial<T[P]>;
301
+ } : T;
302
+ type PartialRPCEndpointMap = DeepPartial<RPCEndpointMap>;
303
+
304
+ interface IIntentRelayer<Ticket, RelayParams = RelayParamsDefault> {
305
+ publishIntent(params: RelayParams, ctx?: {
306
+ logger?: ILogger;
307
+ }): Promise<Ticket>;
308
+ waitForSettlement(ticket: Ticket, ctx?: {
309
+ logger?: ILogger;
310
+ }): Promise<{
311
+ tx: NearTxInfo;
312
+ }>;
313
+ }
314
+
315
+ interface IntentsSDKConfig {
316
+ env?: NearIntentsEnv;
317
+ intentSigner?: IIntentSigner;
318
+ rpc?: PartialRPCEndpointMap;
319
+ referral: string;
320
+ }
321
+ declare class IntentsSDK implements IIntentsSDK {
322
+ protected env: NearIntentsEnv;
323
+ protected referral: string;
324
+ protected intentRelayer: IIntentRelayer<IntentHash>;
325
+ protected intentSigner?: IIntentSigner;
326
+ protected bridges: Bridge[];
327
+ constructor(args: IntentsSDKConfig);
328
+ setIntentSigner(signer: IIntentSigner): void;
329
+ createWithdrawalIntents(args: {
330
+ withdrawalParams: WithdrawalParams;
331
+ feeEstimation: FeeEstimation;
332
+ referral?: string;
333
+ logger?: ILogger;
334
+ }): Promise<IntentPrimitive[]>;
335
+ estimateWithdrawalFee(args: {
336
+ withdrawalParams: WithdrawalParams;
337
+ quoteOptions?: {
338
+ waitMs: number;
339
+ };
340
+ logger?: ILogger;
341
+ }): Promise<FeeEstimation>;
342
+ estimateWithdrawalFee(args: {
343
+ withdrawalParams: WithdrawalParams[];
344
+ quoteOptions?: {
345
+ waitMs: number;
346
+ };
347
+ logger?: ILogger;
348
+ }): Promise<FeeEstimation[]>;
349
+ protected _estimateWithdrawalFee(args: {
350
+ withdrawalParams: WithdrawalParams;
351
+ quoteOptions?: {
352
+ waitMs: number;
353
+ };
354
+ logger?: ILogger;
355
+ }): Promise<FeeEstimation>;
356
+ protected getWithdrawalsIdentifiers({ withdrawalParams, intentTx, }: {
357
+ withdrawalParams: WithdrawalParams[];
358
+ intentTx: NearTxInfo;
359
+ }): WithdrawalIdentifier[];
360
+ waitForWithdrawalCompletion(args: {
361
+ withdrawalParams: WithdrawalParams;
362
+ intentTx: NearTxInfo;
363
+ signal?: AbortSignal;
364
+ retryOptions?: RetryOptions;
365
+ logger?: ILogger;
366
+ }): Promise<TxInfo | TxNoInfo>;
367
+ waitForWithdrawalCompletion(args: {
368
+ withdrawalParams: WithdrawalParams[];
369
+ intentTx: NearTxInfo;
370
+ signal?: AbortSignal;
371
+ retryOptions?: RetryOptions;
372
+ logger?: ILogger;
373
+ }): Promise<Array<TxInfo | TxNoInfo>>;
374
+ parseAssetId(assetId: string): ParsedAssetInfo;
375
+ signAndSendIntent(args: SignAndSendArgs): Promise<IntentPublishResult>;
376
+ signAndSendWithdrawalIntent(args: SignAndSendWithdrawalArgs<WithdrawalParams> | SignAndSendWithdrawalArgs<WithdrawalParams[]>): Promise<IntentPublishResult>;
377
+ waitForIntentSettlement(args: {
378
+ intentHash: IntentHash;
379
+ logger?: ILogger;
380
+ }): Promise<NearTxInfo>;
381
+ getIntentStatus({ intentHash, logger, }: {
382
+ intentHash: IntentHash;
383
+ logger?: ILogger;
384
+ }): Promise<IntentSettlementStatus>;
385
+ processWithdrawal(args: ProcessWithdrawalArgs<WithdrawalParams>): Promise<WithdrawalResult>;
386
+ processWithdrawal(args: ProcessWithdrawalArgs<WithdrawalParams[]>): Promise<BatchWithdrawalResult>;
387
+ }
388
+
389
+ declare const nep413PayloadSchema: BorshSchema<{
390
+ message: string;
391
+ nonce: number[];
392
+ recipient: string;
393
+ callback_url: string | null;
394
+ }>;
395
+ type NEP413Payload = typeof nep413PayloadSchema extends BorshSchema<infer T> ? Omit<T, "callback_url"> & {
396
+ callback_url?: string | null | undefined;
397
+ } : never;
398
+
399
+ type MaybePromise<T> = T | Promise<T>;
400
+ type SignMessageNEP413 = (nep413Payload: NEP413Payload, nep413Hash: Uint8Array) => MaybePromise<{
401
+ publicKey: string;
402
+ signature: string;
403
+ }>;
404
+ interface IntentSignerNEP413Config {
405
+ signMessage: SignMessageNEP413;
406
+ accountId: string;
407
+ }
408
+
409
+ interface IntentSignerNearKeypairConfig {
410
+ keypair: near_api_js.KeyPair;
411
+ accountId: string;
412
+ }
413
+
414
+ type IntentSignerViemConfig = Pick<Account, "address" | "signMessage">;
415
+
416
+ declare function createIntentSignerNEP413(config: IntentSignerNEP413Config): IIntentSigner;
417
+ declare function createIntentSignerNearKeyPair(config: IntentSignerNearKeypairConfig): IIntentSigner;
418
+ declare function createIntentSignerViem(config: IntentSignerViemConfig): IIntentSigner;
419
+
420
+ declare function createInternalTransferRoute(): InternalTransferRouteConfig;
421
+ declare function createNearWithdrawalRoute(msg?: string): NearWithdrawalRouteConfig;
422
+ declare function createVirtualChainRoute(auroraEngineContractId: string, proxyTokenContractId: string | null): VirtualChainRouteConfig;
423
+ declare function createPoaBridgeRoute(chain: Chain): PoaBridgeRouteConfig;
424
+ declare function createHotBridgeRoute(chain: Chain): HotBridgeRouteConfig;
425
+ declare function createDefaultRoute(): undefined;
426
+
427
+ type FeeExceedsAmountErrorType = FeeExceedsAmountError & {
428
+ name: "FeeExceedsAmountError";
429
+ };
430
+ declare class FeeExceedsAmountError extends BaseError {
431
+ feeEstimation: FeeEstimation;
432
+ amount: bigint;
433
+ constructor(feeEstimation: FeeEstimation, amount: bigint);
434
+ }
435
+ type MinWithdrawalAmountErrorType = MinWithdrawalAmountError & {
436
+ name: "MinWithdrawalAmountError";
437
+ };
438
+ declare class MinWithdrawalAmountError extends BaseError {
439
+ minAmount: bigint;
440
+ requestedAmount: bigint;
441
+ assetId: string;
442
+ constructor(minAmount: bigint, requestedAmount: bigint, assetId: string);
443
+ }
444
+ type UnsupportedDestinationMemoErrorType = UnsupportedDestinationMemoError & {
445
+ name: "UnsupportedDestinationMemoError";
446
+ };
447
+ declare class UnsupportedDestinationMemoError extends BaseError {
448
+ blockchain: string;
449
+ assetId: string;
450
+ constructor(blockchain: string, assetId: string);
451
+ }
452
+ type TrustlineNotFoundErrorType = TrustlineNotFoundError & {
453
+ name: "TrustlineNotFoundError";
454
+ };
455
+ declare class TrustlineNotFoundError extends BaseError {
456
+ destinationAddress: string;
457
+ assetId: string;
458
+ blockchain: string;
459
+ tokenAddress: string;
460
+ constructor(destinationAddress: string, assetId: string, blockchain: string, tokenAddress: string);
461
+ }
462
+
463
+ type HotWithdrawalPendingErrorType = HotWithdrawalPendingError & {
464
+ name: "HotWithdrawalPendingError";
465
+ };
466
+ declare class HotWithdrawalPendingError extends BaseError {
467
+ txHash: string;
468
+ index: number;
469
+ constructor(txHash: string, index: number);
470
+ }
471
+ type HotWithdrawalNotFoundErrorType = HotWithdrawalNotFoundError & {
472
+ name: "HotWithdrawalNotFoundError";
473
+ };
474
+ declare class HotWithdrawalNotFoundError extends BaseError {
475
+ txHash: string;
476
+ index: number;
477
+ constructor(txHash: string, index: number);
478
+ }
479
+ type HotWithdrawalCancelledErrorType = HotWithdrawalCancelledError & {
480
+ name: "HotWithdrawalCancelledError";
481
+ };
482
+ declare class HotWithdrawalCancelledError extends BaseError {
483
+ txHash: string;
484
+ index: number;
485
+ constructor(txHash: string, index: number);
486
+ }
487
+
488
+ export { type BatchWithdrawalResult, BridgeNameEnum, type BridgeNameEnumValues, type Chain, Chains, type FeeEstimation, FeeExceedsAmountError, type FeeExceedsAmountErrorType, type HotBridgeRouteConfig, HotWithdrawalCancelledError, type HotWithdrawalCancelledErrorType, HotWithdrawalNotFoundError, type HotWithdrawalNotFoundErrorType, HotWithdrawalPendingError, type HotWithdrawalPendingErrorType, type IIntentSigner, type IntentPayload, type IntentPayloadFactory, type IntentPrimitive, type IntentPublishResult, type IntentRelayParamsFactory, type IntentSettlementStatus, IntentsSDK, type IntentsSDKConfig, type InternalTransferRouteConfig, MinWithdrawalAmountError, type MinWithdrawalAmountErrorType, type NearTxInfo, type NearWithdrawalRouteConfig, type OnBeforePublishIntentHook, type ParsedAssetInfo, type PoaBridgeRouteConfig, type ProcessWithdrawalArgs, type RouteConfig, RouteEnum, type RouteEnumValues, type SignAndSendWithdrawalArgs, TrustlineNotFoundError, type TrustlineNotFoundErrorType, type TxInfo, type TxNoInfo, UnsupportedDestinationMemoError, type UnsupportedDestinationMemoErrorType, type VirtualChainRouteConfig, type WithdrawalIdentifier, type WithdrawalParams, type WithdrawalResult, createDefaultRoute, createHotBridgeRoute, createIntentSignerNEP413, createIntentSignerNearKeyPair, createIntentSignerViem, createInternalTransferRoute, createNearWithdrawalRoute, createPoaBridgeRoute, createVirtualChainRoute };