@lifi/types 2.4.0 → 2.5.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,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.5.0](https://github.com/lifinance/types/compare/v2.4.1...v2.5.0) (2023-03-14)
6
+
7
+
8
+ ### Features
9
+
10
+ * add insurance to route ([#140](https://github.com/lifinance/types/issues/140)) ([f909c51](https://github.com/lifinance/types/commit/f909c510a3448826aa4125ed5792107eae4a7b46))
11
+
12
+ ### [2.4.1](https://github.com/lifinance/types/compare/v2.4.0...v2.4.1) (2023-03-10)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * block explorer and rpc urls ([7d805e2](https://github.com/lifinance/types/commit/7d805e2edb9470603f95210789c0fdbf2e585b31))
18
+
5
19
  ## [2.4.0](https://github.com/lifinance/types/compare/v2.3.0...v2.4.0) (2023-03-08)
6
20
 
7
21
 
package/dist/api.d.ts CHANGED
@@ -50,8 +50,18 @@ export interface AllowDenyPrefer {
50
50
  deny?: string[];
51
51
  prefer?: string[];
52
52
  }
53
+ export declare enum InsuranceState {
54
+ INSURED = "INSURED",
55
+ INSURABLE = "INSURABLE",
56
+ NOT_INSURABLE = "NOT_INSURABLE"
57
+ }
58
+ export interface Insurance {
59
+ state: InsuranceState;
60
+ feeAmountUsd: number;
61
+ }
53
62
  export interface Route {
54
63
  id: string;
64
+ insurance: Insurance;
55
65
  fromChainId: number;
56
66
  fromAmountUSD: string;
57
67
  fromAmount: string;
package/dist/api.js CHANGED
@@ -1,4 +1,10 @@
1
1
  export const Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST'];
2
+ export var InsuranceState;
3
+ (function (InsuranceState) {
4
+ InsuranceState["INSURED"] = "INSURED";
5
+ InsuranceState["INSURABLE"] = "INSURABLE";
6
+ InsuranceState["NOT_INSURABLE"] = "NOT_INSURABLE";
7
+ })(InsuranceState || (InsuranceState = {}));
2
8
  const _StatusMessage = [
3
9
  // The transaction was not found -- likely not mined yet
4
10
  'NOT_FOUND',
@@ -841,7 +841,7 @@ export const supportedEVMChains = [
841
841
  symbol: 'ETH',
842
842
  decimals: 18,
843
843
  },
844
- rpcUrls: ['https://goerli.infura.io/v3/d1caeba320f94122ba8f791f50122c4c'],
844
+ rpcUrls: ['https://rpc.ankr.com/eth_goerli'],
845
845
  },
846
846
  },
847
847
  // 12 - Metadium Testnet
@@ -972,7 +972,7 @@ export const supportedEVMChains = [
972
972
  multicallAddress: multicallAddresses[ChainId.ARBG],
973
973
  metamask: {
974
974
  chainId: prefixChainId(421613),
975
- blockExplorerUrls: ['https://goerli-rollup-explorer.arbitrum.io'],
975
+ blockExplorerUrls: ['https://goerli-rollup-explorer.arbitrum.io/'],
976
976
  chainName: 'Arbitrum Görli',
977
977
  nativeCurrency: {
978
978
  name: 'AGOR',
@@ -1070,10 +1070,7 @@ export const supportedEVMChains = [
1070
1070
  symbol: 'HT',
1071
1071
  decimals: 18,
1072
1072
  },
1073
- rpcUrls: [
1074
- 'https://http-testnet.hecochain.com',
1075
- 'wss://ws-testnet.hecochain.com',
1076
- ],
1073
+ rpcUrls: ['https://http-testnet.hecochain.com'],
1077
1074
  },
1078
1075
  },
1079
1076
  // 1666700000 - Harmony Testnet 0
@@ -1180,7 +1177,7 @@ export const supportedEVMChains = [
1180
1177
  // https://github.com/ethereum-lists/chains/blob/master/_data/chains/eip155-43113.json
1181
1178
  metamask: {
1182
1179
  chainId: prefixChainId(43113),
1183
- blockExplorerUrls: ['https://testnet.snowtrace.io'],
1180
+ blockExplorerUrls: ['https://testnet.snowtrace.io/'],
1184
1181
  chainName: 'Avalanche Fuji Testnet',
1185
1182
  nativeCurrency: {
1186
1183
  name: 'AVAX',
@@ -1203,7 +1200,7 @@ export const supportedEVMChains = [
1203
1200
  faucetUrls: ['https://goerli.zkevm.consensys.net/'],
1204
1201
  metamask: {
1205
1202
  chainId: prefixChainId(59140),
1206
- blockExplorerUrls: ['https://explorer.goerli.zkevm.consensys.net'],
1203
+ blockExplorerUrls: ['https://explorer.goerli.zkevm.consensys.net/'],
1207
1204
  chainName: 'ConsenSys zkEVM Testnet',
1208
1205
  nativeCurrency: {
1209
1206
  name: 'crETH',
package/dist/cjs/api.d.ts CHANGED
@@ -50,8 +50,18 @@ export interface AllowDenyPrefer {
50
50
  deny?: string[];
51
51
  prefer?: string[];
52
52
  }
53
+ export declare enum InsuranceState {
54
+ INSURED = "INSURED",
55
+ INSURABLE = "INSURABLE",
56
+ NOT_INSURABLE = "NOT_INSURABLE"
57
+ }
58
+ export interface Insurance {
59
+ state: InsuranceState;
60
+ feeAmountUsd: number;
61
+ }
53
62
  export interface Route {
54
63
  id: string;
64
+ insurance: Insurance;
55
65
  fromChainId: number;
56
66
  fromAmountUSD: string;
57
67
  fromAmount: string;
package/dist/cjs/api.js CHANGED
@@ -1,7 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSubstatusFailed = exports.isSubstatusDone = exports.isSubstatusPending = exports.Orders = void 0;
3
+ exports.isSubstatusFailed = exports.isSubstatusDone = exports.isSubstatusPending = exports.InsuranceState = exports.Orders = void 0;
4
4
  exports.Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST'];
5
+ var InsuranceState;
6
+ (function (InsuranceState) {
7
+ InsuranceState["INSURED"] = "INSURED";
8
+ InsuranceState["INSURABLE"] = "INSURABLE";
9
+ InsuranceState["NOT_INSURABLE"] = "NOT_INSURABLE";
10
+ })(InsuranceState = exports.InsuranceState || (exports.InsuranceState = {}));
5
11
  const _StatusMessage = [
6
12
  // The transaction was not found -- likely not mined yet
7
13
  'NOT_FOUND',
@@ -844,7 +844,7 @@ exports.supportedEVMChains = [
844
844
  symbol: 'ETH',
845
845
  decimals: 18,
846
846
  },
847
- rpcUrls: ['https://goerli.infura.io/v3/d1caeba320f94122ba8f791f50122c4c'],
847
+ rpcUrls: ['https://rpc.ankr.com/eth_goerli'],
848
848
  },
849
849
  },
850
850
  // 12 - Metadium Testnet
@@ -975,7 +975,7 @@ exports.supportedEVMChains = [
975
975
  multicallAddress: multicall_1.multicallAddresses[base_1.ChainId.ARBG],
976
976
  metamask: {
977
977
  chainId: (0, EVMChain_1.prefixChainId)(421613),
978
- blockExplorerUrls: ['https://goerli-rollup-explorer.arbitrum.io'],
978
+ blockExplorerUrls: ['https://goerli-rollup-explorer.arbitrum.io/'],
979
979
  chainName: 'Arbitrum Görli',
980
980
  nativeCurrency: {
981
981
  name: 'AGOR',
@@ -1073,10 +1073,7 @@ exports.supportedEVMChains = [
1073
1073
  symbol: 'HT',
1074
1074
  decimals: 18,
1075
1075
  },
1076
- rpcUrls: [
1077
- 'https://http-testnet.hecochain.com',
1078
- 'wss://ws-testnet.hecochain.com',
1079
- ],
1076
+ rpcUrls: ['https://http-testnet.hecochain.com'],
1080
1077
  },
1081
1078
  },
1082
1079
  // 1666700000 - Harmony Testnet 0
@@ -1183,7 +1180,7 @@ exports.supportedEVMChains = [
1183
1180
  // https://github.com/ethereum-lists/chains/blob/master/_data/chains/eip155-43113.json
1184
1181
  metamask: {
1185
1182
  chainId: (0, EVMChain_1.prefixChainId)(43113),
1186
- blockExplorerUrls: ['https://testnet.snowtrace.io'],
1183
+ blockExplorerUrls: ['https://testnet.snowtrace.io/'],
1187
1184
  chainName: 'Avalanche Fuji Testnet',
1188
1185
  nativeCurrency: {
1189
1186
  name: 'AVAX',
@@ -1206,7 +1203,7 @@ exports.supportedEVMChains = [
1206
1203
  faucetUrls: ['https://goerli.zkevm.consensys.net/'],
1207
1204
  metamask: {
1208
1205
  chainId: (0, EVMChain_1.prefixChainId)(59140),
1209
- blockExplorerUrls: ['https://explorer.goerli.zkevm.consensys.net'],
1206
+ blockExplorerUrls: ['https://explorer.goerli.zkevm.consensys.net/'],
1210
1207
  chainName: 'ConsenSys zkEVM Testnet',
1211
1208
  nativeCurrency: {
1212
1209
  name: 'crETH',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/types",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Types for the LI.FI stack",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/index.js",