@lifi/types 2.2.1 → 2.4.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 CHANGED
@@ -2,6 +2,26 @@
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.4.0](https://github.com/lifinance/types/compare/v2.3.0...v2.4.0) (2023-03-08)
6
+
7
+
8
+ ### Features
9
+
10
+ * partial GetStatusRequest properties -- fromChain and toChain ([132ac7a](https://github.com/lifinance/types/commit/132ac7a3e594b8e272110bccf6c70e00f27e0079))
11
+
12
+ ## [2.3.0](https://github.com/lifinance/types/compare/v2.2.1...v2.3.0) (2023-03-06)
13
+
14
+
15
+ ### Features
16
+
17
+ * move NOT_PROCESSABLE_REFUND_NEEDED to FAILED ([#138](https://github.com/lifinance/types/issues/138)) ([82a1a26](https://github.com/lifinance/types/commit/82a1a261792ad861873ec07631e1903f2ff25f01))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * improve DAI token names ([9c7f35a](https://github.com/lifinance/types/commit/9c7f35ac39563faedffcacf55686b19e26d3c75d))
23
+ * replace outdated gnosis chain rpcs ([376d743](https://github.com/lifinance/types/commit/376d743bb6db24f55acebd1c1eadfd5daad426f0))
24
+
5
25
  ### [2.2.1](https://github.com/lifinance/types/compare/v2.2.0...v2.2.1) (2023-03-02)
6
26
 
7
27
  ## [2.2.0](https://github.com/lifinance/types/compare/v2.1.1...v2.2.0) (2023-03-02)
package/dist/api.d.ts CHANGED
@@ -182,8 +182,8 @@ export interface ConnectionsResponse {
182
182
  export interface GetStatusRequest {
183
183
  txHash: string;
184
184
  bridge?: string;
185
- fromChain: number | string;
186
- toChain: number | string;
185
+ fromChain?: number | string;
186
+ toChain?: number | string;
187
187
  }
188
188
  export interface TransactionInfo {
189
189
  txHash: string;
@@ -199,13 +199,16 @@ export interface TransactionInfo {
199
199
  }
200
200
  declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
201
201
  export type StatusMessage = (typeof _StatusMessage)[number];
202
- declare const _SubstatusPending: readonly ["WAIT_SOURCE_CONFIRMATIONS", "WAIT_DESTINATION_TRANSACTION", "BRIDGE_NOT_AVAILABLE", "CHAIN_NOT_AVAILABLE", "NOT_PROCESSABLE_REFUND_NEEDED", "REFUND_IN_PROGRESS", "UNKNOWN_ERROR"];
202
+ declare const _SubstatusPending: readonly ["WAIT_SOURCE_CONFIRMATIONS", "WAIT_DESTINATION_TRANSACTION", "BRIDGE_NOT_AVAILABLE", "CHAIN_NOT_AVAILABLE", "REFUND_IN_PROGRESS", "UNKNOWN_ERROR"];
203
203
  export type SubstatusPending = (typeof _SubstatusPending)[number];
204
204
  declare const _SubstatusDone: readonly ["COMPLETED", "PARTIAL", "REFUNDED"];
205
205
  export type SubstatusDone = (typeof _SubstatusDone)[number];
206
- export type Substatus = SubstatusPending | SubstatusDone;
207
- export declare const isSubstatusPending: (substatus: Substatus) => substatus is "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "NOT_PROCESSABLE_REFUND_NEEDED" | "REFUND_IN_PROGRESS" | "UNKNOWN_ERROR";
206
+ declare const _SubstatusFailed: readonly ["NOT_PROCESSABLE_REFUND_NEEDED"];
207
+ export type SubstatusFailed = (typeof _SubstatusFailed)[number];
208
+ export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
209
+ export declare const isSubstatusPending: (substatus: Substatus) => substatus is "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "REFUND_IN_PROGRESS" | "UNKNOWN_ERROR";
208
210
  export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
211
+ export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
209
212
  export interface StatusInformation {
210
213
  status: StatusMessage;
211
214
  substatus?: Substatus;
package/dist/api.js CHANGED
@@ -20,8 +20,6 @@ const _SubstatusPending = [
20
20
  'BRIDGE_NOT_AVAILABLE',
21
21
  // The RPC for source/destination chain is temporarily unavailable
22
22
  'CHAIN_NOT_AVAILABLE',
23
- // The transfer cannot be completed, a refund is required
24
- 'NOT_PROCESSABLE_REFUND_NEEDED',
25
23
  // A refund has been requested and is in progress
26
24
  'REFUND_IN_PROGRESS',
27
25
  // We cannot determine the status of the transfer
@@ -37,6 +35,11 @@ const _SubstatusDone = [
37
35
  // The transfer was not successful but it has been refunded
38
36
  'REFUNDED',
39
37
  ];
38
+ const _SubstatusFailed = [
39
+ // The transfer cannot be completed, a refund is required
40
+ 'NOT_PROCESSABLE_REFUND_NEEDED',
41
+ ];
40
42
  export const isSubstatusPending = (substatus) => _SubstatusPending.includes(substatus);
41
43
  export const isSubstatusDone = (substatus) => _SubstatusDone.includes(substatus);
44
+ export const isSubstatusFailed = (substatus) => _SubstatusFailed.includes(substatus);
42
45
  const _LIFuelState = ['PENDING', 'DONE', 'NOT_FOUND'];
@@ -118,8 +118,8 @@ export const supportedEVMChains = [
118
118
  },
119
119
  rpcUrls: [
120
120
  'https://rpc.gnosischain.com/',
121
- 'https://rpc.xdaichain.com/',
122
- 'https://dai.poa.network/',
121
+ 'https://rpc.ankr.com/gnosis',
122
+ 'https://xdai-rpc.gateway.pokt.network',
123
123
  ],
124
124
  },
125
125
  },
package/dist/cjs/api.d.ts CHANGED
@@ -182,8 +182,8 @@ export interface ConnectionsResponse {
182
182
  export interface GetStatusRequest {
183
183
  txHash: string;
184
184
  bridge?: string;
185
- fromChain: number | string;
186
- toChain: number | string;
185
+ fromChain?: number | string;
186
+ toChain?: number | string;
187
187
  }
188
188
  export interface TransactionInfo {
189
189
  txHash: string;
@@ -199,13 +199,16 @@ export interface TransactionInfo {
199
199
  }
200
200
  declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
201
201
  export type StatusMessage = (typeof _StatusMessage)[number];
202
- declare const _SubstatusPending: readonly ["WAIT_SOURCE_CONFIRMATIONS", "WAIT_DESTINATION_TRANSACTION", "BRIDGE_NOT_AVAILABLE", "CHAIN_NOT_AVAILABLE", "NOT_PROCESSABLE_REFUND_NEEDED", "REFUND_IN_PROGRESS", "UNKNOWN_ERROR"];
202
+ declare const _SubstatusPending: readonly ["WAIT_SOURCE_CONFIRMATIONS", "WAIT_DESTINATION_TRANSACTION", "BRIDGE_NOT_AVAILABLE", "CHAIN_NOT_AVAILABLE", "REFUND_IN_PROGRESS", "UNKNOWN_ERROR"];
203
203
  export type SubstatusPending = (typeof _SubstatusPending)[number];
204
204
  declare const _SubstatusDone: readonly ["COMPLETED", "PARTIAL", "REFUNDED"];
205
205
  export type SubstatusDone = (typeof _SubstatusDone)[number];
206
- export type Substatus = SubstatusPending | SubstatusDone;
207
- export declare const isSubstatusPending: (substatus: Substatus) => substatus is "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "NOT_PROCESSABLE_REFUND_NEEDED" | "REFUND_IN_PROGRESS" | "UNKNOWN_ERROR";
206
+ declare const _SubstatusFailed: readonly ["NOT_PROCESSABLE_REFUND_NEEDED"];
207
+ export type SubstatusFailed = (typeof _SubstatusFailed)[number];
208
+ export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
209
+ export declare const isSubstatusPending: (substatus: Substatus) => substatus is "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "REFUND_IN_PROGRESS" | "UNKNOWN_ERROR";
208
210
  export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
211
+ export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
209
212
  export interface StatusInformation {
210
213
  status: StatusMessage;
211
214
  substatus?: Substatus;
package/dist/cjs/api.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSubstatusDone = exports.isSubstatusPending = exports.Orders = void 0;
3
+ exports.isSubstatusFailed = exports.isSubstatusDone = exports.isSubstatusPending = exports.Orders = void 0;
4
4
  exports.Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST'];
5
5
  const _StatusMessage = [
6
6
  // The transaction was not found -- likely not mined yet
@@ -23,8 +23,6 @@ const _SubstatusPending = [
23
23
  'BRIDGE_NOT_AVAILABLE',
24
24
  // The RPC for source/destination chain is temporarily unavailable
25
25
  'CHAIN_NOT_AVAILABLE',
26
- // The transfer cannot be completed, a refund is required
27
- 'NOT_PROCESSABLE_REFUND_NEEDED',
28
26
  // A refund has been requested and is in progress
29
27
  'REFUND_IN_PROGRESS',
30
28
  // We cannot determine the status of the transfer
@@ -40,8 +38,14 @@ const _SubstatusDone = [
40
38
  // The transfer was not successful but it has been refunded
41
39
  'REFUNDED',
42
40
  ];
41
+ const _SubstatusFailed = [
42
+ // The transfer cannot be completed, a refund is required
43
+ 'NOT_PROCESSABLE_REFUND_NEEDED',
44
+ ];
43
45
  const isSubstatusPending = (substatus) => _SubstatusPending.includes(substatus);
44
46
  exports.isSubstatusPending = isSubstatusPending;
45
47
  const isSubstatusDone = (substatus) => _SubstatusDone.includes(substatus);
46
48
  exports.isSubstatusDone = isSubstatusDone;
49
+ const isSubstatusFailed = (substatus) => _SubstatusFailed.includes(substatus);
50
+ exports.isSubstatusFailed = isSubstatusFailed;
47
51
  const _LIFuelState = ['PENDING', 'DONE', 'NOT_FOUND'];
@@ -121,8 +121,8 @@ exports.supportedEVMChains = [
121
121
  },
122
122
  rpcUrls: [
123
123
  'https://rpc.gnosischain.com/',
124
- 'https://rpc.xdaichain.com/',
125
- 'https://dai.poa.network/',
124
+ 'https://rpc.ankr.com/gnosis',
125
+ 'https://xdai-rpc.gateway.pokt.network',
126
126
  ],
127
127
  },
128
128
  },
package/dist/cjs/coins.js CHANGED
@@ -32,7 +32,7 @@ const basicCoins = [
32
32
  address: '0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1',
33
33
  decimals: 18,
34
34
  symbol: 'WETH',
35
- name: 'Wrapped Ether on xDai',
35
+ name: 'Wrapped Ether',
36
36
  },
37
37
  [base_1.ChainId.OPT]: {
38
38
  address: '0x0000000000000000000000000000000000000000',
@@ -165,7 +165,7 @@ const basicCoins = [
165
165
  [base_1.ChainId.DAI]: {
166
166
  address: '0x7122d7661c4564b7c6cd4878b06766489a6028a2',
167
167
  decimals: 18,
168
- name: 'Matic Token on xDai',
168
+ name: 'Matic Token',
169
169
  },
170
170
  // https://evmexplorer.velas.com/token/0x6ab0B8C1a35F9F4Ce107cCBd05049CB1Dbd99Ec5/
171
171
  [base_1.ChainId.VEL]: {
@@ -207,7 +207,7 @@ const basicCoins = [
207
207
  address: '0xca8d20f3e0144a72c6b5d576e9bd3fd8557e2b04',
208
208
  decimals: 18,
209
209
  symbol: 'WBNB',
210
- name: 'Wrapped BNB on xDai',
210
+ name: 'Wrapped BNB',
211
211
  },
212
212
  [base_1.ChainId.ONE]: {
213
213
  address: '0xb1f6e61e1e113625593a22fa6aa94f8052bc39e0',
@@ -237,7 +237,7 @@ const basicCoins = [
237
237
  // > DAI
238
238
  {
239
239
  key: base_1.CoinKey.DAI,
240
- name: 'Dai Stablecoin',
240
+ name: 'DAI Stablecoin',
241
241
  logoURI: 'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png',
242
242
  verified: true,
243
243
  chains: {
@@ -248,23 +248,22 @@ const basicCoins = [
248
248
  [base_1.ChainId.SOL]: {
249
249
  address: 'EjmyN6qEC1Tf1JxiG1ae7UTJhUxSwk1TCWNWqxWV4J6o',
250
250
  decimals: 8,
251
- name: 'Dai Stablecoin (Wormhole)',
251
+ name: 'DAI Stablecoin (Wormhole)',
252
252
  },
253
253
  [base_1.ChainId.BSC]: {
254
254
  address: '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3',
255
255
  decimals: 18,
256
- name: 'Dai Token',
257
256
  },
258
257
  [base_1.ChainId.POL]: {
259
258
  address: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063',
260
259
  decimals: 18,
261
- name: '(PoS) Dai Stablecoin',
260
+ name: '(PoS) DAI Stablecoin',
262
261
  },
263
262
  [base_1.ChainId.DAI]: {
264
263
  address: '0x0000000000000000000000000000000000000000',
265
264
  decimals: 18,
266
265
  symbol: 'xDAI',
267
- name: 'xDai Native Token',
266
+ name: 'xDAI Native Token',
268
267
  },
269
268
  [base_1.ChainId.OPT]: {
270
269
  address: '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1',
@@ -300,7 +299,7 @@ const basicCoins = [
300
299
  [base_1.ChainId.FUS]: {
301
300
  address: '0x94ba7a27c7a95863d1bdc7645ac2951e0cca06ba',
302
301
  decimals: 18,
303
- name: 'Dai Stablecoin on Fuse',
302
+ name: 'DAI Stablecoin',
304
303
  },
305
304
  [base_1.ChainId.CEL]: {
306
305
  address: '0x90ca507a5d4458a4c6c6249d186b6dcb02a5bccd',
@@ -842,7 +841,7 @@ const basicCoins = [
842
841
  address: '0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1',
843
842
  decimals: 18,
844
843
  symbol: 'WETH',
845
- name: 'Wrapped Ether on xDai',
844
+ name: 'Wrapped Ether',
846
845
  },
847
846
  [base_1.ChainId.POL]: {
848
847
  address: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619',
package/dist/coins.js CHANGED
@@ -29,7 +29,7 @@ const basicCoins = [
29
29
  address: '0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1',
30
30
  decimals: 18,
31
31
  symbol: 'WETH',
32
- name: 'Wrapped Ether on xDai',
32
+ name: 'Wrapped Ether',
33
33
  },
34
34
  [ChainId.OPT]: {
35
35
  address: '0x0000000000000000000000000000000000000000',
@@ -162,7 +162,7 @@ const basicCoins = [
162
162
  [ChainId.DAI]: {
163
163
  address: '0x7122d7661c4564b7c6cd4878b06766489a6028a2',
164
164
  decimals: 18,
165
- name: 'Matic Token on xDai',
165
+ name: 'Matic Token',
166
166
  },
167
167
  // https://evmexplorer.velas.com/token/0x6ab0B8C1a35F9F4Ce107cCBd05049CB1Dbd99Ec5/
168
168
  [ChainId.VEL]: {
@@ -204,7 +204,7 @@ const basicCoins = [
204
204
  address: '0xca8d20f3e0144a72c6b5d576e9bd3fd8557e2b04',
205
205
  decimals: 18,
206
206
  symbol: 'WBNB',
207
- name: 'Wrapped BNB on xDai',
207
+ name: 'Wrapped BNB',
208
208
  },
209
209
  [ChainId.ONE]: {
210
210
  address: '0xb1f6e61e1e113625593a22fa6aa94f8052bc39e0',
@@ -234,7 +234,7 @@ const basicCoins = [
234
234
  // > DAI
235
235
  {
236
236
  key: CoinKey.DAI,
237
- name: 'Dai Stablecoin',
237
+ name: 'DAI Stablecoin',
238
238
  logoURI: 'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png',
239
239
  verified: true,
240
240
  chains: {
@@ -245,23 +245,22 @@ const basicCoins = [
245
245
  [ChainId.SOL]: {
246
246
  address: 'EjmyN6qEC1Tf1JxiG1ae7UTJhUxSwk1TCWNWqxWV4J6o',
247
247
  decimals: 8,
248
- name: 'Dai Stablecoin (Wormhole)',
248
+ name: 'DAI Stablecoin (Wormhole)',
249
249
  },
250
250
  [ChainId.BSC]: {
251
251
  address: '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3',
252
252
  decimals: 18,
253
- name: 'Dai Token',
254
253
  },
255
254
  [ChainId.POL]: {
256
255
  address: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063',
257
256
  decimals: 18,
258
- name: '(PoS) Dai Stablecoin',
257
+ name: '(PoS) DAI Stablecoin',
259
258
  },
260
259
  [ChainId.DAI]: {
261
260
  address: '0x0000000000000000000000000000000000000000',
262
261
  decimals: 18,
263
262
  symbol: 'xDAI',
264
- name: 'xDai Native Token',
263
+ name: 'xDAI Native Token',
265
264
  },
266
265
  [ChainId.OPT]: {
267
266
  address: '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1',
@@ -297,7 +296,7 @@ const basicCoins = [
297
296
  [ChainId.FUS]: {
298
297
  address: '0x94ba7a27c7a95863d1bdc7645ac2951e0cca06ba',
299
298
  decimals: 18,
300
- name: 'Dai Stablecoin on Fuse',
299
+ name: 'DAI Stablecoin',
301
300
  },
302
301
  [ChainId.CEL]: {
303
302
  address: '0x90ca507a5d4458a4c6c6249d186b6dcb02a5bccd',
@@ -839,7 +838,7 @@ const basicCoins = [
839
838
  address: '0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1',
840
839
  decimals: 18,
841
840
  symbol: 'WETH',
842
- name: 'Wrapped Ether on xDai',
841
+ name: 'Wrapped Ether',
843
842
  },
844
843
  [ChainId.POL]: {
845
844
  address: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/types",
3
- "version": "2.2.1",
3
+ "version": "2.4.0",
4
4
  "description": "Types for the LI.FI stack",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/index.js",