@lifi/types 2.0.4 → 2.1.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 +7 -0
- package/dist/api.d.ts +4 -4
- package/dist/base.d.ts +4 -2
- package/dist/base.js +2 -0
- package/dist/chains/supported.chains.js +23 -0
- package/dist/cjs/api.d.ts +4 -4
- package/dist/cjs/base.d.ts +4 -2
- package/dist/cjs/base.js +2 -0
- package/dist/cjs/chains/supported.chains.js +23 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.0](https://github.com/lifinance/types/compare/v2.0.4...v2.1.0) (2023-02-17)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add ConsenSys zkEVM Testnet ([ac5f315](https://github.com/lifinance/types/commit/ac5f31562db6f521e6b83cf73ee54e5b48f5680c))
|
|
11
|
+
|
|
5
12
|
### [2.0.4](https://github.com/lifinance/types/compare/v2.0.3...v2.0.4) (2023-02-16)
|
|
6
13
|
|
|
7
14
|
|
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";
|
package/dist/cjs/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/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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/types",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
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
|
}
|