@lifi/types 2.1.1 → 2.2.1

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 CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [2.2.1](https://github.com/lifinance/types/compare/v2.2.0...v2.2.1) (2023-03-02)
6
+
7
+ ## [2.2.0](https://github.com/lifinance/types/compare/v2.1.1...v2.2.0) (2023-03-02)
8
+
9
+
10
+ ### Features
11
+
12
+ * add gas suggestion and status types, lifuel icon ([#137](https://github.com/lifinance/types/issues/137)) ([94ae5f2](https://github.com/lifinance/types/commit/94ae5f2a5358e08e2096dddfe79cbad23c94eaff))
13
+ * add protocol icons ([97cf747](https://github.com/lifinance/types/commit/97cf747d3cf8c4704e15dc23ecfd019cd0ed7bd2))
14
+ * deprecate the possibilities endpoint ([#136](https://github.com/lifinance/types/issues/136)) ([53fa193](https://github.com/lifinance/types/commit/53fa193334fc0f929325c3e8f9b3f2c07a52edb7))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * rename gasUp to getGas ([b2dfda9](https://github.com/lifinance/types/commit/b2dfda984e923c74275c99498e6d5818b7447a91))
20
+ * typo ([62981c6](https://github.com/lifinance/types/commit/62981c60254cbe4342129fad88029e5870d30321))
21
+
5
22
  ### [2.1.1](https://github.com/lifinance/types/compare/v2.1.0...v2.1.1) (2023-02-17)
6
23
 
7
24
 
package/dist/api.d.ts CHANGED
@@ -74,12 +74,20 @@ export interface RoutesResponse {
74
74
  errors: ToolError[];
75
75
  }
76
76
  export type PossibilityTopic = 'chains' | 'tokens' | 'bridges' | 'exchanges';
77
+ /**
78
+ * We don't want to support this endpoint anymore in the future. /chains, /tools, /connections, and /tokens should be used instead
79
+ * @deprecated
80
+ */
77
81
  export interface PossibilitiesRequest {
78
82
  chains?: number[];
79
83
  bridges?: AllowDenyPrefer;
80
84
  exchanges?: AllowDenyPrefer;
81
85
  include?: PossibilityTopic[];
82
86
  }
87
+ /**
88
+ * Should not be accessed via the types package anymore
89
+ * @deprecated
90
+ */
83
91
  export interface PossibilitiesResponse {
84
92
  chains?: Chain[];
85
93
  tokens?: Token[];
@@ -250,4 +258,36 @@ export interface IntegratorWithdrawalRequest {
250
258
  export interface IntegratorWithdrawalTransactionResponse {
251
259
  transactionRequest: TransactionRequest;
252
260
  }
261
+ declare const _LIFuelState: readonly ["PENDING", "DONE", "NOT_FOUND"];
262
+ type LIFuelState = (typeof _LIFuelState)[number];
263
+ export type LIFuelStatusResponse = {
264
+ status: LIFuelState;
265
+ sending?: TransactionInfo;
266
+ receiving?: TransactionInfo;
267
+ };
268
+ export type GasRecommendationRequest = {
269
+ chainId: ChainId;
270
+ fromChain?: ChainId;
271
+ fromToken?: string;
272
+ };
273
+ export type RefetchSourceLIFuelRequest = {
274
+ txHash: string;
275
+ chainId: ChainId;
276
+ };
277
+ export type LIFuelStatusRequest = {
278
+ txHash: string;
279
+ };
280
+ export type RefetchLIFuelRequest = {
281
+ txHash: string;
282
+ chainId: ChainId;
283
+ };
284
+ export type GasRecommendationResponse = {
285
+ available: boolean;
286
+ recommended?: TokenBalance;
287
+ limit?: TokenBalance;
288
+ serviceFee?: TokenBalance;
289
+ fromToken?: Token;
290
+ fromAmount?: string;
291
+ message?: string;
292
+ };
253
293
  export {};
package/dist/api.js CHANGED
@@ -39,3 +39,4 @@ const _SubstatusDone = [
39
39
  ];
40
40
  export const isSubstatusPending = (substatus) => _SubstatusPending.includes(substatus);
41
41
  export const isSubstatusDone = (substatus) => _SubstatusDone.includes(substatus);
42
+ const _LIFuelState = ['PENDING', 'DONE', 'NOT_FOUND'];
package/dist/base.d.ts CHANGED
@@ -198,6 +198,10 @@ export interface ExchangeDefinition {
198
198
  tool: ExchangeTools;
199
199
  chains: number[];
200
200
  }
201
+ /**
202
+ * Should not be accessed via the types package anymore
203
+ * @deprecated
204
+ */
201
205
  export interface BridgeDefinition {
202
206
  tool: BridgeTool;
203
207
  fromChainId: number;
@@ -1,5 +1,5 @@
1
1
  export * from './Chain';
2
+ export * from './chain.utils';
2
3
  export * from './EVMChain';
3
4
  export * from './SolanaChain';
4
5
  export * from './supported.chains';
5
- export * from './chain.utils';
@@ -1,5 +1,5 @@
1
1
  export * from './Chain';
2
+ export * from './chain.utils';
2
3
  export * from './EVMChain';
3
4
  export * from './SolanaChain';
4
5
  export * from './supported.chains';
5
- export * from './chain.utils';
@@ -1198,7 +1198,7 @@ export const supportedEVMChains = [
1198
1198
  coin: CoinKey.ETH,
1199
1199
  id: 59140,
1200
1200
  mainnet: false,
1201
- logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/consensys_skevm_test.png',
1201
+ logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/consensys_zkevm_test.png',
1202
1202
  // multicallAddress: multicallAddresses[ChainId.CZKT], // Not deployed yet
1203
1203
  faucetUrls: ['https://goerli.zkevm.consensys.net/'],
1204
1204
  metamask: {
package/dist/cjs/api.d.ts CHANGED
@@ -74,12 +74,20 @@ export interface RoutesResponse {
74
74
  errors: ToolError[];
75
75
  }
76
76
  export type PossibilityTopic = 'chains' | 'tokens' | 'bridges' | 'exchanges';
77
+ /**
78
+ * We don't want to support this endpoint anymore in the future. /chains, /tools, /connections, and /tokens should be used instead
79
+ * @deprecated
80
+ */
77
81
  export interface PossibilitiesRequest {
78
82
  chains?: number[];
79
83
  bridges?: AllowDenyPrefer;
80
84
  exchanges?: AllowDenyPrefer;
81
85
  include?: PossibilityTopic[];
82
86
  }
87
+ /**
88
+ * Should not be accessed via the types package anymore
89
+ * @deprecated
90
+ */
83
91
  export interface PossibilitiesResponse {
84
92
  chains?: Chain[];
85
93
  tokens?: Token[];
@@ -250,4 +258,36 @@ export interface IntegratorWithdrawalRequest {
250
258
  export interface IntegratorWithdrawalTransactionResponse {
251
259
  transactionRequest: TransactionRequest;
252
260
  }
261
+ declare const _LIFuelState: readonly ["PENDING", "DONE", "NOT_FOUND"];
262
+ type LIFuelState = (typeof _LIFuelState)[number];
263
+ export type LIFuelStatusResponse = {
264
+ status: LIFuelState;
265
+ sending?: TransactionInfo;
266
+ receiving?: TransactionInfo;
267
+ };
268
+ export type GasRecommendationRequest = {
269
+ chainId: ChainId;
270
+ fromChain?: ChainId;
271
+ fromToken?: string;
272
+ };
273
+ export type RefetchSourceLIFuelRequest = {
274
+ txHash: string;
275
+ chainId: ChainId;
276
+ };
277
+ export type LIFuelStatusRequest = {
278
+ txHash: string;
279
+ };
280
+ export type RefetchLIFuelRequest = {
281
+ txHash: string;
282
+ chainId: ChainId;
283
+ };
284
+ export type GasRecommendationResponse = {
285
+ available: boolean;
286
+ recommended?: TokenBalance;
287
+ limit?: TokenBalance;
288
+ serviceFee?: TokenBalance;
289
+ fromToken?: Token;
290
+ fromAmount?: string;
291
+ message?: string;
292
+ };
253
293
  export {};
package/dist/cjs/api.js CHANGED
@@ -44,3 +44,4 @@ const isSubstatusPending = (substatus) => _SubstatusPending.includes(substatus);
44
44
  exports.isSubstatusPending = isSubstatusPending;
45
45
  const isSubstatusDone = (substatus) => _SubstatusDone.includes(substatus);
46
46
  exports.isSubstatusDone = isSubstatusDone;
47
+ const _LIFuelState = ['PENDING', 'DONE', 'NOT_FOUND'];
@@ -198,6 +198,10 @@ export interface ExchangeDefinition {
198
198
  tool: ExchangeTools;
199
199
  chains: number[];
200
200
  }
201
+ /**
202
+ * Should not be accessed via the types package anymore
203
+ * @deprecated
204
+ */
201
205
  export interface BridgeDefinition {
202
206
  tool: BridgeTool;
203
207
  fromChainId: number;
@@ -1,5 +1,5 @@
1
1
  export * from './Chain';
2
+ export * from './chain.utils';
2
3
  export * from './EVMChain';
3
4
  export * from './SolanaChain';
4
5
  export * from './supported.chains';
5
- export * from './chain.utils';
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Chain"), exports);
18
+ __exportStar(require("./chain.utils"), exports);
18
19
  __exportStar(require("./EVMChain"), exports);
19
20
  __exportStar(require("./SolanaChain"), exports);
20
21
  __exportStar(require("./supported.chains"), exports);
21
- __exportStar(require("./chain.utils"), exports);
@@ -1201,7 +1201,7 @@ exports.supportedEVMChains = [
1201
1201
  coin: base_1.CoinKey.ETH,
1202
1202
  id: 59140,
1203
1203
  mainnet: false,
1204
- logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/consensys_skevm_test.png',
1204
+ logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/consensys_zkevm_test.png',
1205
1205
  // multicallAddress: multicallAddresses[ChainId.CZKT], // Not deployed yet
1206
1206
  faucetUrls: ['https://goerli.zkevm.consensys.net/'],
1207
1207
  metamask: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/types",
3
- "version": "2.1.1",
3
+ "version": "2.2.1",
4
4
  "description": "Types for the LI.FI stack",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/index.js",
@@ -73,26 +73,23 @@
73
73
  "ethers": "^5.7.2"
74
74
  },
75
75
  "devDependencies": {
76
- "@commitlint/cli": "^17.2.0",
77
- "@commitlint/config-conventional": "^17.2.0",
78
- "@types/jest": "^29.2.2",
79
- "@typescript-eslint/eslint-plugin": "^5.42.1",
80
- "@typescript-eslint/parser": "^5.42.1",
81
- "eslint": "^8.27.0",
82
- "eslint-config-prettier": "^8.5.0",
76
+ "@commitlint/cli": "^17.4.4",
77
+ "@commitlint/config-conventional": "^17.4.4",
78
+ "@types/jest": "^29.4.0",
79
+ "@typescript-eslint/eslint-plugin": "^5.54.0",
80
+ "@typescript-eslint/parser": "^5.54.0",
81
+ "eslint": "^8.35.0",
82
+ "eslint-config-prettier": "^8.6.0",
83
83
  "eslint-plugin-prettier": "^4.2.1",
84
- "husky": "^8.0.2",
85
- "jest": "^29.3.1",
86
- "lint-staged": ">=13.0.3",
84
+ "husky": "^8.0.3",
85
+ "jest": "^29.4.3",
86
+ "lint-staged": "^13.1.2",
87
87
  "npm-run-all": "^4.1.5",
88
88
  "pinst": "^3.0.0",
89
- "prettier": "^2.7.1",
89
+ "prettier": "^2.8.4",
90
90
  "standard-version": "^9.5.0",
91
- "ts-jest": "^29.0.3",
92
- "ts-loader": "^9.4.1",
93
- "typescript": "^4.8.4",
94
- "webpack": "^5.75.0",
95
- "webpack-cli": "^4.10.0"
91
+ "ts-jest": "^29.0.5",
92
+ "typescript": "^4.9.5"
96
93
  },
97
94
  "directories": {
98
95
  "test": "test"