@lifi/types 8.0.4 → 8.3.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,7 +2,21 @@
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
- ### [8.0.4](https://github.com/lifinance/types/compare/v8.0.3...v8.0.4) (2023-07-20)
5
+ ## [8.3.0](https://github.com/lifinance/types/compare/v8.2.0...v8.3.0) (2023-08-04)
6
+
7
+
8
+ ### Features
9
+
10
+ * move NOT_PROCESSABLE_REFUND_NEEDED to PENDING ([#185](https://github.com/lifinance/types/issues/185)) ([14ceea0](https://github.com/lifinance/types/commit/14ceea03f7e95466061c46b70998738114812f80))
11
+
12
+ ## [8.2.0](https://github.com/lifinance/types/compare/v8.0.4...v8.2.0) (2023-07-26)
13
+
14
+
15
+ ### Features
16
+
17
+ * add LNA and update multicall addresses ([#182](https://github.com/lifinance/types/issues/182)) ([6a4b374](https://github.com/lifinance/types/commit/6a4b374cb43c822e2014e98e24c61e8d88a1f25c))
18
+
19
+ ### [8.1.0](https://github.com/lifinance/types/compare/v8.0.3...v8.1.0) (2023-07-20)
6
20
 
7
21
 
8
22
  ### Bug Fixes
package/dist/api.d.ts CHANGED
@@ -227,16 +227,13 @@ export interface PendingReceivingInfo {
227
227
  }
228
228
  declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
229
229
  export type StatusMessage = (typeof _StatusMessage)[number];
230
- declare const _SubstatusPending: readonly ["WAIT_SOURCE_CONFIRMATIONS", "WAIT_DESTINATION_TRANSACTION", "BRIDGE_NOT_AVAILABLE", "CHAIN_NOT_AVAILABLE", "REFUND_IN_PROGRESS", "UNKNOWN_ERROR"];
230
+ 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"];
231
231
  export type SubstatusPending = (typeof _SubstatusPending)[number];
232
232
  declare const _SubstatusDone: readonly ["COMPLETED", "PARTIAL", "REFUNDED"];
233
233
  export type SubstatusDone = (typeof _SubstatusDone)[number];
234
- declare const _SubstatusFailed: readonly ["NOT_PROCESSABLE_REFUND_NEEDED"];
235
- export type SubstatusFailed = (typeof _SubstatusFailed)[number];
236
- export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
237
- export declare const isSubstatusPending: (substatus: Substatus) => substatus is "UNKNOWN_ERROR" | "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "REFUND_IN_PROGRESS";
234
+ export type Substatus = SubstatusPending | SubstatusDone;
235
+ export declare const isSubstatusPending: (substatus: Substatus) => substatus is "UNKNOWN_ERROR" | "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "NOT_PROCESSABLE_REFUND_NEEDED" | "REFUND_IN_PROGRESS";
238
236
  export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
239
- export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
240
237
  export interface BaseStatusData {
241
238
  status: StatusMessage;
242
239
  substatus?: Substatus;
package/dist/api.js CHANGED
@@ -25,6 +25,8 @@ const _SubstatusPending = [
25
25
  'BRIDGE_NOT_AVAILABLE',
26
26
  // The RPC for source/destination chain is temporarily unavailable
27
27
  'CHAIN_NOT_AVAILABLE',
28
+ // The transfer cannot be completed, a refund is required
29
+ 'NOT_PROCESSABLE_REFUND_NEEDED',
28
30
  // A refund has been requested and is in progress
29
31
  'REFUND_IN_PROGRESS',
30
32
  // We cannot determine the status of the transfer
@@ -40,11 +42,6 @@ const _SubstatusDone = [
40
42
  // The transfer was not successful but it has been refunded
41
43
  'REFUNDED',
42
44
  ];
43
- const _SubstatusFailed = [
44
- // The transfer cannot be completed, a refund is required
45
- 'NOT_PROCESSABLE_REFUND_NEEDED',
46
- ];
47
45
  export const isSubstatusPending = (substatus) => _SubstatusPending.includes(substatus);
48
46
  export const isSubstatusDone = (substatus) => _SubstatusDone.includes(substatus);
49
- export const isSubstatusFailed = (substatus) => _SubstatusFailed.includes(substatus);
50
47
  const _LIFuelState = ['PENDING', 'DONE', 'NOT_FOUND'];
package/dist/base.d.ts CHANGED
@@ -97,6 +97,7 @@ export declare enum ChainKey {
97
97
  ARN = "arn",
98
98
  ERA = "era",
99
99
  PZE = "pze",
100
+ LNA = "lna",
100
101
  GOR = "gor",
101
102
  METT = "mett",
102
103
  DIOT = "diot",
@@ -157,6 +158,7 @@ export declare enum ChainId {
157
158
  ARN = 42170,
158
159
  ERA = 324,
159
160
  PZE = 1101,
161
+ LNA = 59144,
160
162
  GOR = 5,
161
163
  METT = 12,
162
164
  DIOT = 13,
package/dist/base.js CHANGED
@@ -101,6 +101,7 @@ export var ChainKey;
101
101
  ChainKey["ARN"] = "arn";
102
102
  ChainKey["ERA"] = "era";
103
103
  ChainKey["PZE"] = "pze";
104
+ ChainKey["LNA"] = "lna";
104
105
  // Testnets
105
106
  ChainKey["GOR"] = "gor";
106
107
  ChainKey["METT"] = "mett";
@@ -163,6 +164,7 @@ export var ChainId;
163
164
  ChainId[ChainId["ARN"] = 42170] = "ARN";
164
165
  ChainId[ChainId["ERA"] = 324] = "ERA";
165
166
  ChainId[ChainId["PZE"] = 1101] = "PZE";
167
+ ChainId[ChainId["LNA"] = 59144] = "LNA";
166
168
  // Testnets
167
169
  ChainId[ChainId["GOR"] = 5] = "GOR";
168
170
  ChainId[ChainId["METT"] = 12] = "METT";
@@ -773,6 +773,7 @@ export const supportedEVMChains = [
773
773
  id: 324,
774
774
  mainnet: true,
775
775
  logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/zksync.png',
776
+ multicallAddress: multicallAddresses[ChainId.ERA],
776
777
  metamask: {
777
778
  chainId: prefixChainId(324),
778
779
  blockExplorerUrls: ['https://zkscan.io/'],
@@ -1111,7 +1112,7 @@ export const supportedEVMChains = [
1111
1112
  id: 59140,
1112
1113
  mainnet: false,
1113
1114
  logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/linea.svg',
1114
- // multicallAddress: multicallAddresses[ChainId.LNAT], // Not deployed yet
1115
+ multicallAddress: multicallAddresses[ChainId.LNAT],
1115
1116
  faucetUrls: ['https://faucetlink.to/goerli'],
1116
1117
  metamask: {
1117
1118
  chainId: prefixChainId(59140),
package/dist/cjs/api.d.ts CHANGED
@@ -227,16 +227,13 @@ export interface PendingReceivingInfo {
227
227
  }
228
228
  declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
229
229
  export type StatusMessage = (typeof _StatusMessage)[number];
230
- declare const _SubstatusPending: readonly ["WAIT_SOURCE_CONFIRMATIONS", "WAIT_DESTINATION_TRANSACTION", "BRIDGE_NOT_AVAILABLE", "CHAIN_NOT_AVAILABLE", "REFUND_IN_PROGRESS", "UNKNOWN_ERROR"];
230
+ 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"];
231
231
  export type SubstatusPending = (typeof _SubstatusPending)[number];
232
232
  declare const _SubstatusDone: readonly ["COMPLETED", "PARTIAL", "REFUNDED"];
233
233
  export type SubstatusDone = (typeof _SubstatusDone)[number];
234
- declare const _SubstatusFailed: readonly ["NOT_PROCESSABLE_REFUND_NEEDED"];
235
- export type SubstatusFailed = (typeof _SubstatusFailed)[number];
236
- export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
237
- export declare const isSubstatusPending: (substatus: Substatus) => substatus is "UNKNOWN_ERROR" | "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "REFUND_IN_PROGRESS";
234
+ export type Substatus = SubstatusPending | SubstatusDone;
235
+ export declare const isSubstatusPending: (substatus: Substatus) => substatus is "UNKNOWN_ERROR" | "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "NOT_PROCESSABLE_REFUND_NEEDED" | "REFUND_IN_PROGRESS";
238
236
  export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
239
- export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
240
237
  export interface BaseStatusData {
241
238
  status: StatusMessage;
242
239
  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.isSubstatusFailed = exports.isSubstatusDone = exports.isSubstatusPending = exports._InsuranceState = exports.Orders = void 0;
3
+ exports.isSubstatusDone = exports.isSubstatusPending = exports._InsuranceState = exports.Orders = void 0;
4
4
  exports.Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST'];
5
5
  exports._InsuranceState = [
6
6
  'INSURED',
@@ -28,6 +28,8 @@ const _SubstatusPending = [
28
28
  'BRIDGE_NOT_AVAILABLE',
29
29
  // The RPC for source/destination chain is temporarily unavailable
30
30
  'CHAIN_NOT_AVAILABLE',
31
+ // The transfer cannot be completed, a refund is required
32
+ 'NOT_PROCESSABLE_REFUND_NEEDED',
31
33
  // A refund has been requested and is in progress
32
34
  'REFUND_IN_PROGRESS',
33
35
  // We cannot determine the status of the transfer
@@ -43,14 +45,8 @@ const _SubstatusDone = [
43
45
  // The transfer was not successful but it has been refunded
44
46
  'REFUNDED',
45
47
  ];
46
- const _SubstatusFailed = [
47
- // The transfer cannot be completed, a refund is required
48
- 'NOT_PROCESSABLE_REFUND_NEEDED',
49
- ];
50
48
  const isSubstatusPending = (substatus) => _SubstatusPending.includes(substatus);
51
49
  exports.isSubstatusPending = isSubstatusPending;
52
50
  const isSubstatusDone = (substatus) => _SubstatusDone.includes(substatus);
53
51
  exports.isSubstatusDone = isSubstatusDone;
54
- const isSubstatusFailed = (substatus) => _SubstatusFailed.includes(substatus);
55
- exports.isSubstatusFailed = isSubstatusFailed;
56
52
  const _LIFuelState = ['PENDING', 'DONE', 'NOT_FOUND'];
@@ -97,6 +97,7 @@ export declare enum ChainKey {
97
97
  ARN = "arn",
98
98
  ERA = "era",
99
99
  PZE = "pze",
100
+ LNA = "lna",
100
101
  GOR = "gor",
101
102
  METT = "mett",
102
103
  DIOT = "diot",
@@ -157,6 +158,7 @@ export declare enum ChainId {
157
158
  ARN = 42170,
158
159
  ERA = 324,
159
160
  PZE = 1101,
161
+ LNA = 59144,
160
162
  GOR = 5,
161
163
  METT = 12,
162
164
  DIOT = 13,
package/dist/cjs/base.js CHANGED
@@ -104,6 +104,7 @@ var ChainKey;
104
104
  ChainKey["ARN"] = "arn";
105
105
  ChainKey["ERA"] = "era";
106
106
  ChainKey["PZE"] = "pze";
107
+ ChainKey["LNA"] = "lna";
107
108
  // Testnets
108
109
  ChainKey["GOR"] = "gor";
109
110
  ChainKey["METT"] = "mett";
@@ -166,6 +167,7 @@ var ChainId;
166
167
  ChainId[ChainId["ARN"] = 42170] = "ARN";
167
168
  ChainId[ChainId["ERA"] = 324] = "ERA";
168
169
  ChainId[ChainId["PZE"] = 1101] = "PZE";
170
+ ChainId[ChainId["LNA"] = 59144] = "LNA";
169
171
  // Testnets
170
172
  ChainId[ChainId["GOR"] = 5] = "GOR";
171
173
  ChainId[ChainId["METT"] = 12] = "METT";
@@ -776,6 +776,7 @@ exports.supportedEVMChains = [
776
776
  id: 324,
777
777
  mainnet: true,
778
778
  logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/zksync.png',
779
+ multicallAddress: multicall_1.multicallAddresses[base_1.ChainId.ERA],
779
780
  metamask: {
780
781
  chainId: (0, EVMChain_1.prefixChainId)(324),
781
782
  blockExplorerUrls: ['https://zkscan.io/'],
@@ -1114,7 +1115,7 @@ exports.supportedEVMChains = [
1114
1115
  id: 59140,
1115
1116
  mainnet: false,
1116
1117
  logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/linea.svg',
1117
- // multicallAddress: multicallAddresses[ChainId.LNAT], // Not deployed yet
1118
+ multicallAddress: multicall_1.multicallAddresses[base_1.ChainId.LNAT],
1118
1119
  faucetUrls: ['https://faucetlink.to/goerli'],
1119
1120
  metamask: {
1120
1121
  chainId: (0, EVMChain_1.prefixChainId)(59140),
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.multicallAddresses = void 0;
4
4
  const _1 = require(".");
5
5
  // based on:
6
+ // new nice tool to search for addresses: https://www.multicall3.com/deployments
6
7
  // - https://github.com/mds1/multicall#deployments
7
8
  // - https://github.com/sushiswap/sushiswap-sdk/blob/canary/src/constants/addresses.ts#L323
8
9
  // - https://github.com/joshstevens19/ethereum-multicall#multicall-contracts
@@ -35,9 +36,10 @@ exports.multicallAddresses = {
35
36
  [_1.ChainId.RSK]: '0xcA11bde05977b3631167028862bE2a173976CA11',
36
37
  [_1.ChainId.VEL]: '0x6ede559F2Bd951777470595761672091CCD21Ac6',
37
38
  [_1.ChainId.PZE]: '0xcA11bde05977b3631167028862bE2a173976CA11',
38
- // [ChainId.ERA]: '', // not available
39
+ [_1.ChainId.ERA]: '0xF9cda624FBC7e059355ce98a31693d299FACd963',
40
+ [_1.ChainId.LNA]: '0xcA11bde05977b3631167028862bE2a173976CA11',
41
+ [_1.ChainId.ARN]: '0xcA11bde05977b3631167028862bE2a173976CA11',
39
42
  // TODO
40
- // [ChainId.ARN]: '', // TODO
41
43
  // [ChainId.EXP]: '', // TODO
42
44
  // [ChainId.TCH]: '', // TODO
43
45
  // [ChainId.UBQ]: '', // TODO
@@ -60,6 +62,7 @@ exports.multicallAddresses = {
60
62
  [_1.ChainId.FTMT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
61
63
  [_1.ChainId.RSKT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
62
64
  [_1.ChainId.ARBG]: '0xcA11bde05977b3631167028862bE2a173976CA11',
65
+ [_1.ChainId.LNAT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
63
66
  // TODO
64
67
  // [ChainId.METT]: '', // TODO
65
68
  // [ChainId.DIOT]: '', // TODO
package/dist/multicall.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ChainId } from '.';
2
2
  // based on:
3
+ // new nice tool to search for addresses: https://www.multicall3.com/deployments
3
4
  // - https://github.com/mds1/multicall#deployments
4
5
  // - https://github.com/sushiswap/sushiswap-sdk/blob/canary/src/constants/addresses.ts#L323
5
6
  // - https://github.com/joshstevens19/ethereum-multicall#multicall-contracts
@@ -32,9 +33,10 @@ export const multicallAddresses = {
32
33
  [ChainId.RSK]: '0xcA11bde05977b3631167028862bE2a173976CA11',
33
34
  [ChainId.VEL]: '0x6ede559F2Bd951777470595761672091CCD21Ac6',
34
35
  [ChainId.PZE]: '0xcA11bde05977b3631167028862bE2a173976CA11',
35
- // [ChainId.ERA]: '', // not available
36
+ [ChainId.ERA]: '0xF9cda624FBC7e059355ce98a31693d299FACd963',
37
+ [ChainId.LNA]: '0xcA11bde05977b3631167028862bE2a173976CA11',
38
+ [ChainId.ARN]: '0xcA11bde05977b3631167028862bE2a173976CA11',
36
39
  // TODO
37
- // [ChainId.ARN]: '', // TODO
38
40
  // [ChainId.EXP]: '', // TODO
39
41
  // [ChainId.TCH]: '', // TODO
40
42
  // [ChainId.UBQ]: '', // TODO
@@ -57,6 +59,7 @@ export const multicallAddresses = {
57
59
  [ChainId.FTMT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
58
60
  [ChainId.RSKT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
59
61
  [ChainId.ARBG]: '0xcA11bde05977b3631167028862bE2a173976CA11',
62
+ [ChainId.LNAT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
60
63
  // TODO
61
64
  // [ChainId.METT]: '', // TODO
62
65
  // [ChainId.DIOT]: '', // TODO
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/types",
3
- "version": "8.0.4",
3
+ "version": "8.3.0",
4
4
  "description": "Types for the LI.FI stack",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/index.js",