@lifi/sdk 4.0.1 → 4.2.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.
Files changed (241) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/actions/getChains.d.ts +7 -8
  3. package/dist/cjs/actions/getConnections.d.ts +6 -7
  4. package/dist/cjs/actions/getContractCallsQuote.d.ts +7 -8
  5. package/dist/cjs/actions/getGasRecommendation.d.ts +7 -8
  6. package/dist/cjs/actions/getNameServiceAddress.d.ts +6 -7
  7. package/dist/cjs/actions/getQuote.d.ts +7 -8
  8. package/dist/cjs/actions/getQuote.js +2 -1
  9. package/dist/cjs/actions/getQuote.js.map +1 -1
  10. package/dist/cjs/actions/getRelayedTransactionStatus.d.ts +7 -8
  11. package/dist/cjs/actions/getRelayerQuote.d.ts +7 -8
  12. package/dist/cjs/actions/getRoutes.d.ts +10 -10
  13. package/dist/cjs/actions/getRoutes.js.map +1 -1
  14. package/dist/cjs/actions/getStatus.d.ts +7 -8
  15. package/dist/cjs/actions/getStepTransaction.d.ts +10 -10
  16. package/dist/cjs/actions/getStepTransaction.js +2 -0
  17. package/dist/cjs/actions/getStepTransaction.js.map +1 -1
  18. package/dist/cjs/actions/getToken.d.ts +8 -9
  19. package/dist/cjs/actions/getTokenBalance.d.ts +8 -9
  20. package/dist/cjs/actions/getTokenBalances.d.ts +8 -9
  21. package/dist/cjs/actions/getTokenBalancesByChain.d.ts +8 -9
  22. package/dist/cjs/actions/getTokenBalancesByChain.js +4 -2
  23. package/dist/cjs/actions/getTokenBalancesByChain.js.map +1 -1
  24. package/dist/cjs/actions/getTokens.d.ts +6 -7
  25. package/dist/cjs/actions/getTools.d.ts +6 -7
  26. package/dist/cjs/actions/getTransactionHistory.d.ts +13 -19
  27. package/dist/cjs/actions/getWalletBalances.d.ts +7 -8
  28. package/dist/cjs/actions/index.d.ts +115 -113
  29. package/dist/cjs/actions/index.js.map +1 -1
  30. package/dist/cjs/actions/patchContractCalls.d.ts +0 -1
  31. package/dist/cjs/actions/relayTransaction.d.ts +7 -8
  32. package/dist/cjs/client/createClient.d.ts +0 -1
  33. package/dist/cjs/client/getClientStorage.d.ts +0 -1
  34. package/dist/cjs/core/BaseStepExecutionTask.d.ts +0 -1
  35. package/dist/cjs/core/BaseStepExecutor.d.ts +0 -1
  36. package/dist/cjs/core/StatusManager.d.ts +40 -51
  37. package/dist/cjs/core/TaskPipeline.d.ts +0 -1
  38. package/dist/cjs/core/actionMessages.d.ts +0 -1
  39. package/dist/cjs/core/execution.d.ts +29 -30
  40. package/dist/cjs/core/executionState.d.ts +0 -1
  41. package/dist/cjs/core/prepareRestart.d.ts +0 -1
  42. package/dist/cjs/core/tasks/CheckBalanceTask.d.ts +6 -7
  43. package/dist/cjs/core/tasks/PrepareTransactionTask.d.ts +0 -1
  44. package/dist/cjs/core/tasks/WaitForTransactionStatusTask.d.ts +0 -1
  45. package/dist/cjs/core/tasks/helpers/checkBalance.d.ts +17 -18
  46. package/dist/cjs/core/tasks/helpers/getTransactionRequestData.d.ts +0 -1
  47. package/dist/cjs/core/tasks/helpers/stepComparison.d.ts +11 -12
  48. package/dist/cjs/core/tasks/helpers/waitForTransactionStatus.d.ts +0 -1
  49. package/dist/cjs/core/utils.d.ts +7 -8
  50. package/dist/cjs/errors/SDKError.d.ts +0 -1
  51. package/dist/cjs/errors/baseError.d.ts +0 -1
  52. package/dist/cjs/errors/errors.d.ts +4 -5
  53. package/dist/cjs/errors/httpError.d.ts +0 -1
  54. package/dist/cjs/errors/httpError.js +1 -1
  55. package/dist/cjs/errors/httpError.js.map +1 -1
  56. package/dist/cjs/errors/utils/baseErrorRootCause.d.ts +0 -1
  57. package/dist/cjs/index.d.ts +2 -1
  58. package/dist/cjs/types/actions.d.ts +23 -3
  59. package/dist/cjs/types/core.d.ts +3 -4
  60. package/dist/cjs/types/execution.d.ts +0 -1
  61. package/dist/cjs/utils/checkPackageUpdates.js +1 -1
  62. package/dist/cjs/utils/convertQuoteToRoute.d.ts +9 -10
  63. package/dist/cjs/utils/formatUnits.d.ts +2 -2
  64. package/dist/cjs/utils/getTransactionMessage.d.ts +0 -1
  65. package/dist/cjs/utils/isHex.d.ts +1 -3
  66. package/dist/cjs/utils/isRoutesRequest.d.ts +0 -1
  67. package/dist/cjs/utils/isStep.d.ts +0 -1
  68. package/dist/cjs/utils/isStep.js +2 -1
  69. package/dist/cjs/utils/isStep.js.map +1 -1
  70. package/dist/cjs/utils/isToken.d.ts +0 -1
  71. package/dist/cjs/utils/parseUnits.d.ts +2 -2
  72. package/dist/cjs/utils/request.d.ts +0 -1
  73. package/dist/cjs/utils/toQueryString.d.ts +5 -0
  74. package/dist/cjs/utils/toQueryString.js +17 -0
  75. package/dist/cjs/utils/toQueryString.js.map +1 -0
  76. package/dist/cjs/utils/waitForResult.d.ts +8 -8
  77. package/dist/cjs/utils/withDedupe.d.ts +5 -8
  78. package/dist/cjs/utils/withTimeout.d.ts +10 -16
  79. package/dist/cjs/version.d.ts +1 -1
  80. package/dist/cjs/version.js +1 -1
  81. package/dist/cjs/version.js.map +1 -1
  82. package/dist/esm/actions/getChains.d.ts +7 -8
  83. package/dist/esm/actions/getChains.d.ts.map +1 -1
  84. package/dist/esm/actions/getConnections.d.ts +6 -7
  85. package/dist/esm/actions/getConnections.d.ts.map +1 -1
  86. package/dist/esm/actions/getContractCallsQuote.d.ts +7 -8
  87. package/dist/esm/actions/getContractCallsQuote.d.ts.map +1 -1
  88. package/dist/esm/actions/getGasRecommendation.d.ts +7 -8
  89. package/dist/esm/actions/getGasRecommendation.d.ts.map +1 -1
  90. package/dist/esm/actions/getNameServiceAddress.d.ts +6 -7
  91. package/dist/esm/actions/getNameServiceAddress.d.ts.map +1 -1
  92. package/dist/esm/actions/getQuote.d.ts +7 -8
  93. package/dist/esm/actions/getQuote.d.ts.map +1 -1
  94. package/dist/esm/actions/getQuote.js +2 -1
  95. package/dist/esm/actions/getQuote.js.map +1 -1
  96. package/dist/esm/actions/getRelayedTransactionStatus.d.ts +7 -8
  97. package/dist/esm/actions/getRelayedTransactionStatus.d.ts.map +1 -1
  98. package/dist/esm/actions/getRelayerQuote.d.ts +7 -8
  99. package/dist/esm/actions/getRelayerQuote.d.ts.map +1 -1
  100. package/dist/esm/actions/getRoutes.d.ts +10 -10
  101. package/dist/esm/actions/getRoutes.d.ts.map +1 -1
  102. package/dist/esm/actions/getRoutes.js.map +1 -1
  103. package/dist/esm/actions/getStatus.d.ts +7 -8
  104. package/dist/esm/actions/getStatus.d.ts.map +1 -1
  105. package/dist/esm/actions/getStepTransaction.d.ts +10 -10
  106. package/dist/esm/actions/getStepTransaction.d.ts.map +1 -1
  107. package/dist/esm/actions/getStepTransaction.js +2 -0
  108. package/dist/esm/actions/getStepTransaction.js.map +1 -1
  109. package/dist/esm/actions/getToken.d.ts +8 -9
  110. package/dist/esm/actions/getToken.d.ts.map +1 -1
  111. package/dist/esm/actions/getTokenBalance.d.ts +8 -9
  112. package/dist/esm/actions/getTokenBalance.d.ts.map +1 -1
  113. package/dist/esm/actions/getTokenBalances.d.ts +8 -9
  114. package/dist/esm/actions/getTokenBalances.d.ts.map +1 -1
  115. package/dist/esm/actions/getTokenBalancesByChain.d.ts +8 -9
  116. package/dist/esm/actions/getTokenBalancesByChain.d.ts.map +1 -1
  117. package/dist/esm/actions/getTokenBalancesByChain.js +4 -2
  118. package/dist/esm/actions/getTokenBalancesByChain.js.map +1 -1
  119. package/dist/esm/actions/getTokens.d.ts +6 -7
  120. package/dist/esm/actions/getTokens.d.ts.map +1 -1
  121. package/dist/esm/actions/getTools.d.ts +6 -7
  122. package/dist/esm/actions/getTools.d.ts.map +1 -1
  123. package/dist/esm/actions/getTransactionHistory.d.ts +13 -19
  124. package/dist/esm/actions/getTransactionHistory.d.ts.map +1 -1
  125. package/dist/esm/actions/getWalletBalances.d.ts +7 -8
  126. package/dist/esm/actions/getWalletBalances.d.ts.map +1 -1
  127. package/dist/esm/actions/index.d.ts +115 -113
  128. package/dist/esm/actions/index.d.ts.map +1 -1
  129. package/dist/esm/actions/index.js.map +1 -1
  130. package/dist/esm/actions/patchContractCalls.d.ts +0 -1
  131. package/dist/esm/actions/patchContractCalls.d.ts.map +1 -1
  132. package/dist/esm/actions/relayTransaction.d.ts +7 -8
  133. package/dist/esm/actions/relayTransaction.d.ts.map +1 -1
  134. package/dist/esm/client/createClient.d.ts +0 -1
  135. package/dist/esm/client/createClient.d.ts.map +1 -1
  136. package/dist/esm/client/getClientStorage.d.ts +0 -1
  137. package/dist/esm/client/getClientStorage.d.ts.map +1 -1
  138. package/dist/esm/core/BaseStepExecutionTask.d.ts +0 -1
  139. package/dist/esm/core/BaseStepExecutionTask.d.ts.map +1 -1
  140. package/dist/esm/core/BaseStepExecutor.d.ts +0 -1
  141. package/dist/esm/core/BaseStepExecutor.d.ts.map +1 -1
  142. package/dist/esm/core/StatusManager.d.ts +40 -51
  143. package/dist/esm/core/StatusManager.d.ts.map +1 -1
  144. package/dist/esm/core/TaskPipeline.d.ts +0 -1
  145. package/dist/esm/core/TaskPipeline.d.ts.map +1 -1
  146. package/dist/esm/core/actionMessages.d.ts +0 -1
  147. package/dist/esm/core/actionMessages.d.ts.map +1 -1
  148. package/dist/esm/core/execution.d.ts +29 -30
  149. package/dist/esm/core/execution.d.ts.map +1 -1
  150. package/dist/esm/core/executionState.d.ts +0 -1
  151. package/dist/esm/core/executionState.d.ts.map +1 -1
  152. package/dist/esm/core/prepareRestart.d.ts +0 -1
  153. package/dist/esm/core/prepareRestart.d.ts.map +1 -1
  154. package/dist/esm/core/storage.d.ts.map +1 -1
  155. package/dist/esm/core/tasks/CheckBalanceTask.d.ts +6 -7
  156. package/dist/esm/core/tasks/CheckBalanceTask.d.ts.map +1 -1
  157. package/dist/esm/core/tasks/PrepareTransactionTask.d.ts +0 -1
  158. package/dist/esm/core/tasks/PrepareTransactionTask.d.ts.map +1 -1
  159. package/dist/esm/core/tasks/WaitForTransactionStatusTask.d.ts +0 -1
  160. package/dist/esm/core/tasks/WaitForTransactionStatusTask.d.ts.map +1 -1
  161. package/dist/esm/core/tasks/helpers/checkBalance.d.ts +17 -18
  162. package/dist/esm/core/tasks/helpers/checkBalance.d.ts.map +1 -1
  163. package/dist/esm/core/tasks/helpers/getTransactionRequestData.d.ts +0 -1
  164. package/dist/esm/core/tasks/helpers/getTransactionRequestData.d.ts.map +1 -1
  165. package/dist/esm/core/tasks/helpers/stepComparison.d.ts +11 -12
  166. package/dist/esm/core/tasks/helpers/stepComparison.d.ts.map +1 -1
  167. package/dist/esm/core/tasks/helpers/waitForTransactionStatus.d.ts +0 -1
  168. package/dist/esm/core/tasks/helpers/waitForTransactionStatus.d.ts.map +1 -1
  169. package/dist/esm/core/utils.d.ts +7 -8
  170. package/dist/esm/core/utils.d.ts.map +1 -1
  171. package/dist/esm/errors/SDKError.d.ts +0 -1
  172. package/dist/esm/errors/SDKError.d.ts.map +1 -1
  173. package/dist/esm/errors/baseError.d.ts +0 -1
  174. package/dist/esm/errors/baseError.d.ts.map +1 -1
  175. package/dist/esm/errors/constants.d.ts.map +1 -1
  176. package/dist/esm/errors/errors.d.ts +4 -5
  177. package/dist/esm/errors/errors.d.ts.map +1 -1
  178. package/dist/esm/errors/httpError.d.ts +0 -1
  179. package/dist/esm/errors/httpError.d.ts.map +1 -1
  180. package/dist/esm/errors/httpError.js +1 -1
  181. package/dist/esm/errors/httpError.js.map +1 -1
  182. package/dist/esm/errors/utils/baseErrorRootCause.d.ts +0 -1
  183. package/dist/esm/errors/utils/baseErrorRootCause.d.ts.map +1 -1
  184. package/dist/esm/errors/utils/rootCause.d.ts.map +1 -1
  185. package/dist/esm/index.d.ts +2 -1
  186. package/dist/esm/types/actions.d.ts +23 -3
  187. package/dist/esm/types/actions.d.ts.map +1 -1
  188. package/dist/esm/types/core.d.ts +3 -4
  189. package/dist/esm/types/core.d.ts.map +1 -1
  190. package/dist/esm/types/execution.d.ts +0 -1
  191. package/dist/esm/types/execution.d.ts.map +1 -1
  192. package/dist/esm/types/request.d.ts.map +1 -1
  193. package/dist/esm/utils/checkPackageUpdates.d.ts.map +1 -1
  194. package/dist/esm/utils/checkPackageUpdates.js +1 -1
  195. package/dist/esm/utils/convertQuoteToRoute.d.ts +9 -10
  196. package/dist/esm/utils/convertQuoteToRoute.d.ts.map +1 -1
  197. package/dist/esm/utils/decode.d.ts.map +1 -1
  198. package/dist/esm/utils/fetchTxErrorDetails.d.ts.map +1 -1
  199. package/dist/esm/utils/formatUnits.d.ts +2 -2
  200. package/dist/esm/utils/formatUnits.d.ts.map +1 -1
  201. package/dist/esm/utils/getTransactionMessage.d.ts +0 -1
  202. package/dist/esm/utils/getTransactionMessage.d.ts.map +1 -1
  203. package/dist/esm/utils/isHex.d.ts +1 -3
  204. package/dist/esm/utils/isHex.d.ts.map +1 -1
  205. package/dist/esm/utils/isRoutesRequest.d.ts +0 -1
  206. package/dist/esm/utils/isRoutesRequest.d.ts.map +1 -1
  207. package/dist/esm/utils/isStep.d.ts +0 -1
  208. package/dist/esm/utils/isStep.d.ts.map +1 -1
  209. package/dist/esm/utils/isStep.js +2 -1
  210. package/dist/esm/utils/isStep.js.map +1 -1
  211. package/dist/esm/utils/isToken.d.ts +0 -1
  212. package/dist/esm/utils/isToken.d.ts.map +1 -1
  213. package/dist/esm/utils/parseUnits.d.ts +2 -2
  214. package/dist/esm/utils/parseUnits.d.ts.map +1 -1
  215. package/dist/esm/utils/request.d.ts +0 -1
  216. package/dist/esm/utils/request.d.ts.map +1 -1
  217. package/dist/esm/utils/sleep.d.ts.map +1 -1
  218. package/dist/esm/utils/toQueryString.d.ts +5 -0
  219. package/dist/esm/utils/toQueryString.d.ts.map +1 -0
  220. package/dist/esm/utils/toQueryString.js +16 -0
  221. package/dist/esm/utils/toQueryString.js.map +1 -0
  222. package/dist/esm/utils/waitForResult.d.ts +8 -8
  223. package/dist/esm/utils/waitForResult.d.ts.map +1 -1
  224. package/dist/esm/utils/withDedupe.d.ts +5 -8
  225. package/dist/esm/utils/withDedupe.d.ts.map +1 -1
  226. package/dist/esm/utils/withTimeout.d.ts +10 -16
  227. package/dist/esm/utils/withTimeout.d.ts.map +1 -1
  228. package/dist/esm/version.d.ts +1 -1
  229. package/dist/esm/version.d.ts.map +1 -1
  230. package/dist/esm/version.js +1 -1
  231. package/dist/esm/version.js.map +1 -1
  232. package/package.json +1 -1
  233. package/src/actions/getQuote.ts +3 -2
  234. package/src/actions/getRoutes.ts +2 -1
  235. package/src/actions/getStepTransaction.ts +7 -2
  236. package/src/actions/index.ts +8 -5
  237. package/src/index.ts +7 -0
  238. package/src/types/actions.ts +29 -0
  239. package/src/utils/isStep.ts +4 -1
  240. package/src/utils/toQueryString.ts +35 -0
  241. package/src/version.ts +1 -1
@@ -1,15 +1,14 @@
1
1
  import { SDKClient } from "../types/core.js";
2
2
  import { RequestOptions, WalletTokenExtended } from "@lifi/types";
3
-
4
3
  //#region src/actions/getWalletBalances.d.ts
5
4
  /**
6
- * Returns the balances of tokens a wallet holds across EVM chains.
7
- * @param client - The SDK client.
8
- * @param walletAddress - A wallet address.
9
- * @param options - Optional request options.
10
- * @returns An object containing the tokens and the amounts organized by chain ids.
11
- * @throws {ValidationError} Throws a ValidationError if parameters are invalid.
12
- */
5
+ * Returns the balances of tokens a wallet holds across EVM chains.
6
+ * @param client - The SDK client.
7
+ * @param walletAddress - A wallet address.
8
+ * @param options - Optional request options.
9
+ * @returns An object containing the tokens and the amounts organized by chain ids.
10
+ * @throws {ValidationError} Throws a ValidationError if parameters are invalid.
11
+ */
13
12
  declare const getWalletBalances: (client: SDKClient, walletAddress: string, options?: RequestOptions) => Promise<Record<number, WalletTokenExtended[]>>;
14
13
  //#endregion
15
14
  export { getWalletBalances };
@@ -1,127 +1,129 @@
1
1
  import { SDKClient } from "../types/core.js";
2
- import { GetStatusRequestExtended, QuoteRequestFromAmount } from "../types/actions.js";
2
+ import { GetStatusRequestExtended, LiFiStepRequest, QuoteRequestFromAmount, RoutesRequest as RoutesRequest$1 } from "../types/actions.js";
3
3
  import { getQuote } from "./getQuote.js";
4
4
  import { PatchContractCallsResponse } from "./patchContractCalls.js";
5
- import { ChainId, ChainKey, ChainType, ChainsRequest, ConnectionsRequest, ConnectionsResponse, ContractCallsQuoteRequest, ExtendedChain, GasRecommendationRequest, GasRecommendationResponse, LiFiStep, PatchCallDataRequest, RelayRequest, RelayResponseData, RelayStatusRequest, RelayStatusResponseData, RequestOptions, RoutesRequest, RoutesResponse, SignedLiFiStep, StatusResponse, Token, TokenAmount, TokenExtended, TokensExtendedResponse, TokensRequest, TokensResponse, ToolsRequest, ToolsResponse, TransactionAnalyticsRequest, TransactionAnalyticsResponse, WalletTokenExtended } from "@lifi/types";
6
-
5
+ import { ChainId, ChainKey, ChainType, ChainsRequest, ConnectionsRequest, ConnectionsResponse, ContractCallsQuoteRequest, ExtendedChain, GasRecommendationRequest, GasRecommendationResponse, LiFiStep, PatchCallDataRequest, RelayRequest, RelayResponseData, RelayStatusRequest, RelayStatusResponseData, RequestOptions, RoutesResponse, StatusResponse, Token, TokenAmount, TokenExtended, TokensExtendedResponse, TokensRequest, TokensResponse, ToolsRequest, ToolsResponse, TransactionAnalyticsRequest, TransactionAnalyticsResponse, WalletTokenExtended } from "@lifi/types";
7
6
  //#region src/actions/index.d.ts
8
7
  type Actions = {
9
8
  /**
10
- * Get all available chains
11
- * @param params - The configuration of the requested chains
12
- * @param options - Request options
13
- * @returns A list of all available chains
14
- */
9
+ * Get all available chains
10
+ * @param params - The configuration of the requested chains
11
+ * @param options - Request options
12
+ * @returns A list of all available chains
13
+ */
15
14
  getChains: (params?: ChainsRequest, options?: RequestOptions) => Promise<ExtendedChain[]>;
16
15
  /**
17
- * Get connections between chains
18
- * @param params - The configuration of the requested connections
19
- * @param options - Request options
20
- * @returns A list of connections
21
- */
16
+ * Get connections between chains
17
+ * @param params - The configuration of the requested connections
18
+ * @param options - Request options
19
+ * @returns A list of connections
20
+ */
22
21
  getConnections: (params: ConnectionsRequest, options?: RequestOptions) => Promise<ConnectionsResponse>;
23
22
  /**
24
- * Get a quote for contract calls
25
- * @param params - The configuration of the requested contract calls quote
26
- * @param options - Request options
27
- * @returns Quote for contract calls
28
- */
23
+ * Get a quote for contract calls
24
+ * @param params - The configuration of the requested contract calls quote
25
+ * @param options - Request options
26
+ * @returns Quote for contract calls
27
+ */
29
28
  getContractCallsQuote: (params: ContractCallsQuoteRequest, options?: RequestOptions) => Promise<LiFiStep>;
30
29
  /**
31
- * Get gas recommendation for a chain
32
- * @param params - The configuration of the requested gas recommendation
33
- * @param options - Request options
34
- * @returns Gas recommendation
35
- */
30
+ * Get gas recommendation for a chain
31
+ * @param params - The configuration of the requested gas recommendation
32
+ * @param options - Request options
33
+ * @returns Gas recommendation
34
+ */
36
35
  getGasRecommendation: (params: GasRecommendationRequest, options?: RequestOptions) => Promise<GasRecommendationResponse>;
37
36
  /**
38
- * Get the address of a name service
39
- * @param name - The name to resolve
40
- * @param chainType - The chain type to resolve the name on
41
- * @returns The address of the name service
42
- */
37
+ * Get the address of a name service
38
+ * @param name - The name to resolve
39
+ * @param chainType - The chain type to resolve the name on
40
+ * @returns The address of the name service
41
+ */
43
42
  getNameServiceAddress: (name: string, chainType?: ChainType) => Promise<string | undefined>;
44
43
  /**
45
- * Get a quote for a token transfer
46
- * @param params - The configuration of the requested quote
47
- * @param options - Request options
48
- * @returns Quote for a token transfer
49
- */
44
+ * Get a quote for a token transfer
45
+ * @param params - The configuration of the requested quote
46
+ * @param options - Request options
47
+ * @returns Quote for a token transfer
48
+ */
50
49
  getQuote: (params: Parameters<typeof getQuote>[1], options?: RequestOptions) => Promise<LiFiStep>;
51
50
  /**
52
- * Get the status of a relayed transaction
53
- * @param params - The configuration of the requested relay status
54
- * @param options - Request options
55
- * @returns Status of the relayed transaction
56
- */
51
+ * Get the status of a relayed transaction
52
+ * @param params - The configuration of the requested relay status
53
+ * @param options - Request options
54
+ * @returns Status of the relayed transaction
55
+ */
57
56
  getRelayedTransactionStatus: (params: RelayStatusRequest, options?: RequestOptions) => Promise<RelayStatusResponseData>;
58
57
  /**
59
- * Get a quote from a relayer
60
- * @param params - The configuration of the requested relayer quote
61
- * @param options - Request options
62
- * @returns Quote from a relayer
63
- */
58
+ * Get a quote from a relayer
59
+ * @param params - The configuration of the requested relayer quote
60
+ * @param options - Request options
61
+ * @returns Quote from a relayer
62
+ */
64
63
  getRelayerQuote: (params: QuoteRequestFromAmount, options?: RequestOptions) => Promise<LiFiStep>;
65
64
  /**
66
- * Get a set of routes for a request that describes a transfer of tokens
67
- * @param params - A description of the transfer
68
- * @param options - Request options
69
- * @returns The resulting routes that can be used to realize the described transfer
70
- */
71
- getRoutes: (params: RoutesRequest, options?: RequestOptions) => Promise<RoutesResponse>;
72
- /**
73
- * Get the status of a transaction
74
- * @param params - The configuration of the requested status
75
- * @param options - Request options
76
- * @returns Status of the transaction
77
- */
65
+ * Get a set of routes for a request that describes a transfer of tokens.
66
+ * Optional limit-order fields (`toAmount`, `validUntil`, `partiallyFillable`)
67
+ * may be supplied and are resolved on the backend.
68
+ * @param params - A description of the transfer
69
+ * @param options - Request options
70
+ * @returns The resulting routes that can be used to realize the described transfer
71
+ */
72
+ getRoutes: (params: RoutesRequest$1, options?: RequestOptions) => Promise<RoutesResponse>;
73
+ /**
74
+ * Get the status of a transaction
75
+ * @param params - The configuration of the requested status
76
+ * @param options - Request options
77
+ * @returns Status of the transaction
78
+ */
78
79
  getStatus: (params: GetStatusRequestExtended, options?: RequestOptions) => Promise<StatusResponse>;
79
80
  /**
80
- * Get a step transaction
81
- * @param params - The configuration of the requested step transaction
82
- * @param options - Request options
83
- * @returns Step transaction
84
- */
85
- getStepTransaction: (params: LiFiStep | SignedLiFiStep, options?: RequestOptions) => Promise<LiFiStep>;
86
- /**
87
- * Get a specific token
88
- * @param chain - Id or key of the chain that contains the token
89
- * @param token - Address or symbol of the token on the requested chain
90
- * @param options - Request options
91
- * @returns Token information
92
- */
81
+ * Get a step transaction. The step's `action` may carry the optional
82
+ * limit-order fields, which are resolved on the backend.
83
+ * @param params - The configuration of the requested step transaction
84
+ * @param options - Request options
85
+ * @returns Step transaction
86
+ */
87
+ getStepTransaction: (params: LiFiStepRequest, options?: RequestOptions) => Promise<LiFiStep>;
88
+ /**
89
+ * Get a specific token
90
+ * @param chain - Id or key of the chain that contains the token
91
+ * @param token - Address or symbol of the token on the requested chain
92
+ * @param options - Request options
93
+ * @returns Token information
94
+ */
93
95
  getToken: (chain: ChainKey | ChainId, token: string, options?: RequestOptions) => Promise<TokenExtended>;
94
96
  /**
95
- * Get token balance for a specific token
96
- * @param walletAddress - A wallet address
97
- * @param token - A Token object
98
- * @returns Token balance
99
- */
97
+ * Get token balance for a specific token
98
+ * @param walletAddress - A wallet address
99
+ * @param token - A Token object
100
+ * @returns Token balance
101
+ */
100
102
  getTokenBalance: (walletAddress: string, token: Token) => Promise<TokenAmount | null>;
101
103
  /**
102
- * Get token balances for multiple tokens
103
- * @param walletAddress - A wallet address
104
- * @param tokens - A list of Token objects
105
- * @returns Token balances
106
- */
104
+ * Get token balances for multiple tokens
105
+ * @param walletAddress - A wallet address
106
+ * @param tokens - A list of Token objects
107
+ * @returns Token balances
108
+ */
107
109
  getTokenBalances: (walletAddress: string, tokens: Token[]) => Promise<TokenAmount[]>;
108
110
  /**
109
- * Get token balances by chain
110
- * @param walletAddress - A wallet address
111
- * @param tokensByChain - A list of token objects organized by chain ids
112
- * @returns Token balances by chain
113
- */
111
+ * Get token balances by chain
112
+ * @param walletAddress - A wallet address
113
+ * @param tokensByChain - A list of token objects organized by chain ids
114
+ * @returns Token balances by chain
115
+ */
114
116
  getTokenBalancesByChain: (walletAddress: string, tokensByChain: {
115
117
  [chainId: number]: Token[];
116
118
  }) => Promise<{
117
119
  [chainId: number]: TokenAmount[];
118
120
  }>;
119
121
  /**
120
- * Get all available tokens
121
- * @param params - The configuration of the requested tokens
122
- * @param options - Request options
123
- * @returns A list of all available tokens
124
- */
122
+ * Get all available tokens
123
+ * @param params - The configuration of the requested tokens
124
+ * @param options - Request options
125
+ * @returns A list of all available tokens
126
+ */
125
127
  getTokens: {
126
128
  (params?: TokensRequest & {
127
129
  extended?: false | undefined;
@@ -131,39 +133,39 @@ type Actions = {
131
133
  }, options?: RequestOptions): Promise<TokensExtendedResponse>;
132
134
  };
133
135
  /**
134
- * Get all available tools (bridges and exchanges)
135
- * @param params - The configuration of the requested tools
136
- * @param options - Request options
137
- * @returns A list of all available tools
138
- */
136
+ * Get all available tools (bridges and exchanges)
137
+ * @param params - The configuration of the requested tools
138
+ * @param options - Request options
139
+ * @returns A list of all available tools
140
+ */
139
141
  getTools: (params?: ToolsRequest, options?: RequestOptions) => Promise<ToolsResponse>;
140
142
  /**
141
- * Get transaction history
142
- * @param params - The configuration of the requested transaction history
143
- * @param options - Request options
144
- * @returns Transaction history
145
- */
143
+ * Get transaction history
144
+ * @param params - The configuration of the requested transaction history
145
+ * @param options - Request options
146
+ * @returns Transaction history
147
+ */
146
148
  getTransactionHistory: (params: TransactionAnalyticsRequest, options?: RequestOptions) => Promise<TransactionAnalyticsResponse>;
147
149
  /**
148
- * Get wallet balances
149
- * @param params - The configuration of the requested wallet balances
150
- * @param options - Request options
151
- * @returns Wallet balances
152
- */
150
+ * Get wallet balances
151
+ * @param params - The configuration of the requested wallet balances
152
+ * @param options - Request options
153
+ * @returns Wallet balances
154
+ */
153
155
  getWalletBalances: (walletAddress: string, options?: RequestOptions) => Promise<Record<number, WalletTokenExtended[]>>;
154
156
  /**
155
- * Relay a transaction through the relayer service
156
- * @param params - The configuration for the relay request
157
- * @param options - Request options
158
- * @returns Task ID and transaction link for the relayed transaction
159
- */
157
+ * Relay a transaction through the relayer service
158
+ * @param params - The configuration for the relay request
159
+ * @param options - Request options
160
+ * @returns Task ID and transaction link for the relayed transaction
161
+ */
160
162
  relayTransaction: (params: RelayRequest, options?: RequestOptions) => Promise<RelayResponseData>;
161
163
  /**
162
- * Patch contract calls
163
- * @param params - The configuration for the patch contract calls request
164
- * @param options - Request options
165
- * @returns Patched contract calls
166
- */
164
+ * Patch contract calls
165
+ * @param params - The configuration for the patch contract calls request
166
+ * @param options - Request options
167
+ * @returns Patched contract calls
168
+ */
167
169
  patchContractCalls: (params: PatchCallDataRequest, options?: RequestOptions) => Promise<PatchContractCallsResponse[]>;
168
170
  };
169
171
  declare function actions(client: SDKClient): Actions;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getChains","getConnections","getContractCallsQuote","getGasRecommendation","getNameServiceAddress","getTokens","getTools","getQuote","getRelayedTransactionStatus","getRelayerQuote","getRoutes","getStatus","getStepTransaction","getToken","getTokenBalance","getTokenBalances","getTokenBalancesByChain","getTransactionHistory","getWalletBalances","relayTransaction","patchContractCalls"],"sources":["../../../src/actions/index.ts"],"sourcesContent":["import type {\n ChainId,\n ChainKey,\n ChainsRequest,\n ChainType,\n ConnectionsRequest,\n ConnectionsResponse,\n ContractCallsQuoteRequest,\n ExtendedChain,\n GasRecommendationRequest,\n GasRecommendationResponse,\n LiFiStep,\n PatchCallDataRequest,\n RelayRequest,\n RelayResponseData,\n RelayStatusRequest,\n RelayStatusResponseData,\n RequestOptions,\n RoutesRequest,\n RoutesResponse,\n SignedLiFiStep,\n StatusResponse,\n Token,\n TokenAmount,\n TokenExtended,\n TokensExtendedResponse,\n TokensRequest,\n TokensResponse,\n ToolsRequest,\n ToolsResponse,\n TransactionAnalyticsRequest,\n TransactionAnalyticsResponse,\n WalletTokenExtended,\n} from '@lifi/types'\nimport type {\n GetStatusRequestExtended,\n QuoteRequestFromAmount,\n} from '../types/actions.js'\nimport type { SDKClient } from '../types/core.js'\nimport { getChains } from './getChains.js'\nimport { getConnections } from './getConnections.js'\nimport { getContractCallsQuote } from './getContractCallsQuote.js'\nimport { getGasRecommendation } from './getGasRecommendation.js'\nimport { getNameServiceAddress } from './getNameServiceAddress.js'\nimport { getQuote } from './getQuote.js'\nimport { getRelayedTransactionStatus } from './getRelayedTransactionStatus.js'\nimport { getRelayerQuote } from './getRelayerQuote.js'\nimport { getRoutes } from './getRoutes.js'\nimport { getStatus } from './getStatus.js'\nimport { getStepTransaction } from './getStepTransaction.js'\nimport { getToken } from './getToken.js'\nimport { getTokenBalance } from './getTokenBalance.js'\nimport { getTokenBalances } from './getTokenBalances.js'\nimport { getTokenBalancesByChain } from './getTokenBalancesByChain.js'\nimport { getTokens } from './getTokens.js'\nimport { getTools } from './getTools.js'\nimport { getTransactionHistory } from './getTransactionHistory.js'\nimport { getWalletBalances } from './getWalletBalances.js'\nimport {\n type PatchContractCallsResponse,\n patchContractCalls,\n} from './patchContractCalls.js'\nimport { relayTransaction } from './relayTransaction.js'\n\nexport type Actions = {\n /**\n * Get all available chains\n * @param params - The configuration of the requested chains\n * @param options - Request options\n * @returns A list of all available chains\n */\n getChains: (\n params?: ChainsRequest,\n options?: RequestOptions\n ) => Promise<ExtendedChain[]>\n\n /**\n * Get connections between chains\n * @param params - The configuration of the requested connections\n * @param options - Request options\n * @returns A list of connections\n */\n getConnections: (\n params: ConnectionsRequest,\n options?: RequestOptions\n ) => Promise<ConnectionsResponse>\n\n /**\n * Get a quote for contract calls\n * @param params - The configuration of the requested contract calls quote\n * @param options - Request options\n * @returns Quote for contract calls\n */\n getContractCallsQuote: (\n params: ContractCallsQuoteRequest,\n options?: RequestOptions\n ) => Promise<LiFiStep>\n\n /**\n * Get gas recommendation for a chain\n * @param params - The configuration of the requested gas recommendation\n * @param options - Request options\n * @returns Gas recommendation\n */\n getGasRecommendation: (\n params: GasRecommendationRequest,\n options?: RequestOptions\n ) => Promise<GasRecommendationResponse>\n\n /**\n * Get the address of a name service\n * @param name - The name to resolve\n * @param chainType - The chain type to resolve the name on\n * @returns The address of the name service\n */\n getNameServiceAddress: (\n name: string,\n chainType?: ChainType\n ) => Promise<string | undefined>\n\n /**\n * Get a quote for a token transfer\n * @param params - The configuration of the requested quote\n * @param options - Request options\n * @returns Quote for a token transfer\n */\n getQuote: (\n params: Parameters<typeof getQuote>[1],\n options?: RequestOptions\n ) => Promise<LiFiStep>\n\n /**\n * Get the status of a relayed transaction\n * @param params - The configuration of the requested relay status\n * @param options - Request options\n * @returns Status of the relayed transaction\n */\n getRelayedTransactionStatus: (\n params: RelayStatusRequest,\n options?: RequestOptions\n ) => Promise<RelayStatusResponseData>\n\n /**\n * Get a quote from a relayer\n * @param params - The configuration of the requested relayer quote\n * @param options - Request options\n * @returns Quote from a relayer\n */\n getRelayerQuote: (\n params: QuoteRequestFromAmount,\n options?: RequestOptions\n ) => Promise<LiFiStep>\n\n /**\n * Get a set of routes for a request that describes a transfer of tokens\n * @param params - A description of the transfer\n * @param options - Request options\n * @returns The resulting routes that can be used to realize the described transfer\n */\n getRoutes: (\n params: RoutesRequest,\n options?: RequestOptions\n ) => Promise<RoutesResponse>\n\n /**\n * Get the status of a transaction\n * @param params - The configuration of the requested status\n * @param options - Request options\n * @returns Status of the transaction\n */\n getStatus: (\n params: GetStatusRequestExtended,\n options?: RequestOptions\n ) => Promise<StatusResponse>\n\n /**\n * Get a step transaction\n * @param params - The configuration of the requested step transaction\n * @param options - Request options\n * @returns Step transaction\n */\n getStepTransaction: (\n params: LiFiStep | SignedLiFiStep,\n options?: RequestOptions\n ) => Promise<LiFiStep>\n\n /**\n * Get a specific token\n * @param chain - Id or key of the chain that contains the token\n * @param token - Address or symbol of the token on the requested chain\n * @param options - Request options\n * @returns Token information\n */\n getToken: (\n chain: ChainKey | ChainId,\n token: string,\n options?: RequestOptions\n ) => Promise<TokenExtended>\n\n /**\n * Get token balance for a specific token\n * @param walletAddress - A wallet address\n * @param token - A Token object\n * @returns Token balance\n */\n getTokenBalance: (\n walletAddress: string,\n token: Token\n ) => Promise<TokenAmount | null>\n\n /**\n * Get token balances for multiple tokens\n * @param walletAddress - A wallet address\n * @param tokens - A list of Token objects\n * @returns Token balances\n */\n getTokenBalances: (\n walletAddress: string,\n tokens: Token[]\n ) => Promise<TokenAmount[]>\n\n /**\n * Get token balances by chain\n * @param walletAddress - A wallet address\n * @param tokensByChain - A list of token objects organized by chain ids\n * @returns Token balances by chain\n */\n getTokenBalancesByChain: (\n walletAddress: string,\n tokensByChain: { [chainId: number]: Token[] }\n ) => Promise<{\n [chainId: number]: TokenAmount[]\n }>\n\n /**\n * Get all available tokens\n * @param params - The configuration of the requested tokens\n * @param options - Request options\n * @returns A list of all available tokens\n */\n getTokens: {\n (\n params?: TokensRequest & { extended?: false | undefined },\n options?: RequestOptions\n ): Promise<TokensResponse>\n (\n params: TokensRequest & { extended: true },\n options?: RequestOptions\n ): Promise<TokensExtendedResponse>\n }\n\n /**\n * Get all available tools (bridges and exchanges)\n * @param params - The configuration of the requested tools\n * @param options - Request options\n * @returns A list of all available tools\n */\n getTools: (\n params?: ToolsRequest,\n options?: RequestOptions\n ) => Promise<ToolsResponse>\n\n /**\n * Get transaction history\n * @param params - The configuration of the requested transaction history\n * @param options - Request options\n * @returns Transaction history\n */\n getTransactionHistory: (\n params: TransactionAnalyticsRequest,\n options?: RequestOptions\n ) => Promise<TransactionAnalyticsResponse>\n\n /**\n * Get wallet balances\n * @param params - The configuration of the requested wallet balances\n * @param options - Request options\n * @returns Wallet balances\n */\n getWalletBalances: (\n walletAddress: string,\n options?: RequestOptions\n ) => Promise<Record<number, WalletTokenExtended[]>>\n\n /**\n * Relay a transaction through the relayer service\n * @param params - The configuration for the relay request\n * @param options - Request options\n * @returns Task ID and transaction link for the relayed transaction\n */\n relayTransaction: (\n params: RelayRequest,\n options?: RequestOptions\n ) => Promise<RelayResponseData>\n\n /**\n * Patch contract calls\n * @param params - The configuration for the patch contract calls request\n * @param options - Request options\n * @returns Patched contract calls\n */\n patchContractCalls: (\n params: PatchCallDataRequest,\n options?: RequestOptions\n ) => Promise<PatchContractCallsResponse[]>\n}\n\nexport function actions(client: SDKClient): Actions {\n return {\n getChains: (params, options) => getChains(client, params, options),\n getConnections: (params, options) =>\n getConnections(client, params, options),\n getContractCallsQuote: (params, options) =>\n getContractCallsQuote(client, params, options),\n getGasRecommendation: (params, options) =>\n getGasRecommendation(client, params, options),\n getNameServiceAddress: (name, chainType) =>\n getNameServiceAddress(client, name, chainType),\n getTokens: (params, options) => getTokens(client, params as any, options),\n getTools: (params, options) => getTools(client, params, options),\n getQuote: (params, options) => getQuote(client, params, options),\n getRelayedTransactionStatus: (params, options) =>\n getRelayedTransactionStatus(client, params, options),\n getRelayerQuote: (params, options) =>\n getRelayerQuote(client, params, options),\n getRoutes: (params, options) => getRoutes(client, params, options),\n getStatus: (params, options) => getStatus(client, params, options),\n getStepTransaction: (params, options) =>\n getStepTransaction(client, params, options),\n getToken: (chain, token, options) =>\n getToken(client, chain, token, options),\n getTokenBalance: (walletAddress, token) =>\n getTokenBalance(client, walletAddress, token),\n getTokenBalances: (walletAddress, tokens) =>\n getTokenBalances(client, walletAddress, tokens),\n getTokenBalancesByChain: (walletAddress, tokensByChain) =>\n getTokenBalancesByChain(client, walletAddress, tokensByChain),\n getTransactionHistory: (params, options) =>\n getTransactionHistory(client, params, options),\n getWalletBalances: (walletAddress, options) =>\n getWalletBalances(client, walletAddress, options),\n relayTransaction: (params, options) =>\n relayTransaction(client, params, options),\n patchContractCalls: (params, options) =>\n patchContractCalls(client, params, options),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmTA,SAAgB,QAAQ,QAA4B;CAClD,OAAO;EACL,YAAY,QAAQ,YAAYA,0BAAAA,UAAU,QAAQ,QAAQ,OAAO;EACjE,iBAAiB,QAAQ,YACvBC,+BAAAA,eAAe,QAAQ,QAAQ,OAAO;EACxC,wBAAwB,QAAQ,YAC9BC,sCAAAA,sBAAsB,QAAQ,QAAQ,OAAO;EAC/C,uBAAuB,QAAQ,YAC7BC,qCAAAA,qBAAqB,QAAQ,QAAQ,OAAO;EAC9C,wBAAwB,MAAM,cAC5BC,sCAAAA,sBAAsB,QAAQ,MAAM,SAAS;EAC/C,YAAY,QAAQ,YAAYC,0BAAAA,UAAU,QAAQ,QAAe,OAAO;EACxE,WAAW,QAAQ,YAAYC,yBAAAA,SAAS,QAAQ,QAAQ,OAAO;EAC/D,WAAW,QAAQ,YAAYC,yBAAAA,SAAS,QAAQ,QAAQ,OAAO;EAC/D,8BAA8B,QAAQ,YACpCC,4CAAAA,4BAA4B,QAAQ,QAAQ,OAAO;EACrD,kBAAkB,QAAQ,YACxBC,gCAAAA,gBAAgB,QAAQ,QAAQ,OAAO;EACzC,YAAY,QAAQ,YAAYC,0BAAAA,UAAU,QAAQ,QAAQ,OAAO;EACjE,YAAY,QAAQ,YAAYC,0BAAAA,UAAU,QAAQ,QAAQ,OAAO;EACjE,qBAAqB,QAAQ,YAC3BC,mCAAAA,mBAAmB,QAAQ,QAAQ,OAAO;EAC5C,WAAW,OAAO,OAAO,YACvBC,yBAAAA,SAAS,QAAQ,OAAO,OAAO,OAAO;EACxC,kBAAkB,eAAe,UAC/BC,gCAAAA,gBAAgB,QAAQ,eAAe,KAAK;EAC9C,mBAAmB,eAAe,WAChCC,iCAAAA,iBAAiB,QAAQ,eAAe,MAAM;EAChD,0BAA0B,eAAe,kBACvCC,wCAAAA,wBAAwB,QAAQ,eAAe,aAAa;EAC9D,wBAAwB,QAAQ,YAC9BC,sCAAAA,sBAAsB,QAAQ,QAAQ,OAAO;EAC/C,oBAAoB,eAAe,YACjCC,kCAAAA,kBAAkB,QAAQ,eAAe,OAAO;EAClD,mBAAmB,QAAQ,YACzBC,iCAAAA,iBAAiB,QAAQ,QAAQ,OAAO;EAC1C,qBAAqB,QAAQ,YAC3BC,mCAAAA,mBAAmB,QAAQ,QAAQ,OAAO;CAC9C;AACF"}
1
+ {"version":3,"file":"index.js","names":["getChains","getConnections","getContractCallsQuote","getGasRecommendation","getNameServiceAddress","getTokens","getTools","getQuote","getRelayedTransactionStatus","getRelayerQuote","getRoutes","getStatus","getStepTransaction","getToken","getTokenBalance","getTokenBalances","getTokenBalancesByChain","getTransactionHistory","getWalletBalances","relayTransaction","patchContractCalls"],"sources":["../../../src/actions/index.ts"],"sourcesContent":["import type {\n ChainId,\n ChainKey,\n ChainsRequest,\n ChainType,\n ConnectionsRequest,\n ConnectionsResponse,\n ContractCallsQuoteRequest,\n ExtendedChain,\n GasRecommendationRequest,\n GasRecommendationResponse,\n LiFiStep,\n PatchCallDataRequest,\n RelayRequest,\n RelayResponseData,\n RelayStatusRequest,\n RelayStatusResponseData,\n RequestOptions,\n RoutesResponse,\n StatusResponse,\n Token,\n TokenAmount,\n TokenExtended,\n TokensExtendedResponse,\n TokensRequest,\n TokensResponse,\n ToolsRequest,\n ToolsResponse,\n TransactionAnalyticsRequest,\n TransactionAnalyticsResponse,\n WalletTokenExtended,\n} from '@lifi/types'\nimport type {\n GetStatusRequestExtended,\n LiFiStepRequest,\n QuoteRequestFromAmount,\n RoutesRequest,\n} from '../types/actions.js'\nimport type { SDKClient } from '../types/core.js'\nimport { getChains } from './getChains.js'\nimport { getConnections } from './getConnections.js'\nimport { getContractCallsQuote } from './getContractCallsQuote.js'\nimport { getGasRecommendation } from './getGasRecommendation.js'\nimport { getNameServiceAddress } from './getNameServiceAddress.js'\nimport { getQuote } from './getQuote.js'\nimport { getRelayedTransactionStatus } from './getRelayedTransactionStatus.js'\nimport { getRelayerQuote } from './getRelayerQuote.js'\nimport { getRoutes } from './getRoutes.js'\nimport { getStatus } from './getStatus.js'\nimport { getStepTransaction } from './getStepTransaction.js'\nimport { getToken } from './getToken.js'\nimport { getTokenBalance } from './getTokenBalance.js'\nimport { getTokenBalances } from './getTokenBalances.js'\nimport { getTokenBalancesByChain } from './getTokenBalancesByChain.js'\nimport { getTokens } from './getTokens.js'\nimport { getTools } from './getTools.js'\nimport { getTransactionHistory } from './getTransactionHistory.js'\nimport { getWalletBalances } from './getWalletBalances.js'\nimport {\n type PatchContractCallsResponse,\n patchContractCalls,\n} from './patchContractCalls.js'\nimport { relayTransaction } from './relayTransaction.js'\n\nexport type Actions = {\n /**\n * Get all available chains\n * @param params - The configuration of the requested chains\n * @param options - Request options\n * @returns A list of all available chains\n */\n getChains: (\n params?: ChainsRequest,\n options?: RequestOptions\n ) => Promise<ExtendedChain[]>\n\n /**\n * Get connections between chains\n * @param params - The configuration of the requested connections\n * @param options - Request options\n * @returns A list of connections\n */\n getConnections: (\n params: ConnectionsRequest,\n options?: RequestOptions\n ) => Promise<ConnectionsResponse>\n\n /**\n * Get a quote for contract calls\n * @param params - The configuration of the requested contract calls quote\n * @param options - Request options\n * @returns Quote for contract calls\n */\n getContractCallsQuote: (\n params: ContractCallsQuoteRequest,\n options?: RequestOptions\n ) => Promise<LiFiStep>\n\n /**\n * Get gas recommendation for a chain\n * @param params - The configuration of the requested gas recommendation\n * @param options - Request options\n * @returns Gas recommendation\n */\n getGasRecommendation: (\n params: GasRecommendationRequest,\n options?: RequestOptions\n ) => Promise<GasRecommendationResponse>\n\n /**\n * Get the address of a name service\n * @param name - The name to resolve\n * @param chainType - The chain type to resolve the name on\n * @returns The address of the name service\n */\n getNameServiceAddress: (\n name: string,\n chainType?: ChainType\n ) => Promise<string | undefined>\n\n /**\n * Get a quote for a token transfer\n * @param params - The configuration of the requested quote\n * @param options - Request options\n * @returns Quote for a token transfer\n */\n getQuote: (\n params: Parameters<typeof getQuote>[1],\n options?: RequestOptions\n ) => Promise<LiFiStep>\n\n /**\n * Get the status of a relayed transaction\n * @param params - The configuration of the requested relay status\n * @param options - Request options\n * @returns Status of the relayed transaction\n */\n getRelayedTransactionStatus: (\n params: RelayStatusRequest,\n options?: RequestOptions\n ) => Promise<RelayStatusResponseData>\n\n /**\n * Get a quote from a relayer\n * @param params - The configuration of the requested relayer quote\n * @param options - Request options\n * @returns Quote from a relayer\n */\n getRelayerQuote: (\n params: QuoteRequestFromAmount,\n options?: RequestOptions\n ) => Promise<LiFiStep>\n\n /**\n * Get a set of routes for a request that describes a transfer of tokens.\n * Optional limit-order fields (`toAmount`, `validUntil`, `partiallyFillable`)\n * may be supplied and are resolved on the backend.\n * @param params - A description of the transfer\n * @param options - Request options\n * @returns The resulting routes that can be used to realize the described transfer\n */\n getRoutes: (\n params: RoutesRequest,\n options?: RequestOptions\n ) => Promise<RoutesResponse>\n\n /**\n * Get the status of a transaction\n * @param params - The configuration of the requested status\n * @param options - Request options\n * @returns Status of the transaction\n */\n getStatus: (\n params: GetStatusRequestExtended,\n options?: RequestOptions\n ) => Promise<StatusResponse>\n\n /**\n * Get a step transaction. The step's `action` may carry the optional\n * limit-order fields, which are resolved on the backend.\n * @param params - The configuration of the requested step transaction\n * @param options - Request options\n * @returns Step transaction\n */\n getStepTransaction: (\n params: LiFiStepRequest,\n options?: RequestOptions\n ) => Promise<LiFiStep>\n\n /**\n * Get a specific token\n * @param chain - Id or key of the chain that contains the token\n * @param token - Address or symbol of the token on the requested chain\n * @param options - Request options\n * @returns Token information\n */\n getToken: (\n chain: ChainKey | ChainId,\n token: string,\n options?: RequestOptions\n ) => Promise<TokenExtended>\n\n /**\n * Get token balance for a specific token\n * @param walletAddress - A wallet address\n * @param token - A Token object\n * @returns Token balance\n */\n getTokenBalance: (\n walletAddress: string,\n token: Token\n ) => Promise<TokenAmount | null>\n\n /**\n * Get token balances for multiple tokens\n * @param walletAddress - A wallet address\n * @param tokens - A list of Token objects\n * @returns Token balances\n */\n getTokenBalances: (\n walletAddress: string,\n tokens: Token[]\n ) => Promise<TokenAmount[]>\n\n /**\n * Get token balances by chain\n * @param walletAddress - A wallet address\n * @param tokensByChain - A list of token objects organized by chain ids\n * @returns Token balances by chain\n */\n getTokenBalancesByChain: (\n walletAddress: string,\n tokensByChain: { [chainId: number]: Token[] }\n ) => Promise<{\n [chainId: number]: TokenAmount[]\n }>\n\n /**\n * Get all available tokens\n * @param params - The configuration of the requested tokens\n * @param options - Request options\n * @returns A list of all available tokens\n */\n getTokens: {\n (\n params?: TokensRequest & { extended?: false | undefined },\n options?: RequestOptions\n ): Promise<TokensResponse>\n (\n params: TokensRequest & { extended: true },\n options?: RequestOptions\n ): Promise<TokensExtendedResponse>\n }\n\n /**\n * Get all available tools (bridges and exchanges)\n * @param params - The configuration of the requested tools\n * @param options - Request options\n * @returns A list of all available tools\n */\n getTools: (\n params?: ToolsRequest,\n options?: RequestOptions\n ) => Promise<ToolsResponse>\n\n /**\n * Get transaction history\n * @param params - The configuration of the requested transaction history\n * @param options - Request options\n * @returns Transaction history\n */\n getTransactionHistory: (\n params: TransactionAnalyticsRequest,\n options?: RequestOptions\n ) => Promise<TransactionAnalyticsResponse>\n\n /**\n * Get wallet balances\n * @param params - The configuration of the requested wallet balances\n * @param options - Request options\n * @returns Wallet balances\n */\n getWalletBalances: (\n walletAddress: string,\n options?: RequestOptions\n ) => Promise<Record<number, WalletTokenExtended[]>>\n\n /**\n * Relay a transaction through the relayer service\n * @param params - The configuration for the relay request\n * @param options - Request options\n * @returns Task ID and transaction link for the relayed transaction\n */\n relayTransaction: (\n params: RelayRequest,\n options?: RequestOptions\n ) => Promise<RelayResponseData>\n\n /**\n * Patch contract calls\n * @param params - The configuration for the patch contract calls request\n * @param options - Request options\n * @returns Patched contract calls\n */\n patchContractCalls: (\n params: PatchCallDataRequest,\n options?: RequestOptions\n ) => Promise<PatchContractCallsResponse[]>\n}\n\nexport function actions(client: SDKClient): Actions {\n return {\n getChains: (params, options) => getChains(client, params, options),\n getConnections: (params, options) =>\n getConnections(client, params, options),\n getContractCallsQuote: (params, options) =>\n getContractCallsQuote(client, params, options),\n getGasRecommendation: (params, options) =>\n getGasRecommendation(client, params, options),\n getNameServiceAddress: (name, chainType) =>\n getNameServiceAddress(client, name, chainType),\n getTokens: (params, options) => getTokens(client, params as any, options),\n getTools: (params, options) => getTools(client, params, options),\n getQuote: (params, options) => getQuote(client, params, options),\n getRelayedTransactionStatus: (params, options) =>\n getRelayedTransactionStatus(client, params, options),\n getRelayerQuote: (params, options) =>\n getRelayerQuote(client, params, options),\n getRoutes: (params, options) => getRoutes(client, params, options),\n getStatus: (params, options) => getStatus(client, params, options),\n getStepTransaction: (params, options) =>\n getStepTransaction(client, params, options),\n getToken: (chain, token, options) =>\n getToken(client, chain, token, options),\n getTokenBalance: (walletAddress, token) =>\n getTokenBalance(client, walletAddress, token),\n getTokenBalances: (walletAddress, tokens) =>\n getTokenBalances(client, walletAddress, tokens),\n getTokenBalancesByChain: (walletAddress, tokensByChain) =>\n getTokenBalancesByChain(client, walletAddress, tokensByChain),\n getTransactionHistory: (params, options) =>\n getTransactionHistory(client, params, options),\n getWalletBalances: (walletAddress, options) =>\n getWalletBalances(client, walletAddress, options),\n relayTransaction: (params, options) =>\n relayTransaction(client, params, options),\n patchContractCalls: (params, options) =>\n patchContractCalls(client, params, options),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsTA,SAAgB,QAAQ,QAA4B;CAClD,OAAO;EACL,YAAY,QAAQ,YAAYA,0BAAAA,UAAU,QAAQ,QAAQ,OAAO;EACjE,iBAAiB,QAAQ,YACvBC,+BAAAA,eAAe,QAAQ,QAAQ,OAAO;EACxC,wBAAwB,QAAQ,YAC9BC,sCAAAA,sBAAsB,QAAQ,QAAQ,OAAO;EAC/C,uBAAuB,QAAQ,YAC7BC,qCAAAA,qBAAqB,QAAQ,QAAQ,OAAO;EAC9C,wBAAwB,MAAM,cAC5BC,sCAAAA,sBAAsB,QAAQ,MAAM,SAAS;EAC/C,YAAY,QAAQ,YAAYC,0BAAAA,UAAU,QAAQ,QAAe,OAAO;EACxE,WAAW,QAAQ,YAAYC,yBAAAA,SAAS,QAAQ,QAAQ,OAAO;EAC/D,WAAW,QAAQ,YAAYC,yBAAAA,SAAS,QAAQ,QAAQ,OAAO;EAC/D,8BAA8B,QAAQ,YACpCC,4CAAAA,4BAA4B,QAAQ,QAAQ,OAAO;EACrD,kBAAkB,QAAQ,YACxBC,gCAAAA,gBAAgB,QAAQ,QAAQ,OAAO;EACzC,YAAY,QAAQ,YAAYC,0BAAAA,UAAU,QAAQ,QAAQ,OAAO;EACjE,YAAY,QAAQ,YAAYC,0BAAAA,UAAU,QAAQ,QAAQ,OAAO;EACjE,qBAAqB,QAAQ,YAC3BC,mCAAAA,mBAAmB,QAAQ,QAAQ,OAAO;EAC5C,WAAW,OAAO,OAAO,YACvBC,yBAAAA,SAAS,QAAQ,OAAO,OAAO,OAAO;EACxC,kBAAkB,eAAe,UAC/BC,gCAAAA,gBAAgB,QAAQ,eAAe,KAAK;EAC9C,mBAAmB,eAAe,WAChCC,iCAAAA,iBAAiB,QAAQ,eAAe,MAAM;EAChD,0BAA0B,eAAe,kBACvCC,wCAAAA,wBAAwB,QAAQ,eAAe,aAAa;EAC9D,wBAAwB,QAAQ,YAC9BC,sCAAAA,sBAAsB,QAAQ,QAAQ,OAAO;EAC/C,oBAAoB,eAAe,YACjCC,kCAAAA,kBAAkB,QAAQ,eAAe,OAAO;EAClD,mBAAmB,QAAQ,YACzBC,iCAAAA,iBAAiB,QAAQ,QAAQ,OAAO;EAC1C,qBAAqB,QAAQ,YAC3BC,mCAAAA,mBAAmB,QAAQ,QAAQ,OAAO;CAC9C;AACF"}
@@ -1,6 +1,5 @@
1
1
  import { SDKClient } from "../types/core.js";
2
2
  import { PatchCallDataRequest, RequestOptions } from "@lifi/types";
3
-
4
3
  //#region src/actions/patchContractCalls.d.ts
5
4
  interface PatchContractCallsResponse {
6
5
  target: string;
@@ -1,15 +1,14 @@
1
1
  import { SDKClient } from "../types/core.js";
2
2
  import { RelayRequest, RelayResponseData, RequestOptions } from "@lifi/types";
3
-
4
3
  //#region src/actions/relayTransaction.d.ts
5
4
  /**
6
- * Relay a transaction through the relayer service
7
- * @param client - The SDK client
8
- * @param params - The configuration for the relay request
9
- * @param options - Request options
10
- * @throws {LiFiError} - Throws a LiFiError if request fails
11
- * @returns Task ID and transaction link for the relayed transaction
12
- */
5
+ * Relay a transaction through the relayer service
6
+ * @param client - The SDK client
7
+ * @param params - The configuration for the relay request
8
+ * @param options - Request options
9
+ * @throws {LiFiError} - Throws a LiFiError if request fails
10
+ * @returns Task ID and transaction link for the relayed transaction
11
+ */
13
12
  declare const relayTransaction: (client: SDKClient, params: RelayRequest, options?: RequestOptions) => Promise<RelayResponseData>;
14
13
  //#endregion
15
14
  export { relayTransaction };
@@ -1,5 +1,4 @@
1
1
  import { SDKClient, SDKConfig } from "../types/core.js";
2
-
3
2
  //#region src/client/createClient.d.ts
4
3
  declare function createClient(options: SDKConfig): SDKClient;
5
4
  //#endregion
@@ -1,6 +1,5 @@
1
1
  import { RPCUrls, SDKBaseConfig } from "../types/core.js";
2
2
  import { ExtendedChain } from "@lifi/types";
3
-
4
3
  //#region src/client/getClientStorage.d.ts
5
4
  interface ClientStorage {
6
5
  readonly needReset: boolean;
@@ -1,5 +1,4 @@
1
1
  import { StepExecutorContext, TaskResult } from "../types/execution.js";
2
-
3
2
  //#region src/core/BaseStepExecutionTask.d.ts
4
3
  declare abstract class BaseStepExecutionTask {
5
4
  shouldRun(_context: StepExecutorContext): Promise<boolean>;
@@ -4,7 +4,6 @@ import { StepExecutorBaseContext, StepExecutorContext } from "../types/execution
4
4
  import { ExecuteStepRetryError } from "../errors/errors.js";
5
5
  import { SDKError } from "../errors/SDKError.js";
6
6
  import { TaskPipeline } from "./TaskPipeline.js";
7
-
8
7
  //#region src/core/BaseStepExecutor.d.ts
9
8
  declare abstract class BaseStepExecutor implements StepExecutor {
10
9
  protected executionOptions?: ExecutionOptions;
@@ -1,6 +1,5 @@
1
1
  import { Execution, ExecutionAction, ExecutionActionStatus, ExecutionActionType, LiFiStepExtended } from "../types/core.js";
2
2
  import { ChainId, LiFiStep } from "@lifi/types";
3
-
4
3
  //#region src/core/StatusManager.d.ts
5
4
  type ActionProps = {
6
5
  step: LiFiStepExtended;
@@ -9,69 +8,59 @@ type ActionProps = {
9
8
  status: ExecutionActionStatus;
10
9
  };
11
10
  /**
12
- * Manages status updates of a route and provides various functions for tracking actions.
13
- */
11
+ * Manages status updates of a route and provides various functions for tracking actions.
12
+ */
14
13
  declare class StatusManager {
15
14
  private readonly routeId;
16
15
  private shouldUpdate;
17
16
  constructor(routeId: string);
18
17
  /**
19
- * Initializes the execution object of a Step.
20
- * @param step The current step in execution
21
- * @returns The initialized execution object for this step
22
- */
18
+ * Initializes the execution object of a Step.
19
+ * @param step The current step in execution
20
+ * @returns The initialized execution object for this step
21
+ */
23
22
  initializeExecution: (step: LiFiStepExtended) => Execution;
24
23
  /**
25
- * Updates the execution object of a Step.
26
- * @param step The current step in execution
27
- * @param execution Partial execution data to merge
28
- * @returns The step with the updated execution object
29
- */
24
+ * Updates the execution object of a Step.
25
+ * @param step The current step in execution
26
+ * @param execution Partial execution data to merge
27
+ * @returns The step with the updated execution object
28
+ */
30
29
  updateExecution(step: LiFiStepExtended, execution: Partial<Execution>): LiFiStep;
31
30
  /**
32
- * Finds an action of the specified type in the step's execution
33
- * @param step The step to search in
34
- * @param type The action type to find
35
- * @returns The found action or undefined if not found
36
- */
31
+ * Finds an action of the specified type in the step's execution
32
+ * @param step The step to search in
33
+ * @param type The action type to find
34
+ * @returns The found action or undefined if not found
35
+ */
37
36
  findAction(step: LiFiStepExtended, type: ExecutionActionType): ExecutionAction | undefined;
38
37
  /**
39
- * Create and push a new action into the execution.
40
- * Caller is responsible for ensuring an action of this type does not already exist.
41
- * @param step The step that should contain the new action.
42
- * @param type Type of the action.
43
- * @param chainId Chain Id of the action.
44
- * @param status The initial status for the new action.
45
- * @returns The created action.
46
- */
47
- createAction: ({
48
- step,
49
- type,
50
- chainId,
51
- status
52
- }: ActionProps) => ExecutionAction;
38
+ * Create and push a new action into the execution.
39
+ * Caller is responsible for ensuring an action of this type does not already exist.
40
+ * @param step The step that should contain the new action.
41
+ * @param type Type of the action.
42
+ * @param chainId Chain Id of the action.
43
+ * @param status The initial status for the new action.
44
+ * @returns The created action.
45
+ */
46
+ createAction: ({ step, type, chainId, status }: ActionProps) => ExecutionAction;
53
47
  /**
54
- * Find an existing action by type and update it, or create a new one if none exists.
55
- * @param step The step that should contain the action.
56
- * @param type Type of the action. Used to identify already existing actions.
57
- * @param chainId Chain Id of the action (used when creating).
58
- * @param status The status to set on the found or newly created action.
59
- * @returns The updated or newly created action.
60
- */
61
- initializeAction: ({
62
- step,
63
- type,
64
- chainId,
65
- status
66
- }: ActionProps) => ExecutionAction;
48
+ * Find an existing action by type and update it, or create a new one if none exists.
49
+ * @param step The step that should contain the action.
50
+ * @param type Type of the action. Used to identify already existing actions.
51
+ * @param chainId Chain Id of the action (used when creating).
52
+ * @param status The status to set on the found or newly created action.
53
+ * @returns The updated or newly created action.
54
+ */
55
+ initializeAction: ({ step, type, chainId, status }: ActionProps) => ExecutionAction;
67
56
  /**
68
- * Update an action object.
69
- * @param step The step where the action should be updated
70
- * @param type The action type to update
71
- * @param status The status the action gets.
72
- * @param [params] Additional parameters to append to the action.
73
- * @returns The updated action
74
- */
57
+ * Update an action object.
58
+ * @param step The step where the action should be updated
59
+ * @param type The action type to update
60
+ * @param status The status the action gets.
61
+ * @param [params] Additional parameters to append to the action.
62
+ * @returns The updated action
63
+ */
75
64
  updateAction: (step: LiFiStepExtended, type: ExecutionActionType, status: ExecutionActionStatus, params?: Partial<ExecutionAction & {
76
65
  signedAt?: number;
77
66
  }>) => ExecutionAction;
@@ -1,6 +1,5 @@
1
1
  import { StepExecutorContext, TaskResult } from "../types/execution.js";
2
2
  import { BaseStepExecutionTask } from "./BaseStepExecutionTask.js";
3
-
4
3
  //#region src/core/TaskPipeline.d.ts
5
4
  declare class TaskPipeline {
6
5
  private readonly tasks;
@@ -1,6 +1,5 @@
1
1
  import { ExecutionActionStatus, ExecutionActionType } from "../types/core.js";
2
2
  import { StatusMessage, Substatus } from "@lifi/types";
3
-
4
3
  //#region src/core/actionMessages.d.ts
5
4
  declare function getActionMessage(type: ExecutionActionType, status: ExecutionActionStatus): string | undefined;
6
5
  declare function getSubstatusMessage(status: StatusMessage, substatus?: Substatus): string | undefined;