@lifi/types 2.0.4 → 2.1.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,20 @@
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.1.1](https://github.com/lifinance/types/compare/v2.1.0...v2.1.1) (2023-02-17)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * add CZKT default tokens ([df967ac](https://github.com/lifinance/types/commit/df967ac4fb3ee89a701d89950f50b438cc67b656))
11
+
12
+ ## [2.1.0](https://github.com/lifinance/types/compare/v2.0.4...v2.1.0) (2023-02-17)
13
+
14
+
15
+ ### Features
16
+
17
+ * add ConsenSys zkEVM Testnet ([ac5f315](https://github.com/lifinance/types/commit/ac5f31562db6f521e6b83cf73ee54e5b48f5680c))
18
+
5
19
  ### [2.0.4](https://github.com/lifinance/types/compare/v2.0.3...v2.0.4) (2023-02-16)
6
20
 
7
21
 
package/dist/api.d.ts CHANGED
@@ -2,7 +2,7 @@ import { TransactionRequest } from '@ethersproject/providers';
2
2
  import { BridgeDefinition, Chain, ChainId, ExchangeDefinition, LifiStep, Token } from '.';
3
3
  import { ToolError } from './apiErrors';
4
4
  export declare const Orders: readonly ["RECOMMENDED", "FASTEST", "CHEAPEST", "SAFEST"];
5
- export type Order = typeof Orders[number];
5
+ export type Order = (typeof Orders)[number];
6
6
  export interface RoutesRequest {
7
7
  fromChainId: number;
8
8
  fromAmount: string;
@@ -190,11 +190,11 @@ export interface TransactionInfo {
190
190
  gasAmountUSD?: string;
191
191
  }
192
192
  declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
193
- export type StatusMessage = typeof _StatusMessage[number];
193
+ export type StatusMessage = (typeof _StatusMessage)[number];
194
194
  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"];
195
- export type SubstatusPending = typeof _SubstatusPending[number];
195
+ export type SubstatusPending = (typeof _SubstatusPending)[number];
196
196
  declare const _SubstatusDone: readonly ["COMPLETED", "PARTIAL", "REFUNDED"];
197
- export type SubstatusDone = typeof _SubstatusDone[number];
197
+ export type SubstatusDone = (typeof _SubstatusDone)[number];
198
198
  export type Substatus = SubstatusPending | SubstatusDone;
199
199
  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";
200
200
  export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
package/dist/base.d.ts CHANGED
@@ -105,7 +105,8 @@ export declare enum ChainKey {
105
105
  AVAT = "avat",
106
106
  EVMT = "evmt",
107
107
  MORT = "mort",
108
- FTMT = "ftmt"
108
+ FTMT = "ftmt",
109
+ CZKT = "czkt"
109
110
  }
110
111
  export declare enum ChainId {
111
112
  ETH = 1,
@@ -167,7 +168,8 @@ export declare enum ChainId {
167
168
  AVAT = 43113,
168
169
  EVMT = 9000,
169
170
  MORT = 1287,
170
- FTMT = 4002
171
+ FTMT = 4002,
172
+ CZKT = 59140
171
173
  }
172
174
  export interface Token {
173
175
  address: string;
package/dist/base.js CHANGED
@@ -110,6 +110,7 @@ export var ChainKey;
110
110
  ChainKey["EVMT"] = "evmt";
111
111
  ChainKey["MORT"] = "mort";
112
112
  ChainKey["FTMT"] = "ftmt";
113
+ ChainKey["CZKT"] = "czkt";
113
114
  })(ChainKey || (ChainKey = {}));
114
115
  export var ChainId;
115
116
  (function (ChainId) {
@@ -174,4 +175,5 @@ export var ChainId;
174
175
  ChainId[ChainId["EVMT"] = 9000] = "EVMT";
175
176
  ChainId[ChainId["MORT"] = 1287] = "MORT";
176
177
  ChainId[ChainId["FTMT"] = 4002] = "FTMT";
178
+ ChainId[ChainId["CZKT"] = 59140] = "CZKT";
177
179
  })(ChainId || (ChainId = {}));
@@ -1190,6 +1190,29 @@ export const supportedEVMChains = [
1190
1190
  rpcUrls: ['https://api.avax-test.network/ext/bc/C/rpc'],
1191
1191
  },
1192
1192
  },
1193
+ // 59140 - ConsenSys zkEVM Testnet
1194
+ {
1195
+ key: ChainKey.CZKT,
1196
+ chainType: ChainType.EVM,
1197
+ name: 'ConsenSys zkEVM Testnet',
1198
+ coin: CoinKey.ETH,
1199
+ id: 59140,
1200
+ mainnet: false,
1201
+ logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/consensys_skevm_test.png',
1202
+ // multicallAddress: multicallAddresses[ChainId.CZKT], // Not deployed yet
1203
+ faucetUrls: ['https://goerli.zkevm.consensys.net/'],
1204
+ metamask: {
1205
+ chainId: prefixChainId(59140),
1206
+ blockExplorerUrls: ['https://explorer.goerli.zkevm.consensys.net'],
1207
+ chainName: 'ConsenSys zkEVM Testnet',
1208
+ nativeCurrency: {
1209
+ name: 'crETH',
1210
+ symbol: 'crETH',
1211
+ decimals: 18,
1212
+ },
1213
+ rpcUrls: [],
1214
+ },
1215
+ },
1193
1216
  // TODO: Add
1194
1217
  // EVMT = 9000,
1195
1218
  // MORT = 1287,
package/dist/cjs/api.d.ts CHANGED
@@ -2,7 +2,7 @@ import { TransactionRequest } from '@ethersproject/providers';
2
2
  import { BridgeDefinition, Chain, ChainId, ExchangeDefinition, LifiStep, Token } from '.';
3
3
  import { ToolError } from './apiErrors';
4
4
  export declare const Orders: readonly ["RECOMMENDED", "FASTEST", "CHEAPEST", "SAFEST"];
5
- export type Order = typeof Orders[number];
5
+ export type Order = (typeof Orders)[number];
6
6
  export interface RoutesRequest {
7
7
  fromChainId: number;
8
8
  fromAmount: string;
@@ -190,11 +190,11 @@ export interface TransactionInfo {
190
190
  gasAmountUSD?: string;
191
191
  }
192
192
  declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
193
- export type StatusMessage = typeof _StatusMessage[number];
193
+ export type StatusMessage = (typeof _StatusMessage)[number];
194
194
  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"];
195
- export type SubstatusPending = typeof _SubstatusPending[number];
195
+ export type SubstatusPending = (typeof _SubstatusPending)[number];
196
196
  declare const _SubstatusDone: readonly ["COMPLETED", "PARTIAL", "REFUNDED"];
197
- export type SubstatusDone = typeof _SubstatusDone[number];
197
+ export type SubstatusDone = (typeof _SubstatusDone)[number];
198
198
  export type Substatus = SubstatusPending | SubstatusDone;
199
199
  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";
200
200
  export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
@@ -105,7 +105,8 @@ export declare enum ChainKey {
105
105
  AVAT = "avat",
106
106
  EVMT = "evmt",
107
107
  MORT = "mort",
108
- FTMT = "ftmt"
108
+ FTMT = "ftmt",
109
+ CZKT = "czkt"
109
110
  }
110
111
  export declare enum ChainId {
111
112
  ETH = 1,
@@ -167,7 +168,8 @@ export declare enum ChainId {
167
168
  AVAT = 43113,
168
169
  EVMT = 9000,
169
170
  MORT = 1287,
170
- FTMT = 4002
171
+ FTMT = 4002,
172
+ CZKT = 59140
171
173
  }
172
174
  export interface Token {
173
175
  address: string;
package/dist/cjs/base.js CHANGED
@@ -113,6 +113,7 @@ var ChainKey;
113
113
  ChainKey["EVMT"] = "evmt";
114
114
  ChainKey["MORT"] = "mort";
115
115
  ChainKey["FTMT"] = "ftmt";
116
+ ChainKey["CZKT"] = "czkt";
116
117
  })(ChainKey = exports.ChainKey || (exports.ChainKey = {}));
117
118
  var ChainId;
118
119
  (function (ChainId) {
@@ -177,4 +178,5 @@ var ChainId;
177
178
  ChainId[ChainId["EVMT"] = 9000] = "EVMT";
178
179
  ChainId[ChainId["MORT"] = 1287] = "MORT";
179
180
  ChainId[ChainId["FTMT"] = 4002] = "FTMT";
181
+ ChainId[ChainId["CZKT"] = 59140] = "CZKT";
180
182
  })(ChainId = exports.ChainId || (exports.ChainId = {}));
@@ -1193,6 +1193,29 @@ exports.supportedEVMChains = [
1193
1193
  rpcUrls: ['https://api.avax-test.network/ext/bc/C/rpc'],
1194
1194
  },
1195
1195
  },
1196
+ // 59140 - ConsenSys zkEVM Testnet
1197
+ {
1198
+ key: base_1.ChainKey.CZKT,
1199
+ chainType: Chain_1.ChainType.EVM,
1200
+ name: 'ConsenSys zkEVM Testnet',
1201
+ coin: base_1.CoinKey.ETH,
1202
+ id: 59140,
1203
+ mainnet: false,
1204
+ logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/consensys_skevm_test.png',
1205
+ // multicallAddress: multicallAddresses[ChainId.CZKT], // Not deployed yet
1206
+ faucetUrls: ['https://goerli.zkevm.consensys.net/'],
1207
+ metamask: {
1208
+ chainId: (0, EVMChain_1.prefixChainId)(59140),
1209
+ blockExplorerUrls: ['https://explorer.goerli.zkevm.consensys.net'],
1210
+ chainName: 'ConsenSys zkEVM Testnet',
1211
+ nativeCurrency: {
1212
+ name: 'crETH',
1213
+ symbol: 'crETH',
1214
+ decimals: 18,
1215
+ },
1216
+ rpcUrls: [],
1217
+ },
1218
+ },
1196
1219
  // TODO: Add
1197
1220
  // EVMT = 9000,
1198
1221
  // MORT = 1287,
package/dist/cjs/coins.js CHANGED
@@ -126,6 +126,14 @@ const basicCoins = [
126
126
  address: '0x0000000000000000000000000000000000000000',
127
127
  decimals: 18,
128
128
  },
129
+ [base_1.ChainId.ARBG]: {
130
+ address: '0x0000000000000000000000000000000000000000',
131
+ decimals: 18,
132
+ },
133
+ [base_1.ChainId.CZKT]: {
134
+ address: '0x0000000000000000000000000000000000000000',
135
+ decimals: 18,
136
+ },
129
137
  },
130
138
  },
131
139
  // > MATIC
@@ -386,6 +394,10 @@ const basicCoins = [
386
394
  decimals: 8,
387
395
  name: 'Avalanche (Wormhole)',
388
396
  },
397
+ [base_1.ChainId.AVAT]: {
398
+ address: '0x0000000000000000000000000000000000000000',
399
+ decimals: 18,
400
+ },
389
401
  },
390
402
  },
391
403
  // > HT
@@ -679,6 +691,11 @@ const basicCoins = [
679
691
  address: '0x6d4dd09982853f08d9966ac3ca4eb5885f16f2b2',
680
692
  decimals: 6,
681
693
  },
694
+ [base_1.ChainId.CZKT]: {
695
+ address: '0x964FF70695da981027c81020B1c58d833D49A640',
696
+ decimals: 6,
697
+ name: 'ConsenSys USD Coin',
698
+ },
682
699
  // 42, 0xb7a4f3e9097c08da09517b5ab877f7a917224ede, 6
683
700
  },
684
701
  },
@@ -916,6 +933,10 @@ const basicCoins = [
916
933
  address: '0x4200000000000000000000000000000000000006',
917
934
  decimals: 18,
918
935
  },
936
+ [base_1.ChainId.CZKT]: {
937
+ address: '0x2C1b868d6596a18e32E61B901E4060C872647b6C',
938
+ decimals: 18,
939
+ },
919
940
  },
920
941
  },
921
942
  // > SUSHI
@@ -1512,6 +1533,16 @@ exports.wrappedTokens = {
1512
1533
  name: 'WETH',
1513
1534
  logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
1514
1535
  },
1536
+ [base_1.ChainId.ARBG]: {
1537
+ // https://goerli.arbiscan.io/token/0x42da9eE191833756c618778145A86E6709f70C9b
1538
+ address: '0x42da9eE191833756c618778145A86E6709f70C9b',
1539
+ symbol: 'WETH',
1540
+ decimals: 18,
1541
+ chainId: base_1.ChainId.ARBG,
1542
+ coinKey: base_1.CoinKey.WETH,
1543
+ name: 'WETH',
1544
+ logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
1545
+ },
1515
1546
  [base_1.ChainId.OPTT]: {
1516
1547
  // https://kovan-optimistic.etherscan.io/token/0x4200000000000000000000000000000000000006
1517
1548
  address: '0x4200000000000000000000000000000000000006',
@@ -1542,6 +1573,26 @@ exports.wrappedTokens = {
1542
1573
  name: 'WBNB',
1543
1574
  logoURI: 'https://zapper.fi/images/networks/binance-smart-chain/0x0000000000000000000000000000000000000000.png',
1544
1575
  },
1576
+ [base_1.ChainId.CZKT]: {
1577
+ // https://explorer.prealpha.zkevm.consensys.net/address/0x2C1b868d6596a18e32E61B901E4060C872647b6C
1578
+ address: '0x2C1b868d6596a18e32E61B901E4060C872647b6C',
1579
+ symbol: 'WETH',
1580
+ decimals: 18,
1581
+ chainId: base_1.ChainId.CZKT,
1582
+ coinKey: base_1.CoinKey.WETH,
1583
+ name: 'WETH',
1584
+ logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
1585
+ },
1586
+ [base_1.ChainId.AVAT]: {
1587
+ // https://testnet.snowtrace.io/token/0xd00ae08403B9bbb9124bB305C09058E32C39A48c
1588
+ address: '0xd00ae08403B9bbb9124bB305C09058E32C39A48c',
1589
+ symbol: 'WAVAX',
1590
+ decimals: 18,
1591
+ chainId: base_1.ChainId.AVA,
1592
+ coinKey: 'WAVAX',
1593
+ name: 'Wrapped AVAX',
1594
+ logoURI: '',
1595
+ },
1545
1596
  };
1546
1597
  const findDefaultCoin = (coinKey) => {
1547
1598
  const coin = exports.defaultCoins.find((coin) => coin.key === coinKey);
package/dist/coins.js CHANGED
@@ -123,6 +123,14 @@ const basicCoins = [
123
123
  address: '0x0000000000000000000000000000000000000000',
124
124
  decimals: 18,
125
125
  },
126
+ [ChainId.ARBG]: {
127
+ address: '0x0000000000000000000000000000000000000000',
128
+ decimals: 18,
129
+ },
130
+ [ChainId.CZKT]: {
131
+ address: '0x0000000000000000000000000000000000000000',
132
+ decimals: 18,
133
+ },
126
134
  },
127
135
  },
128
136
  // > MATIC
@@ -383,6 +391,10 @@ const basicCoins = [
383
391
  decimals: 8,
384
392
  name: 'Avalanche (Wormhole)',
385
393
  },
394
+ [ChainId.AVAT]: {
395
+ address: '0x0000000000000000000000000000000000000000',
396
+ decimals: 18,
397
+ },
386
398
  },
387
399
  },
388
400
  // > HT
@@ -676,6 +688,11 @@ const basicCoins = [
676
688
  address: '0x6d4dd09982853f08d9966ac3ca4eb5885f16f2b2',
677
689
  decimals: 6,
678
690
  },
691
+ [ChainId.CZKT]: {
692
+ address: '0x964FF70695da981027c81020B1c58d833D49A640',
693
+ decimals: 6,
694
+ name: 'ConsenSys USD Coin',
695
+ },
679
696
  // 42, 0xb7a4f3e9097c08da09517b5ab877f7a917224ede, 6
680
697
  },
681
698
  },
@@ -913,6 +930,10 @@ const basicCoins = [
913
930
  address: '0x4200000000000000000000000000000000000006',
914
931
  decimals: 18,
915
932
  },
933
+ [ChainId.CZKT]: {
934
+ address: '0x2C1b868d6596a18e32E61B901E4060C872647b6C',
935
+ decimals: 18,
936
+ },
916
937
  },
917
938
  },
918
939
  // > SUSHI
@@ -1509,6 +1530,16 @@ export const wrappedTokens = {
1509
1530
  name: 'WETH',
1510
1531
  logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
1511
1532
  },
1533
+ [ChainId.ARBG]: {
1534
+ // https://goerli.arbiscan.io/token/0x42da9eE191833756c618778145A86E6709f70C9b
1535
+ address: '0x42da9eE191833756c618778145A86E6709f70C9b',
1536
+ symbol: 'WETH',
1537
+ decimals: 18,
1538
+ chainId: ChainId.ARBG,
1539
+ coinKey: CoinKey.WETH,
1540
+ name: 'WETH',
1541
+ logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
1542
+ },
1512
1543
  [ChainId.OPTT]: {
1513
1544
  // https://kovan-optimistic.etherscan.io/token/0x4200000000000000000000000000000000000006
1514
1545
  address: '0x4200000000000000000000000000000000000006',
@@ -1539,6 +1570,26 @@ export const wrappedTokens = {
1539
1570
  name: 'WBNB',
1540
1571
  logoURI: 'https://zapper.fi/images/networks/binance-smart-chain/0x0000000000000000000000000000000000000000.png',
1541
1572
  },
1573
+ [ChainId.CZKT]: {
1574
+ // https://explorer.prealpha.zkevm.consensys.net/address/0x2C1b868d6596a18e32E61B901E4060C872647b6C
1575
+ address: '0x2C1b868d6596a18e32E61B901E4060C872647b6C',
1576
+ symbol: 'WETH',
1577
+ decimals: 18,
1578
+ chainId: ChainId.CZKT,
1579
+ coinKey: CoinKey.WETH,
1580
+ name: 'WETH',
1581
+ logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
1582
+ },
1583
+ [ChainId.AVAT]: {
1584
+ // https://testnet.snowtrace.io/token/0xd00ae08403B9bbb9124bB305C09058E32C39A48c
1585
+ address: '0xd00ae08403B9bbb9124bB305C09058E32C39A48c',
1586
+ symbol: 'WAVAX',
1587
+ decimals: 18,
1588
+ chainId: ChainId.AVA,
1589
+ coinKey: 'WAVAX',
1590
+ name: 'Wrapped AVAX',
1591
+ logoURI: '',
1592
+ },
1542
1593
  };
1543
1594
  export const findDefaultCoin = (coinKey) => {
1544
1595
  const coin = defaultCoins.find((coin) => coin.key === coinKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/types",
3
- "version": "2.0.4",
3
+ "version": "2.1.1",
4
4
  "description": "Types for the LI.FI stack",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/index.js",
@@ -96,5 +96,6 @@
96
96
  },
97
97
  "directories": {
98
98
  "test": "test"
99
- }
99
+ },
100
+ "packageManager": "yarn@3.4.1"
100
101
  }