@lifi/sdk 2.0.0-beta.6 → 2.0.0-beta.7
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/dist/LiFi.d.ts +8 -2
- package/dist/LiFi.js +9 -0
- package/dist/allowance/checkAllowance.d.ts +2 -2
- package/dist/balance/checkBalance.d.ts +2 -2
- package/dist/balance/index.d.ts +1 -1
- package/dist/cjs/LiFi.d.ts +8 -2
- package/dist/cjs/LiFi.js +11 -1
- package/dist/cjs/allowance/checkAllowance.d.ts +2 -2
- package/dist/cjs/balance/checkBalance.d.ts +2 -2
- package/dist/cjs/balance/index.d.ts +1 -1
- package/dist/cjs/execution/StatusManager.d.ts +12 -12
- package/dist/cjs/execution/StatusManager.js +5 -5
- package/dist/cjs/execution/StepExecutor.d.ts +2 -2
- package/dist/cjs/execution/stepComparison.d.ts +2 -2
- package/dist/cjs/execution/switchChain.d.ts +2 -2
- package/dist/cjs/execution/utils.d.ts +3 -3
- package/dist/cjs/helpers.d.ts +0 -4
- package/dist/cjs/helpers.js +3 -55
- package/dist/cjs/request.d.ts +9 -0
- package/dist/cjs/request.js +60 -0
- package/dist/cjs/services/ApiService.d.ts +4 -3
- package/dist/cjs/services/ApiService.js +45 -28
- package/dist/cjs/typeguards.d.ts +2 -2
- package/dist/cjs/types/internal.types.d.ts +2 -2
- package/dist/cjs/utils/parseError.d.ts +4 -4
- package/dist/cjs/utils/utils.d.ts +3 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/execution/StatusManager.d.ts +12 -12
- package/dist/execution/StatusManager.js +5 -5
- package/dist/execution/StepExecutor.d.ts +2 -2
- package/dist/execution/stepComparison.d.ts +2 -2
- package/dist/execution/switchChain.d.ts +2 -2
- package/dist/execution/utils.d.ts +3 -3
- package/dist/helpers.d.ts +0 -4
- package/dist/helpers.js +3 -51
- package/dist/request.d.ts +9 -0
- package/dist/request.js +53 -0
- package/dist/services/ApiService.d.ts +4 -3
- package/dist/services/ApiService.js +35 -18
- package/dist/typeguards.d.ts +2 -2
- package/dist/types/internal.types.d.ts +2 -2
- package/dist/utils/parseError.d.ts +4 -4
- package/dist/utils/utils.d.ts +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Route, RouteOptions,
|
|
1
|
+
import { LifiStep, Route, RouteOptions, Token } from '@lifi/types';
|
|
2
2
|
import BigNumber from 'bignumber.js';
|
|
3
3
|
import { Signer } from 'ethers';
|
|
4
4
|
import { ChainId } from '.';
|
|
@@ -18,7 +18,7 @@ export type ParsedReceipt = {
|
|
|
18
18
|
};
|
|
19
19
|
export interface ExecutionParams {
|
|
20
20
|
signer: Signer;
|
|
21
|
-
step:
|
|
21
|
+
step: LifiStep;
|
|
22
22
|
statusManager: StatusManager;
|
|
23
23
|
settings: InternalExecutionSettings;
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LifiStep, Process } from '@lifi/types';
|
|
2
2
|
import { LifiError } from './errors';
|
|
3
3
|
/**
|
|
4
4
|
* Available MetaMask error codes:
|
|
@@ -31,7 +31,7 @@ import { LifiError } from './errors';
|
|
|
31
31
|
* https://eips.ethereum.org/EIPS/eip-1474#error-codes
|
|
32
32
|
* https://eips.ethereum.org/EIPS/eip-1193#provider-errors
|
|
33
33
|
*/
|
|
34
|
-
export declare const getTransactionNotSentMessage: (step?:
|
|
35
|
-
export declare const getTransactionFailedMessage: (step:
|
|
36
|
-
export declare const parseError: (e: any, step?:
|
|
34
|
+
export declare const getTransactionNotSentMessage: (step?: LifiStep, process?: Process) => Promise<string>;
|
|
35
|
+
export declare const getTransactionFailedMessage: (step: LifiStep, txLink?: string) => Promise<string>;
|
|
36
|
+
export declare const parseError: (e: any, step?: LifiStep, process?: Process) => Promise<LifiError>;
|
|
37
37
|
export declare const parseBackendError: (e: any) => Promise<LifiError>;
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TransactionReceipt } from '@ethersproject/providers';
|
|
2
|
-
import { Token } from '@lifi/types';
|
|
2
|
+
import { LifiStep, Token } from '@lifi/types';
|
|
3
3
|
import BigNumber from 'bignumber.js';
|
|
4
4
|
import { Signer } from 'ethers';
|
|
5
|
-
import { ChainId
|
|
5
|
+
import { ChainId } from '../types';
|
|
6
6
|
export declare const sleep: (mills: number) => Promise<undefined>;
|
|
7
|
-
export declare const personalizeStep: (signer: Signer, step:
|
|
7
|
+
export declare const personalizeStep: (signer: Signer, step: LifiStep) => Promise<LifiStep>;
|
|
8
8
|
export declare const splitListIntoChunks: <T>(list: T[], chunkSize: number) => T[][];
|
|
9
9
|
export declare const formatTokenAmountOnly: (token: Token, amount: string | BigNumber | undefined) => string;
|
|
10
10
|
/**
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "@lifi/sdk";
|
|
2
|
-
export declare const version = "2.0.0-beta.
|
|
2
|
+
export declare const version = "2.0.0-beta.7";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = '@lifi/sdk';
|
|
2
|
-
export const version = '2.0.0-beta.
|
|
2
|
+
export const version = '2.0.0-beta.7';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/sdk",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.7",
|
|
4
4
|
"description": "LI.FI Any-to-Any Cross-Chain-Swap SDK",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -76,31 +76,31 @@
|
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@ethersproject/abi": "^5.7.0",
|
|
78
78
|
"@ethersproject/contracts": "^5.7.0",
|
|
79
|
-
"@lifi/types": "^2.
|
|
79
|
+
"@lifi/types": "^3.2.1",
|
|
80
80
|
"bignumber.js": "^9.1.1",
|
|
81
81
|
"eth-rpc-errors": "^4.0.3",
|
|
82
82
|
"ethers": "^5.7.2"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@commitlint/cli": "^17.
|
|
85
|
+
"@commitlint/cli": "^17.5.1",
|
|
86
86
|
"@commitlint/config-conventional": "^17.4.4",
|
|
87
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
88
|
-
"@typescript-eslint/parser": "^5.
|
|
89
|
-
"@vitest/coverage-c8": "^0.
|
|
87
|
+
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
|
88
|
+
"@typescript-eslint/parser": "^5.58.0",
|
|
89
|
+
"@vitest/coverage-c8": "^0.30.0",
|
|
90
90
|
"cross-fetch": "^3.1.5",
|
|
91
|
-
"eslint": "^8.
|
|
91
|
+
"eslint": "^8.38.0",
|
|
92
92
|
"eslint-config-prettier": "^8.8.0",
|
|
93
93
|
"eslint-plugin-prettier": "^4.2.1",
|
|
94
94
|
"husky": "^8.0.3",
|
|
95
|
-
"lint-staged": "^13.2.
|
|
95
|
+
"lint-staged": "^13.2.1",
|
|
96
96
|
"msw": "1.0.1",
|
|
97
97
|
"npm-run-all": "^4.1.5",
|
|
98
98
|
"pinst": "^3.0.0",
|
|
99
|
-
"prettier": "^2.8.
|
|
99
|
+
"prettier": "^2.8.7",
|
|
100
100
|
"standard-version": "^9.5.0",
|
|
101
101
|
"ts-loader": "^9.4.2",
|
|
102
|
-
"typescript": "^5.0.
|
|
103
|
-
"vitest": "^0.
|
|
102
|
+
"typescript": "^5.0.4",
|
|
103
|
+
"vitest": "^0.30.0"
|
|
104
104
|
},
|
|
105
105
|
"directories": {
|
|
106
106
|
"test": "test"
|