@lifi/sdk 2.0.0-beta.5 → 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.
Files changed (47) hide show
  1. package/dist/LiFi.d.ts +8 -2
  2. package/dist/LiFi.js +9 -0
  3. package/dist/allowance/checkAllowance.d.ts +2 -2
  4. package/dist/balance/checkBalance.d.ts +2 -2
  5. package/dist/balance/index.d.ts +1 -1
  6. package/dist/cjs/LiFi.d.ts +8 -2
  7. package/dist/cjs/LiFi.js +11 -1
  8. package/dist/cjs/allowance/checkAllowance.d.ts +2 -2
  9. package/dist/cjs/balance/checkBalance.d.ts +2 -2
  10. package/dist/cjs/balance/index.d.ts +1 -1
  11. package/dist/cjs/execution/StatusManager.d.ts +12 -12
  12. package/dist/cjs/execution/StatusManager.js +5 -5
  13. package/dist/cjs/execution/StepExecutor.d.ts +2 -2
  14. package/dist/cjs/execution/stepComparison.d.ts +2 -2
  15. package/dist/cjs/execution/switchChain.d.ts +2 -2
  16. package/dist/cjs/execution/utils.d.ts +3 -3
  17. package/dist/cjs/helpers.d.ts +0 -4
  18. package/dist/cjs/helpers.js +3 -55
  19. package/dist/cjs/request.d.ts +9 -0
  20. package/dist/cjs/request.js +60 -0
  21. package/dist/cjs/services/ApiService.d.ts +4 -3
  22. package/dist/cjs/services/ApiService.js +45 -28
  23. package/dist/cjs/typeguards.d.ts +2 -2
  24. package/dist/cjs/types/internal.types.d.ts +2 -2
  25. package/dist/cjs/utils/parseError.d.ts +4 -4
  26. package/dist/cjs/utils/utils.d.ts +3 -3
  27. package/dist/cjs/version.d.ts +1 -1
  28. package/dist/cjs/version.js +1 -1
  29. package/dist/execution/StatusManager.d.ts +12 -12
  30. package/dist/execution/StatusManager.js +5 -5
  31. package/dist/execution/StepExecutor.d.ts +2 -2
  32. package/dist/execution/stepComparison.d.ts +2 -2
  33. package/dist/execution/switchChain.d.ts +2 -2
  34. package/dist/execution/utils.d.ts +3 -3
  35. package/dist/helpers.d.ts +0 -4
  36. package/dist/helpers.js +3 -51
  37. package/dist/request.d.ts +9 -0
  38. package/dist/request.js +53 -0
  39. package/dist/services/ApiService.d.ts +4 -3
  40. package/dist/services/ApiService.js +35 -18
  41. package/dist/typeguards.d.ts +2 -2
  42. package/dist/types/internal.types.d.ts +2 -2
  43. package/dist/utils/parseError.d.ts +4 -4
  44. package/dist/utils/utils.d.ts +3 -3
  45. package/dist/version.d.ts +1 -1
  46. package/dist/version.js +1 -1
  47. package/package.json +13 -13
@@ -1,4 +1,4 @@
1
- import { Route, RouteOptions, Step, Token } from '@lifi/types';
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: Step;
21
+ step: LifiStep;
22
22
  statusManager: StatusManager;
23
23
  settings: InternalExecutionSettings;
24
24
  }
@@ -1,4 +1,4 @@
1
- import { Process, Step } from '@lifi/types';
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?: Step, process?: Process) => Promise<string>;
35
- export declare const getTransactionFailedMessage: (step: Step, txLink?: string) => Promise<string>;
36
- export declare const parseError: (e: any, step?: Step, process?: Process) => Promise<LifiError>;
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>;
@@ -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, Step } from '../types';
5
+ import { ChainId } from '../types';
6
6
  export declare const sleep: (mills: number) => Promise<undefined>;
7
- export declare const personalizeStep: (signer: Signer, step: Step) => Promise<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.5";
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.5';
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.5",
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,34 +76,34 @@
76
76
  "dependencies": {
77
77
  "@ethersproject/abi": "^5.7.0",
78
78
  "@ethersproject/contracts": "^5.7.0",
79
- "@lifi/types": "^2.5.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.4.4",
85
+ "@commitlint/cli": "^17.5.1",
86
86
  "@commitlint/config-conventional": "^17.4.4",
87
- "@typescript-eslint/eslint-plugin": "^5.55.0",
88
- "@typescript-eslint/parser": "^5.55.0",
89
- "@vitest/coverage-c8": "^0.29.3",
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.36.0",
92
- "eslint-config-prettier": "^8.7.0",
91
+ "eslint": "^8.38.0",
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.0",
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.4",
99
+ "prettier": "^2.8.7",
100
100
  "standard-version": "^9.5.0",
101
101
  "ts-loader": "^9.4.2",
102
- "typescript": "^5.0.2",
103
- "vitest": "^0.29.3"
102
+ "typescript": "^5.0.4",
103
+ "vitest": "^0.30.0"
104
104
  },
105
105
  "directories": {
106
106
  "test": "test"
107
107
  },
108
- "packageManager": "yarn@3.4.1"
108
+ "packageManager": "yarn@3.5.0"
109
109
  }