@lifi/sdk 3.12.7 → 3.12.9

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/package.json +3 -3
  2. package/src/_cjs/core/EVM/permits/getNativePermit.js +2 -3
  3. package/src/_cjs/core/EVM/permits/getNativePermit.js.map +1 -1
  4. package/src/_cjs/core/Solana/connection.js +3 -4
  5. package/src/_cjs/core/Solana/connection.js.map +1 -1
  6. package/src/_cjs/core/Solana/getSNSAddress.js.map +1 -1
  7. package/src/_cjs/core/Sui/suiClient.js +1 -8
  8. package/src/_cjs/core/Sui/suiClient.js.map +1 -1
  9. package/src/_cjs/core/rpc.js +1 -6
  10. package/src/_cjs/core/rpc.js.map +1 -1
  11. package/src/_cjs/createConfig.js +0 -1
  12. package/src/_cjs/createConfig.js.map +1 -1
  13. package/src/_cjs/utils/convertQuoteToRoute.js +1 -1
  14. package/src/_cjs/utils/convertQuoteToRoute.js.map +1 -1
  15. package/src/_cjs/utils/getTransactionMessage.js +1 -16
  16. package/src/_cjs/utils/getTransactionMessage.js.map +1 -1
  17. package/src/_cjs/utils/withDedupe.js +5 -7
  18. package/src/_cjs/utils/withDedupe.js.map +1 -1
  19. package/src/_cjs/version.js +1 -1
  20. package/src/_esm/core/EVM/permits/getNativePermit.js +1 -1
  21. package/src/_esm/core/EVM/permits/getNativePermit.js.map +1 -1
  22. package/src/_esm/core/Solana/connection.js +1 -1
  23. package/src/_esm/core/Solana/connection.js.map +1 -1
  24. package/src/_esm/core/Solana/getSNSAddress.js +0 -1
  25. package/src/_esm/core/Solana/getSNSAddress.js.map +1 -1
  26. package/src/_esm/core/Sui/suiClient.js +1 -9
  27. package/src/_esm/core/Sui/suiClient.js.map +1 -1
  28. package/src/_esm/core/rpc.js +0 -4
  29. package/src/_esm/core/rpc.js.map +1 -1
  30. package/src/_esm/createConfig.js +1 -1
  31. package/src/_esm/createConfig.js.map +1 -1
  32. package/src/_esm/utils/convertQuoteToRoute.js +1 -1
  33. package/src/_esm/utils/convertQuoteToRoute.js.map +1 -1
  34. package/src/_esm/utils/getTransactionMessage.js +0 -16
  35. package/src/_esm/utils/getTransactionMessage.js.map +1 -1
  36. package/src/_esm/utils/withDedupe.js +2 -2
  37. package/src/_esm/utils/withDedupe.js.map +1 -1
  38. package/src/_esm/version.js +1 -1
  39. package/src/_types/core/EVM/EVMStepExecutor.d.ts +2 -1
  40. package/src/_types/core/EVM/EVMStepExecutor.d.ts.map +1 -1
  41. package/src/_types/core/EVM/checkAllowance.d.ts +3 -2
  42. package/src/_types/core/EVM/checkAllowance.d.ts.map +1 -1
  43. package/src/_types/core/EVM/checkPermitSupport.d.ts +2 -1
  44. package/src/_types/core/EVM/checkPermitSupport.d.ts.map +1 -1
  45. package/src/_types/core/EVM/permits/getNativePermit.d.ts +3 -9
  46. package/src/_types/core/EVM/permits/getNativePermit.d.ts.map +1 -1
  47. package/src/_types/core/EVM/permits/signPermit2Message.d.ts +2 -1
  48. package/src/_types/core/EVM/permits/signPermit2Message.d.ts.map +1 -1
  49. package/src/_types/core/Solana/connection.d.ts +0 -5
  50. package/src/_types/core/Solana/connection.d.ts.map +1 -1
  51. package/src/_types/core/Solana/getSNSAddress.d.ts.map +1 -1
  52. package/src/_types/core/Solana/sendAndConfirmTransaction.d.ts +2 -1
  53. package/src/_types/core/Solana/sendAndConfirmTransaction.d.ts.map +1 -1
  54. package/src/_types/core/StatusManager.d.ts +2 -1
  55. package/src/_types/core/StatusManager.d.ts.map +1 -1
  56. package/src/_types/core/Sui/suiClient.d.ts +0 -10
  57. package/src/_types/core/Sui/suiClient.d.ts.map +1 -1
  58. package/src/_types/core/UTXO/UTXOStepExecutor.d.ts +2 -1
  59. package/src/_types/core/UTXO/UTXOStepExecutor.d.ts.map +1 -1
  60. package/src/_types/core/executionState.d.ts +4 -3
  61. package/src/_types/core/executionState.d.ts.map +1 -1
  62. package/src/_types/core/rpc.d.ts +0 -1
  63. package/src/_types/core/rpc.d.ts.map +1 -1
  64. package/src/_types/createConfig.d.ts +0 -1
  65. package/src/_types/createConfig.d.ts.map +1 -1
  66. package/src/_types/utils/getTransactionMessage.d.ts +0 -2
  67. package/src/_types/utils/getTransactionMessage.d.ts.map +1 -1
  68. package/src/_types/utils/withDedupe.d.ts +0 -12
  69. package/src/_types/utils/withDedupe.d.ts.map +1 -1
  70. package/src/_types/version.d.ts +1 -1
  71. package/src/core/EVM/EVMStepExecutor.ts +1 -1
  72. package/src/core/EVM/checkAllowance.ts +2 -2
  73. package/src/core/EVM/checkPermitSupport.ts +1 -1
  74. package/src/core/EVM/permits/getNativePermit.ts +2 -2
  75. package/src/core/EVM/permits/signPermit2Message.ts +1 -1
  76. package/src/core/Solana/connection.ts +1 -1
  77. package/src/core/Solana/getSNSAddress.ts +0 -1
  78. package/src/core/Solana/sendAndConfirmTransaction.ts +1 -1
  79. package/src/core/StatusManager.ts +1 -1
  80. package/src/core/Sui/suiClient.ts +1 -10
  81. package/src/core/UTXO/UTXOStepExecutor.ts +1 -1
  82. package/src/core/executionState.ts +3 -3
  83. package/src/core/rpc.ts +0 -5
  84. package/src/createConfig.ts +1 -1
  85. package/src/utils/convertQuoteToRoute.ts +1 -1
  86. package/src/utils/getTransactionMessage.ts +0 -30
  87. package/src/utils/withDedupe.ts +2 -2
  88. package/src/version.ts +1 -1
  89. package/src/_cjs/core/provider.js +0 -15
  90. package/src/_cjs/core/provider.js.map +0 -1
  91. package/src/_cjs/utils/errors.js +0 -2
  92. package/src/_cjs/utils/errors.js.map +0 -1
  93. package/src/_esm/core/provider.js +0 -11
  94. package/src/_esm/core/provider.js.map +0 -1
  95. package/src/_esm/utils/errors.js +0 -2
  96. package/src/_esm/utils/errors.js.map +0 -1
  97. package/src/_types/core/provider.d.ts +0 -3
  98. package/src/_types/core/provider.d.ts.map +0 -1
  99. package/src/_types/utils/errors.d.ts +0 -1
  100. package/src/_types/utils/errors.d.ts.map +0 -1
  101. package/src/core/provider.ts +0 -12
  102. package/src/utils/errors.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import type { ExtendedChain } from '@lifi/types';
2
2
  import type { Address } from 'viem';
3
- export type PermitSupport = {
3
+ type PermitSupport = {
4
4
  /** Whether the token supports EIP-2612 native permits */
5
5
  nativePermitSupported: boolean;
6
6
  /** Whether Permit2 is available and has sufficient allowance */
@@ -24,4 +24,5 @@ export declare const checkPermitSupport: ({ chain, tokenAddress, ownerAddress, a
24
24
  ownerAddress: Address;
25
25
  amount: bigint;
26
26
  }) => Promise<PermitSupport>;
27
+ export {};
27
28
  //# sourceMappingURL=checkPermitSupport.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkPermitSupport.d.ts","sourceRoot":"","sources":["../../../core/EVM/checkPermitSupport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAQnC,MAAM,MAAM,aAAa,GAAG;IAC1B,yDAAyD;IACzD,qBAAqB,EAAE,OAAO,CAAA;IAC9B,gEAAgE;IAChE,0BAA0B,EAAE,OAAO,CAAA;CACpC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,GAAU,gDAKtC;IACD,KAAK,EAAE,aAAa,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;CACf,KAAG,OAAO,CAAC,aAAa,CAqCxB,CAAA"}
1
+ {"version":3,"file":"checkPermitSupport.d.ts","sourceRoot":"","sources":["../../../core/EVM/checkPermitSupport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAQnC,KAAK,aAAa,GAAG;IACnB,yDAAyD;IACzD,qBAAqB,EAAE,OAAO,CAAA;IAC9B,gEAAgE;IAChE,0BAA0B,EAAE,OAAO,CAAA;CACpC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,GAAU,gDAKtC;IACD,KAAK,EAAE,aAAa,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;CACf,KAAG,OAAO,CAAC,aAAa,CAqCxB,CAAA"}
@@ -1,18 +1,11 @@
1
- import type { Address, Client, TypedDataDomain } from 'viem';
1
+ import type { Address, Client } from 'viem';
2
2
  import type { NativePermitData } from './types.js';
3
- export type GetNativePermitParams = {
3
+ type GetNativePermitParams = {
4
4
  chainId: number;
5
5
  tokenAddress: Address;
6
6
  spenderAddress: Address;
7
7
  amount: bigint;
8
8
  };
9
- export declare const getContractData: (client: Client, chainId: number, tokenAddress: Address) => Promise<{
10
- name: string;
11
- domain: TypedDataDomain;
12
- permitTypehash: `0x${string}` | undefined;
13
- nonce: bigint;
14
- version: string;
15
- } | undefined>;
16
9
  /**
17
10
  * Retrieves native permit data (EIP-2612) for a token on a specific chain
18
11
  * @link https://eips.ethereum.org/EIPS/eip-2612
@@ -22,4 +15,5 @@ export declare const getContractData: (client: Client, chainId: number, tokenAdd
22
15
  * @returns {Promise<NativePermitData>} Object containing permit data including name, version, nonce and support status
23
16
  */
24
17
  export declare const getNativePermit: (client: Client, { chainId, tokenAddress, spenderAddress, amount }: GetNativePermitParams) => Promise<NativePermitData | undefined>;
18
+ export {};
25
19
  //# sourceMappingURL=getNativePermit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getNativePermit.d.ts","sourceRoot":"","sources":["../../../../core/EVM/permits/getNativePermit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAO,eAAe,EAAE,MAAM,MAAM,CAAA;AAoBjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE,OAAO,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AA6RD,eAAO,MAAM,eAAe,GAC1B,QAAQ,MAAM,EACd,SAAS,MAAM,EACf,cAAc,OAAO;;;;;;cAmJtB,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,QAAQ,MAAM,EACd,mDAAmD,qBAAqB,KACvE,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAkCtC,CAAA"}
1
+ {"version":3,"file":"getNativePermit.d.ts","sourceRoot":"","sources":["../../../../core/EVM/permits/getNativePermit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAwB,MAAM,MAAM,CAAA;AAoBjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE,OAAO,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAqbD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,QAAQ,MAAM,EACd,mDAAmD,qBAAqB,KACvE,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAkCtC,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { ExtendedChain, SignedTypedData } from '@lifi/types';
2
2
  import type { Address, Client, Hex } from 'viem';
3
- export interface SignPermit2MessageParams {
3
+ interface SignPermit2MessageParams {
4
4
  client: Client;
5
5
  chain: ExtendedChain;
6
6
  tokenAddress: Address;
@@ -9,4 +9,5 @@ export interface SignPermit2MessageParams {
9
9
  witness?: boolean;
10
10
  }
11
11
  export declare function signPermit2Message(params: SignPermit2MessageParams): Promise<SignedTypedData>;
12
+ export {};
12
13
  //# sourceMappingURL=signPermit2Message.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signPermit2Message.d.ts","sourceRoot":"","sources":["../../../../core/EVM/permits/signPermit2Message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAOhD,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,aAAa,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,GAAG,CAAA;IACT,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,eAAe,CAAC,CAuD1B"}
1
+ {"version":3,"file":"signPermit2Message.d.ts","sourceRoot":"","sources":["../../../../core/EVM/permits/signPermit2Message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAOhD,UAAU,wBAAwB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,aAAa,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,GAAG,CAAA;IACT,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,eAAe,CAAC,CAuD1B"}
@@ -1,9 +1,4 @@
1
1
  import { Connection } from '@solana/web3.js';
2
- /**
3
- * Initializes the Solana connections if they haven't been initialized yet.
4
- * @returns - Promise that resolves when connections are initialized.
5
- */
6
- export declare const ensureConnections: () => Promise<void>;
7
2
  /**
8
3
  * Wrapper around getting the connection (RPC provider) for Solana
9
4
  * @returns - Solana RPC connections
@@ -1 +1 @@
1
- {"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../core/Solana/connection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAK5C;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAa,OAAO,CAAC,IAAI,CAQtD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAa,OAAO,CAAC,UAAU,EAAE,CAGjE,CAAA;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EACzC,EAAE,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,GACzC,OAAO,CAAC,CAAC,CAAC,CAcZ"}
1
+ {"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../core/Solana/connection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAmB5C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAa,OAAO,CAAC,UAAU,EAAE,CAGjE,CAAA;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EACzC,EAAE,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,GACzC,OAAO,CAAC,CAAC,CAAC,CAcZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"getSNSAddress.d.ts","sourceRoot":"","sources":["../../../core/Solana/getSNSAddress.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa,GAAU,MAAM,MAAM,gCAuB/C,CAAA"}
1
+ {"version":3,"file":"getSNSAddress.d.ts","sourceRoot":"","sources":["../../../core/Solana/getSNSAddress.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa,GAAU,MAAM,MAAM,gCAsB/C,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { SignatureResult, VersionedTransaction } from '@solana/web3.js';
2
- export type ConfirmedTransactionResult = {
2
+ type ConfirmedTransactionResult = {
3
3
  signatureResult: SignatureResult | null;
4
4
  txSignature: string;
5
5
  };
@@ -10,4 +10,5 @@ export type ConfirmedTransactionResult = {
10
10
  * @returns - The confirmation result of the transaction.
11
11
  */
12
12
  export declare function sendAndConfirmTransaction(signedTx: VersionedTransaction): Promise<ConfirmedTransactionResult>;
13
+ export {};
13
14
  //# sourceMappingURL=sendAndConfirmTransaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sendAndConfirmTransaction.d.ts","sourceRoot":"","sources":["../../../core/Solana/sendAndConfirmTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EACf,oBAAoB,EACrB,MAAM,iBAAiB,CAAA;AAKxB,MAAM,MAAM,0BAA0B,GAAG;IACvC,eAAe,EAAE,eAAe,GAAG,IAAI,CAAA;IACvC,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,oBAAoB,GAC7B,OAAO,CAAC,0BAA0B,CAAC,CA6GrC"}
1
+ {"version":3,"file":"sendAndConfirmTransaction.d.ts","sourceRoot":"","sources":["../../../core/Solana/sendAndConfirmTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EACf,oBAAoB,EACrB,MAAM,iBAAiB,CAAA;AAKxB,KAAK,0BAA0B,GAAG;IAChC,eAAe,EAAE,eAAe,GAAG,IAAI,CAAA;IACvC,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,oBAAoB,GAC7B,OAAO,CAAC,0BAA0B,CAAC,CA6GrC"}
@@ -1,6 +1,6 @@
1
1
  import type { ChainId, LiFiStep } from '@lifi/types';
2
2
  import type { Execution, ExecutionStatus, LiFiStepExtended, Process, ProcessStatus, ProcessType } from './types.js';
3
- export type FindOrCreateProcessProps = {
3
+ type FindOrCreateProcessProps = {
4
4
  step: LiFiStepExtended;
5
5
  type: ProcessType;
6
6
  chainId?: ChainId;
@@ -65,4 +65,5 @@ export declare class StatusManager {
65
65
  updateStepInRoute: (step: LiFiStep) => LiFiStep;
66
66
  allowUpdates(value: boolean): void;
67
67
  }
68
+ export {};
68
69
  //# sourceMappingURL=StatusManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusManager.d.ts","sourceRoot":"","sources":["../../core/StatusManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGpD,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,OAAO,EACP,aAAa,EACb,WAAW,EACZ,MAAM,YAAY,CAAA;AAEnB,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,gBAAgB,CAAA;IACtB,IAAI,EAAE,WAAW,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;GAIG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAQ;IAChC,OAAO,CAAC,YAAY,CAAO;gBAEf,OAAO,EAAE,MAAM;IAI3B;;;;OAIG;IACH,mBAAmB,GAAI,MAAM,gBAAgB,KAAG,SAAS,CAkBxD;IAED;;;;;;OAMG;IACH,eAAe,CACb,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,eAAe,EACvB,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC7B,QAAQ;IAkBX;;;;;;OAMG;IACH,WAAW,CACT,IAAI,EAAE,gBAAgB,EACtB,IAAI,EAAE,WAAW,EACjB,MAAM,CAAC,EAAE,aAAa,GACrB,OAAO,GAAG,SAAS;IAetB;;;;;;;OAOG;IACH,mBAAmB,GAAI,6CAMpB,wBAAwB,KAAG,OAAO,CAkBpC;IAED;;;;;;;OAOG;IACH,aAAa,GACX,MAAM,gBAAgB,EACtB,MAAM,WAAW,EACjB,QAAQ,aAAa,EACrB,SAAS,OAAO,CAAC,OAAO,CAAC,KACxB,OAAO,CAgDT;IAED;;;;OAIG;IACH,aAAa,GAAI,MAAM,gBAAgB,EAAE,MAAM,WAAW,KAAG,IAAI,CAOhE;IAED,iBAAiB,GAAI,MAAM,QAAQ,KAAG,QAAQ,CAsB7C;IAED,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;CAGnC"}
1
+ {"version":3,"file":"StatusManager.d.ts","sourceRoot":"","sources":["../../core/StatusManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGpD,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,OAAO,EACP,aAAa,EACb,WAAW,EACZ,MAAM,YAAY,CAAA;AAEnB,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,gBAAgB,CAAA;IACtB,IAAI,EAAE,WAAW,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;GAIG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAQ;IAChC,OAAO,CAAC,YAAY,CAAO;gBAEf,OAAO,EAAE,MAAM;IAI3B;;;;OAIG;IACH,mBAAmB,GAAI,MAAM,gBAAgB,KAAG,SAAS,CAkBxD;IAED;;;;;;OAMG;IACH,eAAe,CACb,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,eAAe,EACvB,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC7B,QAAQ;IAkBX;;;;;;OAMG;IACH,WAAW,CACT,IAAI,EAAE,gBAAgB,EACtB,IAAI,EAAE,WAAW,EACjB,MAAM,CAAC,EAAE,aAAa,GACrB,OAAO,GAAG,SAAS;IAetB;;;;;;;OAOG;IACH,mBAAmB,GAAI,6CAMpB,wBAAwB,KAAG,OAAO,CAkBpC;IAED;;;;;;;OAOG;IACH,aAAa,GACX,MAAM,gBAAgB,EACtB,MAAM,WAAW,EACjB,QAAQ,aAAa,EACrB,SAAS,OAAO,CAAC,OAAO,CAAC,KACxB,OAAO,CAgDT;IAED;;;;OAIG;IACH,aAAa,GAAI,MAAM,gBAAgB,EAAE,MAAM,WAAW,KAAG,IAAI,CAOhE;IAED,iBAAiB,GAAI,MAAM,QAAQ,KAAG,QAAQ,CAsB7C;IAED,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;CAGnC"}
@@ -1,14 +1,4 @@
1
1
  import { SuiClient } from '@mysten/sui/client';
2
- /**
3
- * Initializes the Sui clients if they haven't been initialized yet.
4
- * @returns - Promise that resolves when clients are initialized.
5
- */
6
- export declare const ensureClients: () => Promise<void>;
7
- /**
8
- * Wrapper around getting the client (RPC provider) for Sui
9
- * @returns - Sui RPC clients
10
- */
11
- export declare const getSuiClients: () => Promise<SuiClient[]>;
12
2
  /**
13
3
  * Calls a function on the SuiClient instances with retry logic.
14
4
  * @param fn - The function to call, which receives a SuiClient instance.
@@ -1 +1 @@
1
- {"version":3,"file":"suiClient.d.ts","sourceRoot":"","sources":["../../../core/Sui/suiClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAK9C;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,IAAI,CAQlD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,SAAS,EAAE,CAGzD,CAAA;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACtC,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,GACpC,OAAO,CAAC,CAAC,CAAC,CAcZ"}
1
+ {"version":3,"file":"suiClient.d.ts","sourceRoot":"","sources":["../../../core/Sui/suiClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAmB9C;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACtC,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,GACpC,OAAO,CAAC,CAAC,CAAC,CAcZ"}
@@ -1,7 +1,7 @@
1
1
  import type { Client } from '@bigmi/core';
2
2
  import { BaseStepExecutor } from '../BaseStepExecutor.js';
3
3
  import type { LiFiStepExtended, StepExecutorOptions } from '../types.js';
4
- export interface UTXOStepExecutorOptions extends StepExecutorOptions {
4
+ interface UTXOStepExecutorOptions extends StepExecutorOptions {
5
5
  client: Client;
6
6
  }
7
7
  export declare class UTXOStepExecutor extends BaseStepExecutor {
@@ -10,4 +10,5 @@ export declare class UTXOStepExecutor extends BaseStepExecutor {
10
10
  checkClient: (step: LiFiStepExtended) => void;
11
11
  executeStep: (step: LiFiStepExtended) => Promise<LiFiStepExtended>;
12
12
  }
13
+ export {};
13
14
  //# sourceMappingURL=UTXOStepExecutor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UTXOStepExecutor.d.ts","sourceRoot":"","sources":["../../../core/UTXO/UTXOStepExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AAgB5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGzD,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,aAAa,CAAA;AAMpB,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAClE,MAAM,EAAE,MAAM,CAAA;CACf;AAED,qBAAa,gBAAiB,SAAQ,gBAAgB;IACpD,OAAO,CAAC,MAAM,CAAQ;gBAEV,OAAO,EAAE,uBAAuB;IAK5C,WAAW,GAAI,MAAM,gBAAgB,UASpC;IAED,WAAW,GAAU,MAAM,gBAAgB,KAAG,OAAO,CAAC,gBAAgB,CAAC,CAiRtE;CACF"}
1
+ {"version":3,"file":"UTXOStepExecutor.d.ts","sourceRoot":"","sources":["../../../core/UTXO/UTXOStepExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AAgB5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGzD,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,aAAa,CAAA;AAMpB,UAAU,uBAAwB,SAAQ,mBAAmB;IAC3D,MAAM,EAAE,MAAM,CAAA;CACf;AAED,qBAAa,gBAAiB,SAAQ,gBAAgB;IACpD,OAAO,CAAC,MAAM,CAAQ;gBAEV,OAAO,EAAE,uBAAuB;IAK5C,WAAW,GAAI,MAAM,gBAAgB,UASpC;IAED,WAAW,GAAU,MAAM,gBAAgB,KAAG,OAAO,CAAC,gBAAgB,CAAC,CAiRtE;CACF"}
@@ -1,12 +1,12 @@
1
1
  import type { ExecutionOptions, RouteExtended, StepExecutor } from './types.js';
2
- export interface ExecutionData {
2
+ interface ExecutionData {
3
3
  route: RouteExtended;
4
4
  executors: StepExecutor[];
5
5
  executionOptions?: ExecutionOptions;
6
6
  promise?: Promise<RouteExtended>;
7
7
  }
8
- export type ExecutionStateParams = Omit<ExecutionData, 'executors'>;
9
- export interface ExecutionState {
8
+ type ExecutionStateParams = Omit<ExecutionData, 'executors'>;
9
+ interface ExecutionState {
10
10
  state: Partial<Record<string, ExecutionData>>;
11
11
  get(routeId: string): ExecutionData | undefined;
12
12
  create(params: ExecutionStateParams): ExecutionData;
@@ -14,4 +14,5 @@ export interface ExecutionState {
14
14
  delete(routeId: string): void;
15
15
  }
16
16
  export declare const executionState: ExecutionState;
17
+ export {};
17
18
  //# sourceMappingURL=executionState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"executionState.d.ts","sourceRoot":"","sources":["../../core/executionState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE/E,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,aAAa,CAAA;IACpB,SAAS,EAAE,YAAY,EAAE,CAAA;IACzB,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;CACjC;AAED,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAA;AAEnE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAA;IAC7C,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAA;IAC/C,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,aAAa,CAAA;IACnD,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAA;IAC1C,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,eAAO,MAAM,cAAc,EAAE,cAwB5B,CAAA"}
1
+ {"version":3,"file":"executionState.d.ts","sourceRoot":"","sources":["../../core/executionState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE/E,UAAU,aAAa;IACrB,KAAK,EAAE,aAAa,CAAA;IACpB,SAAS,EAAE,YAAY,EAAE,CAAA;IACzB,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;CACjC;AAED,KAAK,oBAAoB,GAAG,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAA;AAE5D,UAAU,cAAc;IACtB,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAA;IAC7C,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAA;IAC/C,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,aAAa,CAAA;IACnD,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAA;IAC1C,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,eAAO,MAAM,cAAc,EAAE,cAwB5B,CAAA"}
@@ -1,4 +1,3 @@
1
1
  import type { ChainId } from '@lifi/types';
2
- export declare const getRpcUrl: (chainId: ChainId) => Promise<string>;
3
2
  export declare const getRpcUrls: (chainId: ChainId) => Promise<string[]>;
4
3
  //# sourceMappingURL=rpc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../core/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAG1C,eAAO,MAAM,SAAS,GAAU,SAAS,OAAO,KAAG,OAAO,CAAC,MAAM,CAGhE,CAAA;AAED,eAAO,MAAM,UAAU,GAAU,SAAS,OAAO,KAAG,OAAO,CAAC,MAAM,EAAE,CAMnE,CAAA"}
1
+ {"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../core/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAG1C,eAAO,MAAM,UAAU,GAAU,SAAS,OAAO,KAAG,OAAO,CAAC,MAAM,EAAE,CAMnE,CAAA"}
@@ -1,4 +1,3 @@
1
1
  import type { SDKConfig } from './types/internal.js';
2
- export declare function createChainsConfig(): Promise<void>;
3
2
  export declare function createConfig(options: SDKConfig): import("./types/internal.js").SDKBaseConfig;
4
3
  //# sourceMappingURL=createConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createConfig.d.ts","sourceRoot":"","sources":["../createConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAiBpD,wBAAsB,kBAAkB,kBAOvC;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,+CAM9C"}
1
+ {"version":3,"file":"createConfig.d.ts","sourceRoot":"","sources":["../createConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AA0BpD,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,+CAM9C"}
@@ -1,5 +1,3 @@
1
1
  import type { LiFiStep } from '@lifi/types';
2
- import type { Process } from '../core/types.js';
3
- export declare const getTransactionNotSentMessage: (step?: LiFiStep, process?: Process) => Promise<string>;
4
2
  export declare const getTransactionFailedMessage: (step: LiFiStep, txLink?: string) => Promise<string>;
5
3
  //# sourceMappingURL=getTransactionMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getTransactionMessage.d.ts","sourceRoot":"","sources":["../../utils/getTransactionMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAG3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE/C,eAAO,MAAM,4BAA4B,GACvC,OAAO,QAAQ,EACf,UAAU,OAAO,KAChB,OAAO,CAAC,MAAM,CAuBhB,CAAA;AAED,eAAO,MAAM,2BAA2B,GACtC,MAAM,QAAQ,EACd,SAAS,MAAM,KACd,OAAO,CAAC,MAAM,CAShB,CAAA"}
1
+ {"version":3,"file":"getTransactionMessage.d.ts","sourceRoot":"","sources":["../../utils/getTransactionMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAG3C,eAAO,MAAM,2BAA2B,GACtC,MAAM,QAAQ,EACd,SAAS,MAAM,KACd,OAAO,CAAC,MAAM,CAShB,CAAA"}
@@ -1,15 +1,3 @@
1
- /**
2
- * Map with a LRU (Least recently used) policy.
3
- *
4
- * https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU
5
- */
6
- export declare class LruMap<value = unknown> extends Map<string, value> {
7
- maxSize: number;
8
- constructor(size: number);
9
- set(key: string, value: value): this;
10
- }
11
- /** @internal */
12
- export declare const promiseCache: LruMap<Promise<any>>;
13
1
  type WithDedupeOptions = {
14
2
  enabled?: boolean | undefined;
15
3
  id?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"withDedupe.d.ts","sourceRoot":"","sources":["../../utils/withDedupe.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,MAAM,CAAC,KAAK,GAAG,OAAO,CAAE,SAAQ,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC;IAC7D,OAAO,EAAE,MAAM,CAAA;gBAEH,IAAI,EAAE,MAAM;IAKf,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;CAOvC;AAED,gBAAgB;AAChB,eAAO,MAAM,YAAY,sBAA+C,CAAA;AAExE,KAAK,iBAAiB,GAAG;IACvB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACxB,CAAA;AAED,uCAAuC;AACvC,wBAAgB,UAAU,CAAC,CAAC,EAC1B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,EAAE,OAAc,EAAE,EAAE,EAAE,EAAE,iBAAiB,GACxC,OAAO,CAAC,CAAC,CAAC,CAUZ"}
1
+ {"version":3,"file":"withDedupe.d.ts","sourceRoot":"","sources":["../../utils/withDedupe.ts"],"names":[],"mappings":"AAyBA,KAAK,iBAAiB,GAAG;IACvB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACxB,CAAA;AAED,uCAAuC;AACvC,wBAAgB,UAAU,CAAC,CAAC,EAC1B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,EAAE,OAAc,EAAE,EAAE,EAAE,EAAE,iBAAiB,GACxC,OAAO,CAAC,CAAC,CAAC,CAUZ"}
@@ -1,3 +1,3 @@
1
1
  export declare const name = "@lifi/sdk";
2
- export declare const version = "3.12.7";
2
+ export declare const version = "3.12.9";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -59,7 +59,7 @@ import { waitForBatchTransactionReceipt } from './waitForBatchTransactionReceipt
59
59
  import { waitForRelayedTransactionReceipt } from './waitForRelayedTransactionReceipt.js'
60
60
  import { waitForTransactionReceipt } from './waitForTransactionReceipt.js'
61
61
 
62
- export interface EVMStepExecutorOptions extends StepExecutorOptions {
62
+ interface EVMStepExecutorOptions extends StepExecutorOptions {
63
63
  client: Client
64
64
  }
65
65
 
@@ -21,7 +21,7 @@ import type { Call } from './types.js'
21
21
  import { getDomainChainId } from './utils.js'
22
22
  import { waitForTransactionReceipt } from './waitForTransactionReceipt.js'
23
23
 
24
- export type CheckAllowanceParams = {
24
+ type CheckAllowanceParams = {
25
25
  checkClient(
26
26
  step: LiFiStepExtended,
27
27
  process: Process,
@@ -37,7 +37,7 @@ export type CheckAllowanceParams = {
37
37
  disableMessageSigning?: boolean
38
38
  }
39
39
 
40
- export type AllowanceResult =
40
+ type AllowanceResult =
41
41
  | {
42
42
  status: 'ACTION_REQUIRED'
43
43
  }
@@ -8,7 +8,7 @@ import { getNativePermit } from './permits/getNativePermit.js'
8
8
  import { getPublicClient } from './publicClient.js'
9
9
  import type { EVMProvider } from './types.js'
10
10
 
11
- export type PermitSupport = {
11
+ type PermitSupport = {
12
12
  /** Whether the token supports EIP-2612 native permits */
13
13
  nativePermitSupported: boolean
14
14
  /** Whether Permit2 is available and has sufficient allowance */
@@ -20,7 +20,7 @@ import {
20
20
  } from './constants.js'
21
21
  import type { NativePermitData } from './types.js'
22
22
 
23
- export type GetNativePermitParams = {
23
+ type GetNativePermitParams = {
24
24
  chainId: number
25
25
  tokenAddress: Address
26
26
  spenderAddress: Address
@@ -310,7 +310,7 @@ const getEIP712DomainData = async (
310
310
  }
311
311
  }
312
312
 
313
- export const getContractData = async (
313
+ const getContractData = async (
314
314
  client: Client,
315
315
  chainId: number,
316
316
  tokenAddress: Address
@@ -6,7 +6,7 @@ import { getAction } from 'viem/utils'
6
6
  import { getPermitTransferFromValues } from './getPermitTransferFromValues.js'
7
7
  import { getPermitData } from './signatureTransfer.js'
8
8
 
9
- export interface SignPermit2MessageParams {
9
+ interface SignPermit2MessageParams {
10
10
  client: Client
11
11
  chain: ExtendedChain
12
12
  tokenAddress: Address
@@ -8,7 +8,7 @@ const connections = new Map<string, Connection>()
8
8
  * Initializes the Solana connections if they haven't been initialized yet.
9
9
  * @returns - Promise that resolves when connections are initialized.
10
10
  */
11
- export const ensureConnections = async (): Promise<void> => {
11
+ const ensureConnections = async (): Promise<void> => {
12
12
  const rpcUrls = await getRpcUrls(ChainId.SOL)
13
13
  for (const rpcUrl of rpcUrls) {
14
14
  if (!connections.get(rpcUrl)) {
@@ -12,7 +12,6 @@ export const getSNSAddress = async (name: string) => {
12
12
  if (!name.endsWith('.sol')) {
13
13
  return
14
14
  }
15
- // const rpcUrl = await getRpcUrl(ChainId.SOL)
16
15
  const snsWorkerUrl = `https://sns-sdk-proxy.bonfida.workers.dev/resolve/${name}`
17
16
  const response: Response = await fetch(snsWorkerUrl)
18
17
  if (!response.ok) {
@@ -7,7 +7,7 @@ import bs58 from 'bs58'
7
7
  import { sleep } from '../../utils/sleep.js'
8
8
  import { getSolanaConnections } from './connection.js'
9
9
 
10
- export type ConfirmedTransactionResult = {
10
+ type ConfirmedTransactionResult = {
11
11
  signatureResult: SignatureResult | null
12
12
  txSignature: string
13
13
  }
@@ -10,7 +10,7 @@ import type {
10
10
  ProcessType,
11
11
  } from './types.js'
12
12
 
13
- export type FindOrCreateProcessProps = {
13
+ type FindOrCreateProcessProps = {
14
14
  step: LiFiStepExtended
15
15
  type: ProcessType
16
16
  chainId?: ChainId
@@ -8,7 +8,7 @@ const clients = new Map<string, SuiClient>()
8
8
  * Initializes the Sui clients if they haven't been initialized yet.
9
9
  * @returns - Promise that resolves when clients are initialized.
10
10
  */
11
- export const ensureClients = async (): Promise<void> => {
11
+ const ensureClients = async (): Promise<void> => {
12
12
  const rpcUrls = await getRpcUrls(ChainId.SUI)
13
13
  for (const rpcUrl of rpcUrls) {
14
14
  if (!clients.get(rpcUrl)) {
@@ -18,15 +18,6 @@ export const ensureClients = async (): Promise<void> => {
18
18
  }
19
19
  }
20
20
 
21
- /**
22
- * Wrapper around getting the client (RPC provider) for Sui
23
- * @returns - Sui RPC clients
24
- */
25
- export const getSuiClients = async (): Promise<SuiClient[]> => {
26
- await ensureClients()
27
- return Array.from(clients.values())
28
- }
29
-
30
21
  /**
31
22
  * Calls a function on the SuiClient instances with retry logic.
32
23
  * @param fn - The function to call, which receives a SuiClient instance.
@@ -27,7 +27,7 @@ import { getUTXOPublicClient } from './getUTXOPublicClient.js'
27
27
  import { parseUTXOErrors } from './parseUTXOErrors.js'
28
28
  import { isPsbtFinalized, toXOnly } from './utils.js'
29
29
 
30
- export interface UTXOStepExecutorOptions extends StepExecutorOptions {
30
+ interface UTXOStepExecutorOptions extends StepExecutorOptions {
31
31
  client: Client
32
32
  }
33
33
 
@@ -1,15 +1,15 @@
1
1
  import type { ExecutionOptions, RouteExtended, StepExecutor } from './types.js'
2
2
 
3
- export interface ExecutionData {
3
+ interface ExecutionData {
4
4
  route: RouteExtended
5
5
  executors: StepExecutor[]
6
6
  executionOptions?: ExecutionOptions
7
7
  promise?: Promise<RouteExtended>
8
8
  }
9
9
 
10
- export type ExecutionStateParams = Omit<ExecutionData, 'executors'>
10
+ type ExecutionStateParams = Omit<ExecutionData, 'executors'>
11
11
 
12
- export interface ExecutionState {
12
+ interface ExecutionState {
13
13
  state: Partial<Record<string, ExecutionData>>
14
14
  get(routeId: string): ExecutionData | undefined
15
15
  create(params: ExecutionStateParams): ExecutionData
package/src/core/rpc.ts CHANGED
@@ -1,11 +1,6 @@
1
1
  import type { ChainId } from '@lifi/types'
2
2
  import { config } from '../config.js'
3
3
 
4
- export const getRpcUrl = async (chainId: ChainId): Promise<string> => {
5
- const rpcUrls = await getRpcUrls(chainId)
6
- return rpcUrls[0]
7
- }
8
-
9
4
  export const getRpcUrls = async (chainId: ChainId): Promise<string[]> => {
10
5
  const rpcUrls = (await config.getRPCUrls())[chainId]
11
6
  if (!rpcUrls?.length) {
@@ -18,7 +18,7 @@ function createBaseConfig(options: SDKConfig) {
18
18
  return _config
19
19
  }
20
20
 
21
- export async function createChainsConfig() {
21
+ async function createChainsConfig() {
22
22
  config.loading = getChains({
23
23
  chainTypes: [ChainType.EVM, ChainType.SVM, ChainType.UTXO, ChainType.MVM],
24
24
  })
@@ -36,7 +36,7 @@ export const convertQuoteToRoute = (quote: LiFiStep): Route => {
36
36
  toAmountMin: quote.estimate.toAmountMin,
37
37
  toAmountUSD: quote.estimate.toAmountUSD,
38
38
  toAddress: quote.action.toAddress || quote.action.fromAddress,
39
- gasCostUSD: quote.estimate.gasCosts?.[0].amountUSD,
39
+ gasCostUSD: quote.estimate.gasCosts?.[0]?.amountUSD || '0',
40
40
  steps: [quote],
41
41
  insurance: { state: 'NOT_INSURABLE', feeAmountUsd: '0' },
42
42
  }
@@ -1,35 +1,5 @@
1
1
  import type { LiFiStep } from '@lifi/types'
2
- import { formatUnits } from 'viem'
3
2
  import { config } from '../config.js'
4
- import type { Process } from '../core/types.js'
5
-
6
- export const getTransactionNotSentMessage = async (
7
- step?: LiFiStep,
8
- process?: Process
9
- ): Promise<string> => {
10
- let transactionNotSend =
11
- 'Transaction was not sent, your funds are still in your wallet'
12
-
13
- // add information about funds if available
14
- if (step) {
15
- const chain = await config.getChainById(step.action.fromChainId)
16
-
17
- transactionNotSend += ` (${formatUnits(
18
- BigInt(step.action.fromAmount),
19
- step.action.fromToken.decimals
20
- )} ${step.action.fromToken.symbol} on ${chain.name})`
21
- }
22
-
23
- transactionNotSend +=
24
- ", please retry.<br/>If it still doesn't work, it is safe to delete this transfer and start a new one."
25
-
26
- // add transaction explorer link if available
27
- transactionNotSend += process?.txLink
28
- ? `<br>You can check the failed transaction&nbsp;<a href="${process.txLink}" target="_blank" rel="nofollow noreferrer">here</a>.`
29
- : ''
30
-
31
- return transactionNotSend
32
- }
33
3
 
34
4
  export const getTransactionFailedMessage = async (
35
5
  step: LiFiStep,
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU
5
5
  */
6
- export class LruMap<value = unknown> extends Map<string, value> {
6
+ class LruMap<value = unknown> extends Map<string, value> {
7
7
  maxSize: number
8
8
 
9
9
  constructor(size: number) {
@@ -21,7 +21,7 @@ export class LruMap<value = unknown> extends Map<string, value> {
21
21
  }
22
22
 
23
23
  /** @internal */
24
- export const promiseCache = /*#__PURE__*/ new LruMap<Promise<any>>(8192)
24
+ const promiseCache = /*#__PURE__*/ new LruMap<Promise<any>>(8192)
25
25
 
26
26
  type WithDedupeOptions = {
27
27
  enabled?: boolean | undefined
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export const name = '@lifi/sdk'
2
- export const version = '3.12.7'
2
+ export const version = '3.12.9'
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getProvider = void 0;
4
- const config_js_1 = require("../config.js");
5
- const getProvider = (type) => {
6
- const provider = config_js_1.config
7
- .get()
8
- .providers.find((provider) => provider.type === type);
9
- if (!provider) {
10
- throw new Error(`${type} provider not found.`);
11
- }
12
- return provider;
13
- };
14
- exports.getProvider = getProvider;
15
- //# sourceMappingURL=provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../core/provider.ts"],"names":[],"mappings":";;;AACA,4CAAqC;AAE9B,MAAM,WAAW,GAAG,CAAI,IAAe,EAAK,EAAE;IACnD,MAAM,QAAQ,GAAG,kBAAM;SACpB,GAAG,EAAE;SACL,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,IAAI,CAAM,CAAA;IAC5D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,sBAAsB,CAAC,CAAA;IAChD,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AARY,QAAA,WAAW,eAQvB"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../utils/errors.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- import { config } from '../config.js';
2
- export const getProvider = (type) => {
3
- const provider = config
4
- .get()
5
- .providers.find((provider) => provider.type === type);
6
- if (!provider) {
7
- throw new Error(`${type} provider not found.`);
8
- }
9
- return provider;
10
- };
11
- //# sourceMappingURL=provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../core/provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAI,IAAe,EAAK,EAAE;IACnD,MAAM,QAAQ,GAAG,MAAM;SACpB,GAAG,EAAE;SACL,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,IAAI,CAAM,CAAA;IAC5D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,sBAAsB,CAAC,CAAA;IAChD,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../utils/errors.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import type { ChainType } from '@lifi/types';
2
- export declare const getProvider: <T>(type: ChainType) => T;
3
- //# sourceMappingURL=provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../core/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG5C,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,MAAM,SAAS,KAAG,CAQhD,CAAA"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../utils/errors.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import type { ChainType } from '@lifi/types'
2
- import { config } from '../config.js'
3
-
4
- export const getProvider = <T>(type: ChainType): T => {
5
- const provider = config
6
- .get()
7
- .providers.find((provider) => provider.type === type) as T
8
- if (!provider) {
9
- throw new Error(`${type} provider not found.`)
10
- }
11
- return provider
12
- }