@lifi/sdk 4.6.1 → 4.7.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.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/actions/getChains.d.ts +2 -3
- package/dist/cjs/actions/getConnections.d.ts +1 -2
- package/dist/cjs/actions/getContractCallsQuote.d.ts +1 -2
- package/dist/cjs/actions/getGasRecommendation.d.ts +1 -2
- package/dist/cjs/actions/getNameServiceAddress.d.ts +1 -2
- package/dist/cjs/actions/getQuote.d.ts +2 -3
- package/dist/cjs/actions/getRelayedTransactionStatus.d.ts +1 -2
- package/dist/cjs/actions/getRelayerQuote.d.ts +1 -2
- package/dist/cjs/actions/getRoutes.d.ts +1 -2
- package/dist/cjs/actions/getStatus.d.ts +1 -2
- package/dist/cjs/actions/getStepTransaction.d.ts +1 -2
- package/dist/cjs/actions/getToken.d.ts +1 -2
- package/dist/cjs/actions/getTokenBalance.d.ts +1 -2
- package/dist/cjs/actions/getTokenBalances.d.ts +1 -2
- package/dist/cjs/actions/getTokenBalancesByChain.d.ts +1 -2
- package/dist/cjs/actions/getTokens.d.ts +2 -3
- package/dist/cjs/actions/getTools.d.ts +1 -2
- package/dist/cjs/actions/getTransactionHistory.d.ts +1 -2
- package/dist/cjs/actions/index.d.ts +2 -3
- package/dist/cjs/actions/patchContractCalls.d.ts +2 -3
- package/dist/cjs/actions/relayTransaction.d.ts +1 -2
- package/dist/cjs/client/createClient.d.ts +1 -2
- package/dist/cjs/client/getClientStorage.d.ts +2 -3
- package/dist/cjs/core/BaseStepExecutionTask.d.ts +1 -2
- package/dist/cjs/core/BaseStepExecutor.d.ts +1 -2
- package/dist/cjs/core/StatusManager.d.ts +1 -2
- package/dist/cjs/core/TaskPipeline.d.ts +1 -2
- package/dist/cjs/core/actionMessages.d.ts +2 -3
- package/dist/cjs/core/execution.d.ts +6 -7
- package/dist/cjs/core/executionState.d.ts +1 -2
- package/dist/cjs/core/prepareRestart.d.ts +1 -2
- package/dist/cjs/core/storage.d.ts +4 -5
- package/dist/cjs/core/tasks/CheckBalanceTask.d.ts +1 -2
- package/dist/cjs/core/tasks/PrepareTransactionTask.d.ts +1 -2
- package/dist/cjs/core/tasks/WaitForTransactionStatusTask.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/checkBalance.d.ts +2 -3
- package/dist/cjs/core/tasks/helpers/getTransactionRequestData.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/stepComparison.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/waitForTransactionStatus.d.ts +1 -2
- package/dist/cjs/core/utils.d.ts +2 -3
- package/dist/cjs/errors/SDKError.d.ts +1 -2
- package/dist/cjs/errors/baseError.d.ts +1 -2
- package/dist/cjs/errors/constants.d.ts +4 -5
- package/dist/cjs/errors/errors.d.ts +8 -9
- package/dist/cjs/errors/httpError.d.ts +1 -2
- package/dist/cjs/errors/utils/baseErrorRootCause.d.ts +2 -3
- package/dist/cjs/errors/utils/rootCause.d.ts +1 -2
- package/dist/cjs/types/actions.d.ts +6 -7
- package/dist/cjs/types/core.d.ts +41 -36
- package/dist/cjs/types/execution.d.ts +4 -5
- package/dist/cjs/types/request.d.ts +1 -2
- package/dist/cjs/utils/checkPackageUpdates.d.ts +1 -2
- package/dist/cjs/utils/checkPackageUpdates.js +1 -1
- package/dist/cjs/utils/convertQuoteToRoute.d.ts +2 -3
- package/dist/cjs/utils/decode.d.ts +1 -2
- package/dist/cjs/utils/fetchTxErrorDetails.d.ts +1 -2
- package/dist/cjs/utils/formatUnits.d.ts +1 -2
- package/dist/cjs/utils/getTransactionMessage.d.ts +1 -2
- package/dist/cjs/utils/isHex.d.ts +2 -3
- package/dist/cjs/utils/isRoutesRequest.d.ts +1 -2
- package/dist/cjs/utils/isStep.d.ts +1 -2
- package/dist/cjs/utils/isToken.d.ts +1 -2
- package/dist/cjs/utils/parseUnits.d.ts +1 -2
- package/dist/cjs/utils/request.d.ts +2 -3
- package/dist/cjs/utils/sleep.d.ts +1 -2
- package/dist/cjs/utils/toQueryString.d.ts +1 -2
- package/dist/cjs/utils/waitForResult.d.ts +1 -2
- package/dist/cjs/utils/withDedupe.d.ts +2 -3
- package/dist/cjs/utils/withTimeout.d.ts +1 -2
- package/dist/cjs/version.d.ts +2 -3
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/actions/getChains.d.ts +2 -3
- package/dist/esm/actions/getChains.d.ts.map +1 -1
- package/dist/esm/actions/getConnections.d.ts +1 -2
- package/dist/esm/actions/getConnections.d.ts.map +1 -1
- package/dist/esm/actions/getContractCallsQuote.d.ts +1 -2
- package/dist/esm/actions/getContractCallsQuote.d.ts.map +1 -1
- package/dist/esm/actions/getGasRecommendation.d.ts +1 -2
- package/dist/esm/actions/getGasRecommendation.d.ts.map +1 -1
- package/dist/esm/actions/getNameServiceAddress.d.ts +1 -2
- package/dist/esm/actions/getNameServiceAddress.d.ts.map +1 -1
- package/dist/esm/actions/getQuote.d.ts +2 -3
- package/dist/esm/actions/getQuote.d.ts.map +1 -1
- package/dist/esm/actions/getRelayedTransactionStatus.d.ts +1 -2
- package/dist/esm/actions/getRelayedTransactionStatus.d.ts.map +1 -1
- package/dist/esm/actions/getRelayerQuote.d.ts +1 -2
- package/dist/esm/actions/getRelayerQuote.d.ts.map +1 -1
- package/dist/esm/actions/getRoutes.d.ts +1 -2
- package/dist/esm/actions/getRoutes.d.ts.map +1 -1
- package/dist/esm/actions/getStatus.d.ts +1 -2
- package/dist/esm/actions/getStatus.d.ts.map +1 -1
- package/dist/esm/actions/getStepTransaction.d.ts +1 -2
- package/dist/esm/actions/getStepTransaction.d.ts.map +1 -1
- package/dist/esm/actions/getToken.d.ts +1 -2
- package/dist/esm/actions/getToken.d.ts.map +1 -1
- package/dist/esm/actions/getTokenBalance.d.ts +1 -2
- package/dist/esm/actions/getTokenBalance.d.ts.map +1 -1
- package/dist/esm/actions/getTokenBalances.d.ts +1 -2
- package/dist/esm/actions/getTokenBalances.d.ts.map +1 -1
- package/dist/esm/actions/getTokenBalancesByChain.d.ts +1 -2
- package/dist/esm/actions/getTokenBalancesByChain.d.ts.map +1 -1
- package/dist/esm/actions/getTokens.d.ts +2 -3
- package/dist/esm/actions/getTokens.d.ts.map +1 -1
- package/dist/esm/actions/getTools.d.ts +1 -2
- package/dist/esm/actions/getTools.d.ts.map +1 -1
- package/dist/esm/actions/getTransactionHistory.d.ts +1 -2
- package/dist/esm/actions/getTransactionHistory.d.ts.map +1 -1
- package/dist/esm/actions/index.d.ts +2 -3
- package/dist/esm/actions/index.d.ts.map +1 -1
- package/dist/esm/actions/patchContractCalls.d.ts +2 -3
- package/dist/esm/actions/patchContractCalls.d.ts.map +1 -1
- package/dist/esm/actions/relayTransaction.d.ts +1 -2
- package/dist/esm/actions/relayTransaction.d.ts.map +1 -1
- package/dist/esm/client/createClient.d.ts +1 -2
- package/dist/esm/client/createClient.d.ts.map +1 -1
- package/dist/esm/client/getClientStorage.d.ts +2 -3
- package/dist/esm/client/getClientStorage.d.ts.map +1 -1
- package/dist/esm/core/BaseStepExecutionTask.d.ts +1 -2
- package/dist/esm/core/BaseStepExecutionTask.d.ts.map +1 -1
- package/dist/esm/core/BaseStepExecutor.d.ts +1 -2
- package/dist/esm/core/BaseStepExecutor.d.ts.map +1 -1
- package/dist/esm/core/StatusManager.d.ts +1 -2
- package/dist/esm/core/StatusManager.d.ts.map +1 -1
- package/dist/esm/core/TaskPipeline.d.ts +1 -2
- package/dist/esm/core/TaskPipeline.d.ts.map +1 -1
- package/dist/esm/core/actionMessages.d.ts +2 -3
- package/dist/esm/core/actionMessages.d.ts.map +1 -1
- package/dist/esm/core/execution.d.ts +6 -7
- package/dist/esm/core/execution.d.ts.map +1 -1
- package/dist/esm/core/executionState.d.ts +1 -2
- package/dist/esm/core/executionState.d.ts.map +1 -1
- package/dist/esm/core/prepareRestart.d.ts +1 -2
- package/dist/esm/core/prepareRestart.d.ts.map +1 -1
- package/dist/esm/core/storage.d.ts +4 -5
- package/dist/esm/core/storage.d.ts.map +1 -1
- package/dist/esm/core/tasks/CheckBalanceTask.d.ts +1 -2
- package/dist/esm/core/tasks/CheckBalanceTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/PrepareTransactionTask.d.ts +1 -2
- package/dist/esm/core/tasks/PrepareTransactionTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/WaitForTransactionStatusTask.d.ts +1 -2
- package/dist/esm/core/tasks/WaitForTransactionStatusTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/checkBalance.d.ts +2 -3
- package/dist/esm/core/tasks/helpers/checkBalance.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/getTransactionRequestData.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/getTransactionRequestData.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/stepComparison.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/stepComparison.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/waitForTransactionStatus.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/waitForTransactionStatus.d.ts.map +1 -1
- package/dist/esm/core/utils.d.ts +2 -3
- package/dist/esm/core/utils.d.ts.map +1 -1
- package/dist/esm/errors/SDKError.d.ts +1 -2
- package/dist/esm/errors/SDKError.d.ts.map +1 -1
- package/dist/esm/errors/baseError.d.ts +1 -2
- package/dist/esm/errors/baseError.d.ts.map +1 -1
- package/dist/esm/errors/constants.d.ts +4 -5
- package/dist/esm/errors/constants.d.ts.map +1 -1
- package/dist/esm/errors/errors.d.ts +8 -9
- package/dist/esm/errors/errors.d.ts.map +1 -1
- package/dist/esm/errors/httpError.d.ts +1 -2
- package/dist/esm/errors/httpError.d.ts.map +1 -1
- package/dist/esm/errors/utils/baseErrorRootCause.d.ts +2 -3
- package/dist/esm/errors/utils/baseErrorRootCause.d.ts.map +1 -1
- package/dist/esm/errors/utils/rootCause.d.ts +1 -2
- package/dist/esm/errors/utils/rootCause.d.ts.map +1 -1
- package/dist/esm/types/actions.d.ts +6 -7
- package/dist/esm/types/actions.d.ts.map +1 -1
- package/dist/esm/types/core.d.ts +41 -36
- package/dist/esm/types/core.d.ts.map +1 -1
- package/dist/esm/types/execution.d.ts +4 -5
- package/dist/esm/types/execution.d.ts.map +1 -1
- package/dist/esm/types/request.d.ts +1 -2
- package/dist/esm/types/request.d.ts.map +1 -1
- package/dist/esm/utils/checkPackageUpdates.d.ts +1 -2
- package/dist/esm/utils/checkPackageUpdates.d.ts.map +1 -1
- package/dist/esm/utils/checkPackageUpdates.js +1 -1
- package/dist/esm/utils/convertQuoteToRoute.d.ts +2 -3
- package/dist/esm/utils/convertQuoteToRoute.d.ts.map +1 -1
- package/dist/esm/utils/decode.d.ts +1 -2
- package/dist/esm/utils/decode.d.ts.map +1 -1
- package/dist/esm/utils/fetchTxErrorDetails.d.ts +1 -2
- package/dist/esm/utils/fetchTxErrorDetails.d.ts.map +1 -1
- package/dist/esm/utils/formatUnits.d.ts +1 -2
- package/dist/esm/utils/formatUnits.d.ts.map +1 -1
- package/dist/esm/utils/getTransactionMessage.d.ts +1 -2
- package/dist/esm/utils/getTransactionMessage.d.ts.map +1 -1
- package/dist/esm/utils/isHex.d.ts +2 -3
- package/dist/esm/utils/isHex.d.ts.map +1 -1
- package/dist/esm/utils/isRoutesRequest.d.ts +1 -2
- package/dist/esm/utils/isRoutesRequest.d.ts.map +1 -1
- package/dist/esm/utils/isStep.d.ts +1 -2
- package/dist/esm/utils/isStep.d.ts.map +1 -1
- package/dist/esm/utils/isToken.d.ts +1 -2
- package/dist/esm/utils/isToken.d.ts.map +1 -1
- package/dist/esm/utils/parseUnits.d.ts +1 -2
- package/dist/esm/utils/parseUnits.d.ts.map +1 -1
- package/dist/esm/utils/request.d.ts +2 -3
- package/dist/esm/utils/request.d.ts.map +1 -1
- package/dist/esm/utils/sleep.d.ts +1 -2
- package/dist/esm/utils/sleep.d.ts.map +1 -1
- package/dist/esm/utils/toQueryString.d.ts +1 -2
- package/dist/esm/utils/toQueryString.d.ts.map +1 -1
- package/dist/esm/utils/waitForResult.d.ts +1 -2
- package/dist/esm/utils/waitForResult.d.ts.map +1 -1
- package/dist/esm/utils/withDedupe.d.ts +2 -3
- package/dist/esm/utils/withDedupe.d.ts.map +1 -1
- package/dist/esm/utils/withTimeout.d.ts +1 -2
- package/dist/esm/utils/withTimeout.d.ts.map +1 -1
- package/dist/esm/version.d.ts +2 -3
- package/dist/esm/version.d.ts.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/package.json +2 -2
- package/src/types/core.ts +6 -0
- package/src/version.ts +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region src/utils/fetchTxErrorDetails.d.ts
|
|
2
|
-
declare const fetchTxErrorDetails: (txHash: string, chainId: number) => Promise<unknown>;
|
|
2
|
+
export declare const fetchTxErrorDetails: (txHash: string, chainId: number) => Promise<unknown>;
|
|
3
3
|
//#endregion
|
|
4
|
-
export { fetchTxErrorDetails };
|
|
5
4
|
//# sourceMappingURL=fetchTxErrorDetails.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchTxErrorDetails.d.ts","names":[],"sources":["../../../src/utils/fetchTxErrorDetails.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"fetchTxErrorDetails.d.ts","names":[],"sources":["../../../src/utils/fetchTxErrorDetails.ts"],"mappings":";qBAAa,sBACX,gBACA,oBACC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Divides a number by a given exponent of base 10 (10exponent), and formats it into a string representation of the number.
|
|
4
4
|
*/
|
|
5
|
-
declare function formatUnits(value: bigint, decimals: number): string;
|
|
5
|
+
export declare function formatUnits(value: bigint, decimals: number): string;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { formatUnits };
|
|
8
7
|
//# sourceMappingURL=formatUnits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatUnits.d.ts","names":[],"sources":["../../../src/utils/formatUnits.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"formatUnits.d.ts","names":[],"sources":["../../../src/utils/formatUnits.ts"],"mappings":";;;;wBAGgB,YAAY,eAAe"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SDKClient } from "../types/core.js";
|
|
2
2
|
import { LiFiStep } from "@lifi/types";
|
|
3
3
|
//#region src/utils/getTransactionMessage.d.ts
|
|
4
|
-
declare const getTransactionFailedMessage: (client: SDKClient, step: LiFiStep, txLink?: string) => Promise<string>;
|
|
4
|
+
export declare const getTransactionFailedMessage: (client: SDKClient, step: LiFiStep, txLink?: string) => Promise<string>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { getTransactionFailedMessage };
|
|
7
6
|
//# sourceMappingURL=getTransactionMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTransactionMessage.d.ts","names":[],"sources":["../../../src/utils/getTransactionMessage.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getTransactionMessage.d.ts","names":[],"sources":["../../../src/utils/getTransactionMessage.ts"],"mappings":";;;qBAGa,8BACX,QAAQ,WACR,MAAM,UACN,oBACC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
//#region src/utils/isHex.d.ts
|
|
2
|
-
type Hex = `0x${string}`;
|
|
3
|
-
declare function isHex(value: unknown, { strict }?: {
|
|
2
|
+
export type Hex = `0x${string}`;
|
|
3
|
+
export declare function isHex(value: unknown, { strict }?: {
|
|
4
4
|
strict?: boolean | undefined;
|
|
5
5
|
}): value is Hex;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { Hex, isHex };
|
|
8
7
|
//# sourceMappingURL=isHex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isHex.d.ts","names":[],"sources":["../../../src/utils/isHex.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"isHex.d.ts","names":[],"sources":["../../../src/utils/isHex.ts"],"mappings":";YAAY;wBAEI,MACd,kBACE;EAAmB;IACpB,SAAS"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { RoutesRequest } from "@lifi/types";
|
|
2
2
|
//#region src/utils/isRoutesRequest.d.ts
|
|
3
|
-
declare const isRoutesRequest: (routesRequest: RoutesRequest) => routesRequest is RoutesRequest;
|
|
3
|
+
export declare const isRoutesRequest: (routesRequest: RoutesRequest) => routesRequest is RoutesRequest;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { isRoutesRequest };
|
|
6
5
|
//# sourceMappingURL=isRoutesRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRoutesRequest.d.ts","names":[],"sources":["../../../src/utils/isRoutesRequest.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"isRoutesRequest.d.ts","names":[],"sources":["../../../src/utils/isRoutesRequest.ts"],"mappings":";;qBAOa,kBACX,eAAe,kBACd,iBAAiB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LiFiStep } from "@lifi/types";
|
|
2
2
|
//#region src/utils/isStep.d.ts
|
|
3
|
-
declare const isStep: (step: LiFiStep) => step is LiFiStep;
|
|
3
|
+
export declare const isStep: (step: LiFiStep) => step is LiFiStep;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { isStep };
|
|
6
5
|
//# sourceMappingURL=isStep.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isStep.d.ts","names":[],"sources":["../../../src/utils/isStep.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"isStep.d.ts","names":[],"sources":["../../../src/utils/isStep.ts"],"mappings":";;qBAiCa,SAAU,MAAM,aAAW,QAAQ"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { StaticToken } from "@lifi/types";
|
|
2
2
|
//#region src/utils/isToken.d.ts
|
|
3
|
-
declare const isToken: (token: StaticToken) => token is StaticToken;
|
|
3
|
+
export declare const isToken: (token: StaticToken) => token is StaticToken;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { isToken };
|
|
6
5
|
//# sourceMappingURL=isToken.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isToken.d.ts","names":[],"sources":["../../../src/utils/isToken.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"isToken.d.ts","names":[],"sources":["../../../src/utils/isToken.ts"],"mappings":";;qBAEa,UAAW,OAAO,gBAAc,SAAS"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Multiplies a string representation of a number by a given exponent of base 10 (10exponent).
|
|
4
4
|
*/
|
|
5
|
-
declare function parseUnits(value: string, decimals: number): bigint;
|
|
5
|
+
export declare function parseUnits(value: string, decimals: number): bigint;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { parseUnits };
|
|
8
7
|
//# sourceMappingURL=parseUnits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseUnits.d.ts","names":[],"sources":["../../../src/utils/parseUnits.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"parseUnits.d.ts","names":[],"sources":["../../../src/utils/parseUnits.ts"],"mappings":";;;;wBAGgB,WAAW,eAAe"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ExtendedRequestInit } from "../types/request.js";
|
|
2
2
|
import { SDKBaseConfig } from "../types/core.js";
|
|
3
3
|
//#region src/utils/request.d.ts
|
|
4
|
-
declare const requestSettings: {
|
|
4
|
+
export declare const requestSettings: {
|
|
5
5
|
retries: number;
|
|
6
6
|
};
|
|
7
|
-
declare const request: <T = Response>(config: SDKBaseConfig, url: RequestInfo | URL, options?: ExtendedRequestInit) => Promise<T>;
|
|
7
|
+
export declare const request: <T = Response>(config: SDKBaseConfig, url: RequestInfo | URL, options?: ExtendedRequestInit) => Promise<T>;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { request, requestSettings };
|
|
10
9
|
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","names":[],"sources":["../../../src/utils/request.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"request.d.ts","names":[],"sources":["../../../src/utils/request.ts"],"mappings":";;;qBAQa;EACX;;qBAUW,UAAiB,IAAI,UAChC,QAAQ,eACR,KAAK,cAAc,KACnB,UAAS,wBAGR,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sleep.d.ts","names":[],"sources":["../../../src/utils/sleep.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"sleep.d.ts","names":[],"sources":["../../../src/utils/sleep.ts"],"mappings":";wBAAgB,MAAM,aAAa"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region src/utils/toQueryString.d.ts
|
|
2
|
-
declare const toQueryString: (params: Record<string, unknown>) => string;
|
|
2
|
+
export declare const toQueryString: (params: Record<string, unknown>) => string;
|
|
3
3
|
//#endregion
|
|
4
|
-
export { toQueryString };
|
|
5
4
|
//# sourceMappingURL=toQueryString.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toQueryString.d.ts","names":[],"sources":["../../../src/utils/toQueryString.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"toQueryString.d.ts","names":[],"sources":["../../../src/utils/toQueryString.ts"],"mappings":";qBA+Ba,gBAAiB,QAAQ"}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* @returns The result of the fn function
|
|
9
9
|
* @throws Error if maximum retries is reached, if function keeps returning undefined, or if shouldRetry returns false
|
|
10
10
|
*/
|
|
11
|
-
declare const waitForResult: <T>(fn: () => Promise<T | undefined>, interval?: number | ((poll: number) => number), maxRetries?: number, shouldRetry?: (count: number, error: unknown) => boolean) => Promise<T>;
|
|
11
|
+
export declare const waitForResult: <T>(fn: () => Promise<T | undefined>, interval?: number | ((poll: number) => number), maxRetries?: number, shouldRetry?: (count: number, error: unknown) => boolean) => Promise<T>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { waitForResult };
|
|
14
13
|
//# sourceMappingURL=waitForResult.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waitForResult.d.ts","names":[],"sources":["../../../src/utils/waitForResult.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"waitForResult.d.ts","names":[],"sources":["../../../src/utils/waitForResult.ts"],"mappings":";;;;;;;;;;qBAWa,gBAAuB,GAClC,UAAU,QAAQ,gBAClB,sBAAqB,0BACrB,qBACA,eAAc,eAAe,+BAC5B,QAAQ"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU
|
|
6
6
|
*/
|
|
7
|
-
declare class LruMap<value = unknown> extends Map<string, value> {
|
|
7
|
+
export declare class LruMap<value = unknown> extends Map<string, value> {
|
|
8
8
|
maxSize: number;
|
|
9
9
|
constructor(size: number);
|
|
10
10
|
override set(key: string, value: value): this;
|
|
@@ -14,7 +14,6 @@ type WithDedupeOptions = {
|
|
|
14
14
|
id?: string | undefined;
|
|
15
15
|
};
|
|
16
16
|
/** Deduplicates in-flight promises. */
|
|
17
|
-
declare function withDedupe<T>(fn: () => Promise<T>, { enabled, id }: WithDedupeOptions): Promise<T>;
|
|
17
|
+
export declare function withDedupe<T>(fn: () => Promise<T>, { enabled, id }: WithDedupeOptions): Promise<T>;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { LruMap, withDedupe };
|
|
20
19
|
//# sourceMappingURL=withDedupe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withDedupe.d.ts","names":[],"sources":["../../../src/utils/withDedupe.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"withDedupe.d.ts","names":[],"sources":["../../../src/utils/withDedupe.ts"],"mappings":";;;;;;qBAKa,OAAO,yBAAyB,YAAY;EACvD;EAEA,YAAY;WAKH,IAAI,aAAa,OAAO;;KAY9B;EACH;EACA;;;wBAIc,WAAW,GACzB,UAAU,QAAQ,MAChB,SAAgB,MAAM,oBACvB,QAAQ"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @param signal - Whether or not the timeout should use an abort signal.
|
|
9
9
|
* @returns The result of the function.
|
|
10
10
|
*/
|
|
11
|
-
declare function withTimeout<T>(fn: ({ signal }: {
|
|
11
|
+
export declare function withTimeout<T>(fn: ({ signal }: {
|
|
12
12
|
signal: AbortController["signal"] | null;
|
|
13
13
|
}) => Promise<T>, { errorInstance, timeout, signal }: {
|
|
14
14
|
errorInstance?: Error | undefined;
|
|
@@ -16,5 +16,4 @@ declare function withTimeout<T>(fn: ({ signal }: {
|
|
|
16
16
|
signal?: boolean | undefined;
|
|
17
17
|
}): Promise<T>;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { withTimeout };
|
|
20
19
|
//# sourceMappingURL=withTimeout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTimeout.d.ts","names":[],"sources":["../../../src/utils/withTimeout.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"withTimeout.d.ts","names":[],"sources":["../../../src/utils/withTimeout.ts"],"mappings":";;;;;;;;;;wBASgB,YAAY,GAC1B,OAAO;EAAY,QAAQ;MAAuC,QAAQ,MAExE,eACA,SACA;EAGA,gBAAgB;EAEhB;EAEA;IAED,QAAQ"}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","names":[],"sources":["../../src/version.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"version.d.ts","names":[],"sources":["../../src/version.ts"],"mappings":";qBAAa;qBACA"}
|
package/dist/esm/version.js
CHANGED
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk'\nexport const version = '4.
|
|
1
|
+
{"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk'\nexport const version = '4.7.0'\n"],"mappings":";AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.0",
|
|
4
4
|
"description": "LI.FI SDK for Any-to-Any Cross-Chain-Swap",
|
|
5
5
|
"homepage": "https://github.com/lifinance/sdk",
|
|
6
6
|
"bugs": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"./package.json": "./package.json"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@lifi/types": "^18.
|
|
31
|
+
"@lifi/types": "^18.5.0"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
package/src/types/core.ts
CHANGED
|
@@ -48,6 +48,12 @@ export type RPCUrls = Partial<Record<ChainId, string[]>>
|
|
|
48
48
|
export interface SDKProvider {
|
|
49
49
|
readonly type: ChainType
|
|
50
50
|
isAddress(address: string): boolean
|
|
51
|
+
/**
|
|
52
|
+
* Validates a token identifier, which several ecosystems shape unlike a
|
|
53
|
+
* wallet address. A provider that omits the method has no token address
|
|
54
|
+
* format, so never fall back to `isAddress`.
|
|
55
|
+
*/
|
|
56
|
+
isTokenAddress?(address: string): boolean
|
|
51
57
|
resolveAddress(
|
|
52
58
|
name: string,
|
|
53
59
|
client: SDKClient,
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = '@lifi/sdk'
|
|
2
|
-
export const version = '4.
|
|
2
|
+
export const version = '4.7.0'
|