@stableflow/core 3.0.0-beta-02a59f37a0-20260515

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,749 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import Big from 'big.js';
3
+
4
+ type ApiRequestOptions = {
5
+ readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
6
+ readonly url: string;
7
+ readonly path?: Record<string, any>;
8
+ readonly cookies?: Record<string, any>;
9
+ readonly headers?: Record<string, any>;
10
+ readonly query?: Record<string, any>;
11
+ readonly formData?: Record<string, any>;
12
+ readonly body?: any;
13
+ readonly mediaType?: string;
14
+ readonly responseHeader?: string;
15
+ readonly errors?: Record<number, string>;
16
+ };
17
+
18
+ type ApiResult = {
19
+ readonly url: string;
20
+ readonly ok: boolean;
21
+ readonly status: number;
22
+ readonly statusText: string;
23
+ readonly body: any;
24
+ };
25
+
26
+ declare class ApiError extends Error {
27
+ readonly url: string;
28
+ readonly status: number;
29
+ readonly statusText: string;
30
+ readonly body: any;
31
+ readonly request: ApiRequestOptions;
32
+ constructor(request: ApiRequestOptions, response: ApiResult, message: string);
33
+ }
34
+
35
+ declare class CancelError extends Error {
36
+ constructor(message: string);
37
+ get isCancelled(): boolean;
38
+ }
39
+ interface OnCancel {
40
+ readonly isResolved: boolean;
41
+ readonly isRejected: boolean;
42
+ readonly isCancelled: boolean;
43
+ (cancelHandler: () => void): void;
44
+ }
45
+ declare class CancelablePromise<T> implements Promise<T> {
46
+ #private;
47
+ constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
48
+ get [Symbol.toStringTag](): string;
49
+ then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
50
+ catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
51
+ finally(onFinally?: (() => void) | null): Promise<T>;
52
+ cancel(): void;
53
+ get isCancelled(): boolean;
54
+ }
55
+
56
+ type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
57
+ type Headers = Record<string, string>;
58
+ type OpenAPIConfig = {
59
+ BASE: string;
60
+ VERSION: string;
61
+ WITH_CREDENTIALS: boolean;
62
+ CREDENTIALS: 'include' | 'omit' | 'same-origin';
63
+ TOKEN?: string | Resolver<string> | undefined;
64
+ USERNAME?: string | Resolver<string> | undefined;
65
+ PASSWORD?: string | Resolver<string> | undefined;
66
+ HEADERS?: Headers | Resolver<Headers> | undefined;
67
+ ENCODE_PATH?: ((path: string) => string) | undefined;
68
+ DEBUG: boolean;
69
+ };
70
+ declare const OpenAPI: OpenAPIConfig;
71
+
72
+ /**
73
+ * Request method
74
+ * @param config The OpenAPI configuration object
75
+ * @param options The request options from the service
76
+ * @param axiosClient The axios client instance to use
77
+ * @returns CancelablePromise<T>
78
+ * @throws ApiError
79
+ */
80
+ declare const request: <T>(config: OpenAPIConfig, options: ApiRequestOptions, axiosClient?: AxiosInstance) => CancelablePromise<T>;
81
+
82
+ declare enum SendType {
83
+ SEND = "SEND",
84
+ TRANSFER = "TRANSFER"
85
+ }
86
+
87
+ /**
88
+ * @deprecated Please use Service instead
89
+ */
90
+ type ServiceType = "oneclick" | "usdt0" | "cctp" | "fraxzero" | "fraxzero-oneclick" | "oneclick-fraxzero" | "usdt0-oneclick" | "oneclick-usdt0" | "native";
91
+ declare const Service: {
92
+ readonly OneClick: "oneclick";
93
+ readonly Usdt0: "usdt0";
94
+ readonly CCTP: "cctp";
95
+ readonly FraxZero: "fraxzero";
96
+ readonly FraxZeroOneClick: "fraxzero-oneclick";
97
+ readonly OneClickFraxZero: "oneclick-fraxzero";
98
+ readonly Usdt0OneClick: "usdt0-oneclick";
99
+ readonly OneClickUsdt0: "oneclick-usdt0";
100
+ readonly Native: "native";
101
+ };
102
+ type Service = (typeof Service)[keyof typeof Service];
103
+ declare const ServiceBackend: Record<Service, string>;
104
+
105
+ type AppFee = {
106
+ /**
107
+ * Account ID within Intents to which this fee will be transferred
108
+ */
109
+ recipient: string;
110
+ /**
111
+ * Fee for this recipient as part of amountIn in basis points (1/100th of a percent), e.g. 100 for 1% fee
112
+ */
113
+ fee: number;
114
+ };
115
+
116
+ type BadRequestResponse = {
117
+ message: string;
118
+ };
119
+
120
+ type Quote = {
121
+ /**
122
+ * The deposit address on the chain of `originAsset` when `depositType` is `ORIGIN_CHAIN`.
123
+ *
124
+ * The deposit address inside NEAR Intents (the verifier smart contract) when `depositType` is `INTENTS`.
125
+ */
126
+ depositAddress?: string;
127
+ /**
128
+ * Some of the deposit addresses **REQUIRE** to also include the `memo` for the deposit to be processed
129
+ */
130
+ depositMemo?: string;
131
+ /**
132
+ * Amount of the origin asset
133
+ */
134
+ amountIn: string;
135
+ /**
136
+ * Amount of the origin asset in readable format
137
+ */
138
+ amountInFormatted: string;
139
+ /**
140
+ * Amount of the origin assets equivalent in USD
141
+ */
142
+ amountInUsd: string;
143
+ /**
144
+ * Minimum amount of the origin asset that will be used for the swap
145
+ */
146
+ minAmountIn: string;
147
+ /**
148
+ * Amount of the destination asset
149
+ */
150
+ amountOut: string;
151
+ /**
152
+ * Amount of the destination asset in readable format
153
+ */
154
+ amountOutFormatted: string;
155
+ /**
156
+ * Amount of the destination asset equivalent in USD
157
+ */
158
+ amountOutUsd: string;
159
+ /**
160
+ * Minimum output amount after slippage is applied
161
+ */
162
+ minAmountOut: string;
163
+ /**
164
+ * Time when the deposit address becomes inactive and funds may be lost
165
+ */
166
+ deadline?: string;
167
+ /**
168
+ * Time when the deposit address becomes cold, causing swap processing to take longer
169
+ */
170
+ timeWhenInactive?: string;
171
+ /**
172
+ * Estimated time in seconds for the swap to be executed after the deposit transaction is confirmed
173
+ */
174
+ timeEstimate: number;
175
+ /**
176
+ * EVM address of a transfer recipient in a virtual chain
177
+ */
178
+ virtualChainRecipient?: string;
179
+ /**
180
+ * EVM address of a refund recipient in a virtual chain
181
+ */
182
+ virtualChainRefundRecipient?: string;
183
+ };
184
+
185
+ type QuoteRequest = {
186
+ /**
187
+ * Flag indicating whether this is a dry run request.
188
+ * If `true`, the response will **NOT** contain the following fields:
189
+ * - `depositAddress`
190
+ * - `timeWhenInactive`
191
+ * - `deadline`
192
+ */
193
+ dry: boolean;
194
+ /**
195
+ * What deposit address mode you will get in the response, most chain supports only `SIMPLE` and some(for example `stellar`) only `MEMO`:
196
+ * - `SIMPLE` - usual deposit with only deposit address.
197
+ * - `MEMO` - some chains will **REQUIRE** the `memo` together with `depositAddress` for swap to work.
198
+ */
199
+ depositMode?: QuoteRequest.depositMode;
200
+ /**
201
+ * How to interpret `amount` when performing the swap:
202
+ * - `EXACT_INPUT` - requests the output amount for an exact input.
203
+ * - `EXACT_OUTPUT` - requests the input amount for an exact output. The `refundTo` address always receives any excess tokens after the swap is complete.
204
+ * - `FLEX_INPUT` - a flexible input amount that allows for partial deposits and variable amounts.
205
+ */
206
+ swapType: QuoteRequest.swapType;
207
+ /**
208
+ * Slippage tolerance for the swap. This value is in basis points (1/100th of a percent), e.g. 100 for 1% slippage.
209
+ */
210
+ slippageTolerance: number;
211
+ /**
212
+ * ID of the origin asset.
213
+ */
214
+ originAsset: string;
215
+ /**
216
+ * Type of deposit address:
217
+ * - `ORIGIN_CHAIN` - deposit address on the origin chain.
218
+ * - `INTENTS` - the account ID within NEAR Intents to which you should transfer assets.
219
+ */
220
+ depositType: QuoteRequest.depositType;
221
+ /**
222
+ * ID of the destination asset.
223
+ */
224
+ destinationAsset: string;
225
+ /**
226
+ * Amount to swap as the base amount. It is interpreted as the input or output amount based on the `swapType` flag and is specified in the smallest unit of the currency (e.g., wei for ETH).
227
+ */
228
+ amount: string;
229
+ /**
230
+ * Address used for refunds.
231
+ */
232
+ refundTo: string;
233
+ /**
234
+ * Type of refund address:
235
+ * - `ORIGIN_CHAIN` - assets are refunded to the `refundTo` address on the origin chain.
236
+ * - `INTENTS` - assets are refunded to the `refundTo` Intents account.
237
+ */
238
+ refundType: QuoteRequest.refundType;
239
+ /**
240
+ * Recipient address. The format must match `recipientType`.
241
+ */
242
+ recipient: string;
243
+ /**
244
+ * EVM address of a transfer recipient in a virtual chain
245
+ */
246
+ virtualChainRecipient?: string;
247
+ /**
248
+ * EVM address of a refund recipient in a virtual chain
249
+ */
250
+ virtualChainRefundRecipient?: string;
251
+ /**
252
+ * Type of recipient address:
253
+ * - `DESTINATION_CHAIN` - assets are transferred to the chain of `destinationAsset`.
254
+ * - `INTENTS` - assets are transferred to an account inside Intents
255
+ */
256
+ recipientType: QuoteRequest.recipientType;
257
+ /**
258
+ * Timestamp in ISO format that identifies when the user refund begins if the swap isn't completed by then. It must exceed the time required for the deposit transaction to be mined. For example, Bitcoin may require around one hour depending on the fees paid.
259
+ */
260
+ deadline: string;
261
+ /**
262
+ * Referral identifier (lowercase only). It will be reflected in the on-chain data and displayed on public analytics platforms.
263
+ */
264
+ referral?: string;
265
+ /**
266
+ * Time in milliseconds the user is willing to wait for a quote from the relay.
267
+ */
268
+ quoteWaitingTimeMs?: number;
269
+ /**
270
+ * List of recipients and their fees
271
+ */
272
+ appFees?: Array<AppFee>;
273
+ };
274
+ declare namespace QuoteRequest {
275
+ /**
276
+ * What deposit address mode you will get in the response, most chain supports only `SIMPLE` and some(for example `stellar`) only `MEMO`:
277
+ * - `SIMPLE` - usual deposit with only deposit address.
278
+ * - `MEMO` - some chains will **REQUIRE** the `memo` together with `depositAddress` for swap to work.
279
+ */
280
+ enum depositMode {
281
+ SIMPLE = "SIMPLE",
282
+ MEMO = "MEMO"
283
+ }
284
+ /**
285
+ * How to interpret `amount` when performing the swap:
286
+ * - `EXACT_INPUT` - requests the output amount for an exact input.
287
+ * - `EXACT_OUTPUT` - requests the input amount for an exact output. The `refundTo` address always receives any excess tokens after the swap is complete.
288
+ * - `FLEX_INPUT` - a flexible input amount that allows for partial deposits and variable amounts.
289
+ */
290
+ enum swapType {
291
+ EXACT_INPUT = "EXACT_INPUT",
292
+ EXACT_OUTPUT = "EXACT_OUTPUT",
293
+ FLEX_INPUT = "FLEX_INPUT"
294
+ }
295
+ /**
296
+ * Type of deposit address:
297
+ * - `ORIGIN_CHAIN` - deposit address on the origin chain.
298
+ * - `INTENTS` - the account ID within NEAR Intents to which you should transfer assets.
299
+ */
300
+ enum depositType {
301
+ ORIGIN_CHAIN = "ORIGIN_CHAIN",
302
+ INTENTS = "INTENTS"
303
+ }
304
+ /**
305
+ * Type of refund address:
306
+ * - `ORIGIN_CHAIN` - assets are refunded to the `refundTo` address on the origin chain.
307
+ * - `INTENTS` - assets are refunded to the `refundTo` Intents account.
308
+ */
309
+ enum refundType {
310
+ ORIGIN_CHAIN = "ORIGIN_CHAIN",
311
+ INTENTS = "INTENTS"
312
+ }
313
+ /**
314
+ * Type of recipient address:
315
+ * - `DESTINATION_CHAIN` - assets are transferred to the chain of `destinationAsset`.
316
+ * - `INTENTS` - assets are transferred to an account inside Intents
317
+ */
318
+ enum recipientType {
319
+ DESTINATION_CHAIN = "DESTINATION_CHAIN",
320
+ INTENTS = "INTENTS"
321
+ }
322
+ }
323
+
324
+ type QuoteResponse = {
325
+ /**
326
+ * Timestamp in ISO format that was used to derive the deposit address
327
+ */
328
+ timestamp: string;
329
+ /**
330
+ * Signature of the StableFlow service confirming the quote for the specific deposit address. Must be saved on the client side (along with the whole quote) in order to resolve any disputes or mistakes.
331
+ */
332
+ signature: string;
333
+ /**
334
+ * User request
335
+ */
336
+ quoteRequest: QuoteRequest;
337
+ /**
338
+ * Response containing the deposit address for sending the `amount` of `originAsset` and the expected output amount.
339
+ */
340
+ quote: Quote;
341
+ };
342
+
343
+ type TransactionDetails = {
344
+ /**
345
+ * Transaction hash
346
+ */
347
+ hash: string;
348
+ /**
349
+ * Explorer URL for the transaction
350
+ */
351
+ explorerUrl: string;
352
+ };
353
+
354
+ type SwapDetails = {
355
+ /**
356
+ * All intent hashes that took part in this swap
357
+ */
358
+ intentHashes: Array<string>;
359
+ /**
360
+ * All NEAR transactions executed for this swap
361
+ */
362
+ nearTxHashes: Array<string>;
363
+ /**
364
+ * Exact amount of `originToken` after the trade was settled
365
+ */
366
+ amountIn?: string;
367
+ /**
368
+ * Exact amount of `originToken` in readable format after the trade was settled
369
+ */
370
+ amountInFormatted?: string;
371
+ /**
372
+ * Exact amount of `originToken` equivalent in USD
373
+ */
374
+ amountInUsd?: string;
375
+ /**
376
+ * Exact amount of `destinationToken` after the trade was settled
377
+ */
378
+ amountOut?: string;
379
+ /**
380
+ * Exact amount of `destinationToken` in readable format after the trade was settled
381
+ */
382
+ amountOutFormatted?: string;
383
+ /**
384
+ * Exact amount of `destinationToken` equivalent in USD
385
+ */
386
+ amountOutUsd?: string;
387
+ /**
388
+ * Actual slippage
389
+ */
390
+ slippage?: number;
391
+ /**
392
+ * Hashes and explorer URLs for all transactions on the origin chain
393
+ */
394
+ originChainTxHashes: Array<TransactionDetails>;
395
+ /**
396
+ * Hashes and explorer URLs for all transactions on the destination chain
397
+ */
398
+ destinationChainTxHashes: Array<TransactionDetails>;
399
+ /**
400
+ * Amount of `originAsset` transferred to `refundTo`
401
+ */
402
+ refundedAmount?: string;
403
+ /**
404
+ * Refunded amount in readable format
405
+ */
406
+ refundedAmountFormatted?: string;
407
+ /**
408
+ * Refunded amount equivalent in USD
409
+ */
410
+ refundedAmountUsd?: string;
411
+ };
412
+
413
+ type GetExecutionStatusResponse = {
414
+ /**
415
+ * Quote response from the original request
416
+ */
417
+ quoteResponse: QuoteResponse;
418
+ status: GetExecutionStatusResponse.status;
419
+ /**
420
+ * Last time the state was updated
421
+ */
422
+ updatedAt: string;
423
+ /**
424
+ * Details of actual swaps and withdrawals
425
+ */
426
+ swapDetails: SwapDetails;
427
+ };
428
+ declare namespace GetExecutionStatusResponse {
429
+ enum status {
430
+ KNOWN_DEPOSIT_TX = "KNOWN_DEPOSIT_TX",
431
+ PENDING_DEPOSIT = "PENDING_DEPOSIT",
432
+ INCOMPLETE_DEPOSIT = "INCOMPLETE_DEPOSIT",
433
+ PROCESSING = "PROCESSING",
434
+ SUCCESS = "SUCCESS",
435
+ REFUNDED = "REFUNDED",
436
+ FAILED = "FAILED"
437
+ }
438
+ }
439
+
440
+ type SubmitDepositTxRequest = {
441
+ /**
442
+ * Transaction hash of your deposit
443
+ */
444
+ txHash: string;
445
+ /**
446
+ * Deposit address for the quote
447
+ */
448
+ depositAddress: string;
449
+ };
450
+
451
+ type SubmitDepositTxResponse = {
452
+ /**
453
+ * Quote response from the original request
454
+ */
455
+ quoteResponse: QuoteResponse;
456
+ status: SubmitDepositTxResponse.status;
457
+ /**
458
+ * Last time the state was updated
459
+ */
460
+ updatedAt: string;
461
+ /**
462
+ * Details of actual swaps and withdrawals
463
+ */
464
+ swapDetails: SwapDetails;
465
+ };
466
+ declare namespace SubmitDepositTxResponse {
467
+ enum status {
468
+ KNOWN_DEPOSIT_TX = "KNOWN_DEPOSIT_TX",
469
+ PENDING_DEPOSIT = "PENDING_DEPOSIT",
470
+ INCOMPLETE_DEPOSIT = "INCOMPLETE_DEPOSIT",
471
+ PROCESSING = "PROCESSING",
472
+ SUCCESS = "SUCCESS",
473
+ REFUNDED = "REFUNDED",
474
+ FAILED = "FAILED"
475
+ }
476
+ }
477
+
478
+ type TokenResponse = {
479
+ /**
480
+ * Unique asset identifier
481
+ */
482
+ assetId: string;
483
+ /**
484
+ * Number of decimals for the token
485
+ */
486
+ decimals: number;
487
+ /**
488
+ * Blockchain associated with the token
489
+ */
490
+ blockchain: TokenResponse.blockchain;
491
+ /**
492
+ * Token symbol (e.g. BTC, ETH)
493
+ */
494
+ symbol: string;
495
+ /**
496
+ * Current price of the token in USD
497
+ */
498
+ price: number;
499
+ /**
500
+ * Date when the token price was last updated
501
+ */
502
+ priceUpdatedAt: string;
503
+ /**
504
+ * Contract address of the token
505
+ */
506
+ contractAddress?: string;
507
+ };
508
+ declare namespace TokenResponse {
509
+ /**
510
+ * Blockchain associated with the token
511
+ */
512
+ enum blockchain {
513
+ NEAR = "near",
514
+ ETH = "eth",
515
+ BASE = "base",
516
+ ARB = "arb",
517
+ BTC = "btc",
518
+ SOL = "sol",
519
+ TON = "ton",
520
+ DOGE = "doge",
521
+ XRP = "xrp",
522
+ ZEC = "zec",
523
+ GNOSIS = "gnosis",
524
+ BERA = "bera",
525
+ BSC = "bsc",
526
+ POL = "pol",
527
+ TRON = "tron",
528
+ SUI = "sui",
529
+ OP = "op",
530
+ AVAX = "avax",
531
+ CARDANO = "cardano"
532
+ }
533
+ }
534
+
535
+ interface ChainConfig {
536
+ chainName: string;
537
+ chainId?: number;
538
+ /**
539
+ * SDA.getTokens() blockchain
540
+ */
541
+ blockchain: string;
542
+ chainIcon: string;
543
+ chainIconGray: string;
544
+ chainType: string;
545
+ blockExplorerUrl: string;
546
+ blockExplorerUrls: string[];
547
+ primaryColor: string;
548
+ nativeToken: {
549
+ symbol: string;
550
+ decimals: number;
551
+ };
552
+ rpcUrls: string[];
553
+ rpcUrl: string;
554
+ }
555
+
556
+ interface TokenConfig extends ChainConfig {
557
+ name: string;
558
+ symbol: string;
559
+ decimals: number;
560
+ icon: string;
561
+ assetId: string;
562
+ contractAddress: string;
563
+ services: Service[];
564
+ }
565
+
566
+ interface WalletConfig {
567
+ transfer(params: {
568
+ originAsset: string;
569
+ depositAddress: string;
570
+ amount: string;
571
+ }): Promise<string>;
572
+ getBalance(token: TokenConfig, account: string): Promise<string>;
573
+ balanceOf(token: TokenConfig, account: string): Promise<string>;
574
+ allowance?(params: {
575
+ contractAddress: string;
576
+ spender: string;
577
+ address: string;
578
+ amountWei: string | number | BigInt;
579
+ }): Promise<{
580
+ allowance: string;
581
+ needApprove: boolean;
582
+ }>;
583
+ approve?(params: {
584
+ contractAddress: string;
585
+ spender: string;
586
+ amountWei: string | number | BigInt;
587
+ isApproveMax?: boolean;
588
+ }): Promise<boolean>;
589
+ quote(type: Service, params: {}): Promise<{
590
+ needApprove?: boolean;
591
+ approveSpender?: string;
592
+ sendParam?: any;
593
+ quoteParam: any;
594
+ fees?: Record<string, string>;
595
+ totalFeesUsd?: string;
596
+ estimateSourceGas?: BigInt;
597
+ estimateSourceGasUsd?: string;
598
+ estimateTime?: number;
599
+ outputAmount?: string;
600
+ }>;
601
+ send(type: SendType, params: any): Promise<string>;
602
+ }
603
+
604
+ declare enum TransactionStatus {
605
+ Pending = "pending",
606
+ Success = "success",
607
+ Failed = "failed"
608
+ }
609
+
610
+ /**
611
+ * StableFlow AI Service — HTTP API helpers.
612
+ *
613
+ * For full cross-chain bridge flows (multi-route quote, send, per-bridge status),
614
+ * install and use `@stableflow/bridges` (`BridgeSFA`).
615
+ */
616
+ declare class SFA {
617
+ /**
618
+ * Get supported tokens
619
+ * Retrieves a list of tokens currently supported by the StableFlow AI API for asset swaps.
620
+ */
621
+ static getTokens(): CancelablePromise<Array<TokenResponse>>;
622
+ /**
623
+ * Request a swap quote
624
+ * Generates a swap quote based on input parameters such as the assets, amount, slippage tolerance, and recipient/refund information.
625
+ */
626
+ static getQuote(requestBody: QuoteRequest): CancelablePromise<QuoteResponse>;
627
+ /**
628
+ * Check swap execution status
629
+ * Retrieves the current status of a swap using the unique deposit address from the quote.
630
+ */
631
+ static getExecutionStatus(depositAddress: string, depositMemo?: string): CancelablePromise<GetExecutionStatusResponse>;
632
+ /**
633
+ * Submit deposit transaction hash (OneClick)
634
+ * Optionally notifies the service that a deposit has been sent to the specified address.
635
+ */
636
+ static submitDepositTx: (requestBody: SubmitDepositTxRequest) => CancelablePromise<SubmitDepositTxResponse>;
637
+ }
638
+
639
+ declare const tokens: TokenConfig[];
640
+ declare const usdtTokens: TokenConfig[];
641
+ declare const usdcTokens: TokenConfig[];
642
+ declare const frxusdTokens: TokenConfig[];
643
+
644
+ declare const usdtChains: Record<string, TokenConfig>;
645
+
646
+ declare const usdcChains: Record<string, TokenConfig>;
647
+
648
+ declare const frxusdChains: Record<string, TokenConfig>;
649
+
650
+ declare const usdt0Chains: Record<string, TokenConfig>;
651
+
652
+ declare const NetworkRpcUrlsMap: Record<string, string[]>;
653
+ /**
654
+ * @deprecated Please use getChainRpcUrl instead
655
+ * @param blockchain
656
+ * @returns
657
+ */
658
+ declare const getRpcUrls: (blockchain: string) => string[];
659
+ declare const getChainRpcUrl: (blockchain: string) => {
660
+ rpcUrls: string[];
661
+ rpcUrl: string;
662
+ };
663
+ declare const setRpcUrls: (urls: Record<string, string[]>) => Record<string, string[]>;
664
+
665
+ type ChainType = "near" | "sol" | "evm" | "tron" | "aptos" | "ton" | "sui";
666
+
667
+ declare const DefaultAddresses: Record<ChainType, string>;
668
+
669
+ declare const _default: {
670
+ inputs: {
671
+ internalType: string;
672
+ name: string;
673
+ type: string;
674
+ }[];
675
+ name: string;
676
+ outputs: {
677
+ internalType: string;
678
+ name: string;
679
+ type: string;
680
+ }[];
681
+ stateMutability: string;
682
+ type: string;
683
+ }[];
684
+
685
+ declare function getPrice(prices: Record<string, string>, symbol: string): string;
686
+
687
+ declare const formatNumber: (value: string | number | Big.Big | undefined, precision: number, isSimple?: boolean, options?: {
688
+ prefix?: string;
689
+ isLTIntegerZero?: boolean;
690
+ isZeroPrecision?: boolean;
691
+ isShort?: boolean;
692
+ isShortUppercase?: boolean;
693
+ round?: Big.RoundingMode;
694
+ isLessPrecision?: boolean;
695
+ }) => any;
696
+ declare const numberRemoveEndZero: (value: string) => string;
697
+
698
+ declare function addressToBytes32(chainType: string, address: string): string;
699
+
700
+ type StyleScale = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
701
+ type StyleColor = "red" | "yellow" | "green" | "blue" | "sky" | "teal" | "purple" | "pink" | "rose" | "gray" | "indigo" | "fuchsia" | "stone" | "lime";
702
+ declare class Csl {
703
+ private isDebug;
704
+ constructor(isDebug: boolean);
705
+ log: (type: string, style: `${StyleColor}-${StyleScale}`, str: string, ...args: any[]) => void;
706
+ info: (type: string, str: string, ...args: any[]) => void;
707
+ error: (type: string, str: string, ...args: any[]) => void;
708
+ success: (type: string, str: string, ...args: any[]) => void;
709
+ simple: (str: string, ...args: any[]) => void;
710
+ }
711
+
712
+ declare class ExecTime {
713
+ private isDebug;
714
+ private type;
715
+ private logStyle;
716
+ private startTimestamp;
717
+ private currentTimestamp;
718
+ private isPerformance;
719
+ private readonly performanceThreshold;
720
+ private csl;
721
+ constructor(options: {
722
+ type: string;
723
+ logStyle?: `${StyleColor}-${StyleScale}`;
724
+ isPerformance?: boolean;
725
+ isDebug: boolean;
726
+ });
727
+ breakpoint(): void;
728
+ log(subType: string, str?: string, ...params: any[]): void;
729
+ logTotal(subType: string, str?: string, ...params: any[]): void;
730
+ }
731
+
732
+ declare const formatQuoteError: (error: any, options: {
733
+ service: Service;
734
+ fromToken: TokenConfig;
735
+ }) => {
736
+ serviceType: "oneclick";
737
+ error: string;
738
+ } | {
739
+ serviceType: "usdt0" | "cctp" | "fraxzero" | "fraxzero-oneclick" | "oneclick-fraxzero" | "usdt0-oneclick" | "oneclick-usdt0" | "native";
740
+ error: any;
741
+ };
742
+
743
+ declare const getRouteStatus: (service: Service, disabledServices?: Service[]) => {
744
+ disabled: boolean;
745
+ };
746
+
747
+ declare function quoteSignature(params: any): Promise<any>;
748
+
749
+ export { ApiError, type AppFee, type BadRequestResponse, CancelError, CancelablePromise, type ChainType, Csl, DefaultAddresses, ExecTime, GetExecutionStatusResponse, NetworkRpcUrlsMap, OpenAPI, type OpenAPIConfig, type Quote, QuoteRequest, type QuoteResponse, SFA, SendType, Service, ServiceBackend, type ServiceType, type SubmitDepositTxRequest, SubmitDepositTxResponse, type SwapDetails, type TokenConfig, TokenResponse, type TransactionDetails, TransactionStatus, type WalletConfig, addressToBytes32, _default as erc20Abi, formatNumber, formatQuoteError, frxusdChains, frxusdTokens, getChainRpcUrl, getPrice, getRouteStatus, getRpcUrls, numberRemoveEndZero, quoteSignature, request, setRpcUrls, tokens, usdcChains, usdcTokens, usdt0Chains, usdtChains, usdtTokens };