@lifi/types 9.0.0-alpha.9 → 9.0.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.
Files changed (66) hide show
  1. package/README.md +2 -30
  2. package/dist/api.d.ts +35 -59
  3. package/dist/apiErrors.d.ts +9 -0
  4. package/dist/base.d.ts +231 -0
  5. package/dist/{chains/base.js → base.js} +65 -0
  6. package/dist/bridges.d.ts +21 -15
  7. package/dist/bridges.js +167 -1
  8. package/dist/chains/Chain.d.ts +2 -3
  9. package/dist/chains/Chain.js +2 -1
  10. package/dist/chains/EVMChain.d.ts +1 -0
  11. package/dist/chains/EVMChain.js +4 -1
  12. package/dist/chains/chain.utils.d.ts +4 -0
  13. package/dist/chains/chain.utils.js +21 -0
  14. package/dist/chains/index.d.ts +2 -1
  15. package/dist/chains/index.js +2 -1
  16. package/dist/chains/supported.chains.d.ts +5 -0
  17. package/dist/chains/supported.chains.js +1208 -0
  18. package/dist/cjs/api.d.ts +35 -59
  19. package/dist/cjs/apiErrors.d.ts +9 -0
  20. package/dist/cjs/base.d.ts +231 -0
  21. package/dist/cjs/{chains/base.js → base.js} +68 -3
  22. package/dist/cjs/bridges.d.ts +21 -15
  23. package/dist/cjs/bridges.js +168 -0
  24. package/dist/cjs/chains/Chain.d.ts +2 -3
  25. package/dist/cjs/chains/Chain.js +3 -2
  26. package/dist/cjs/chains/EVMChain.d.ts +1 -0
  27. package/dist/cjs/chains/EVMChain.js +6 -0
  28. package/dist/cjs/chains/chain.utils.d.ts +4 -0
  29. package/dist/cjs/chains/chain.utils.js +26 -0
  30. package/dist/cjs/chains/index.d.ts +2 -1
  31. package/dist/cjs/chains/index.js +2 -1
  32. package/dist/cjs/chains/supported.chains.d.ts +5 -0
  33. package/dist/cjs/chains/supported.chains.js +1211 -0
  34. package/dist/cjs/coins.d.ts +9 -0
  35. package/dist/cjs/coins.js +1892 -0
  36. package/dist/cjs/exchanges.d.ts +33 -7
  37. package/dist/cjs/exchanges.js +1102 -0
  38. package/dist/cjs/index.d.ts +6 -3
  39. package/dist/cjs/index.js +6 -3
  40. package/dist/cjs/multicall.d.ts +3 -0
  41. package/dist/cjs/multicall.js +80 -0
  42. package/dist/cjs/step.d.ts +8 -10
  43. package/dist/coins.d.ts +9 -0
  44. package/dist/coins.js +1885 -0
  45. package/dist/exchanges.d.ts +33 -7
  46. package/dist/exchanges.js +1100 -1
  47. package/dist/index.d.ts +6 -3
  48. package/dist/index.js +6 -3
  49. package/dist/multicall.d.ts +3 -0
  50. package/dist/multicall.js +77 -0
  51. package/dist/step.d.ts +8 -10
  52. package/package.json +39 -18
  53. package/dist/chains/base.d.ts +0 -122
  54. package/dist/cjs/chains/base.d.ts +0 -122
  55. package/dist/cjs/tokens/base.d.ts +0 -58
  56. package/dist/cjs/tokens/base.js +0 -66
  57. package/dist/cjs/tokens/index.d.ts +0 -2
  58. package/dist/cjs/tokens/index.js +0 -18
  59. package/dist/cjs/tokens/token.d.ts +0 -29
  60. package/dist/tokens/base.d.ts +0 -58
  61. package/dist/tokens/base.js +0 -63
  62. package/dist/tokens/index.d.ts +0 -2
  63. package/dist/tokens/index.js +0 -2
  64. package/dist/tokens/token.d.ts +0 -29
  65. /package/dist/{tokens/token.js → apiErrors.js} +0 -0
  66. /package/dist/cjs/{tokens/token.js → apiErrors.js} +0 -0
package/README.md CHANGED
@@ -1,37 +1,9 @@
1
- <div align="center">
1
+ ### Installation
2
2
 
3
- [![license](https://img.shields.io/badge/license-Apache%202-blue)](/LICENSE.md)
4
- [![npm latest package](https://img.shields.io/npm/v/@lifi/types/latest.svg)](https://www.npmjs.com/package/@lifi/types)
5
- [![npm downloads](https://img.shields.io/npm/dm/@lifi/types.svg)](https://www.npmjs.com/package/@lifi/types)
6
- [![Follow on Twitter](https://img.shields.io/twitter/follow/lifiprotocol.svg?label=follow+LI.FI)](https://twitter.com/lifiprotocol)
7
-
8
- </div>
9
-
10
- # LI.FI - Types
11
-
12
- Types for the LI.FI stack.
13
-
14
- ## Summary
15
-
16
- This package contains all common types for the [LI.FI SDK](https://github.com/lifinance/sdk).
17
- Learn more about LI.FI on (https://li.fi).
18
-
19
- Check out the [Changelog](./CHANGELOG.md) to see what changed in the last releases.
20
-
21
- ## Installation
22
-
23
- Install dependencies with yarn:
24
-
25
- ```bash
26
- yarn add @lifi/types
27
3
  ```
28
-
29
- or
30
-
31
- ```bash
32
4
  npm install --save @lifi/types
33
5
  ```
34
6
 
35
- ## Summary
7
+ ### Summary
36
8
 
37
9
  This package contains type definitions for LI.FI projects (https://github.com/lifinance).
package/dist/api.d.ts CHANGED
@@ -1,32 +1,6 @@
1
- import { BridgeDefinition } from './bridges';
2
- import { Chain } from './chains';
3
- import { ChainId } from './chains/base';
4
- import { ExchangeDefinition } from './exchanges';
5
- import { Action, LifiStep } from './step';
6
- import { Token } from './tokens';
7
- /**
8
- * Used as a bigint replacement for TransactionRequest because bigint is not serializable
9
- */
10
- export type BigIntish = string;
11
- export type TransactionRequest = {
12
- to?: string;
13
- from?: string;
14
- nonce?: number;
15
- gasLimit?: BigIntish;
16
- gasPrice?: BigIntish;
17
- data?: string;
18
- value?: BigIntish;
19
- chainId?: number;
20
- type?: number;
21
- accessList?: {
22
- address: string;
23
- storageKeys: string[];
24
- }[];
25
- maxPriorityFeePerGas?: BigIntish;
26
- maxFeePerGas?: BigIntish;
27
- customData?: Record<string, any>;
28
- ccipReadEnabled?: boolean;
29
- };
1
+ import { TransactionRequest } from '@ethersproject/providers';
2
+ import { BridgeDefinition, Chain, ChainId, ChainType, ExchangeDefinition, LifiStep, Token } from '.';
3
+ import { ToolError } from './apiErrors';
30
4
  export declare const Orders: readonly ["RECOMMENDED", "FASTEST", "CHEAPEST", "SAFEST"];
31
5
  export type Order = (typeof Orders)[number];
32
6
  export interface RoutesRequest {
@@ -41,18 +15,18 @@ export interface RoutesRequest {
41
15
  fromAmountForGas?: string;
42
16
  }
43
17
  export interface RouteOptions {
44
- integrator?: string;
45
- fee?: number;
46
- insurance?: boolean;
47
- maxPriceImpact?: number;
48
18
  order?: Order;
49
19
  slippage?: number;
50
- referrer?: string;
51
20
  infiniteApproval?: boolean;
52
21
  allowSwitchChain?: boolean;
22
+ integrator?: string;
53
23
  allowDestinationCall?: boolean;
24
+ referrer?: string;
54
25
  bridges?: AllowDenyPrefer;
55
26
  exchanges?: AllowDenyPrefer;
27
+ fee?: number;
28
+ insurance?: boolean;
29
+ maxPriceImpact?: number;
56
30
  }
57
31
  export type ToolsResponse = {
58
32
  exchanges: {
@@ -102,14 +76,6 @@ export interface Route {
102
76
  steps: LifiStep[];
103
77
  tags?: Order[];
104
78
  }
105
- export type ToolErrorType = 'NO_QUOTE';
106
- export interface ToolError {
107
- errorType: ToolErrorType;
108
- code: string;
109
- action: Action;
110
- tool: string;
111
- message: string;
112
- }
113
79
  export type ErroredPaths = {
114
80
  [subpath: string]: ToolError[];
115
81
  };
@@ -180,50 +146,56 @@ export interface QuoteRequest extends ToolConfiguration {
180
146
  fromAmountForGas?: string;
181
147
  maxPriceImpact?: number;
182
148
  }
183
- export interface ContractCallQuoteRequest extends ToolConfiguration {
149
+ export interface ContractCall {
150
+ fromAmount: string;
151
+ fromTokenAddress: string;
152
+ toContractAddress: string;
153
+ toContractCallData: string;
154
+ toContractGasLimit: string;
155
+ toApprovalAddress?: string;
156
+ toTokenAddress?: string;
157
+ }
158
+ export interface ContractCallsQuoteRequest extends ToolConfiguration {
184
159
  fromChain: number | string;
185
160
  fromToken: string;
186
161
  fromAddress: string;
187
162
  toChain: number | string;
188
163
  toToken: string;
189
164
  toAmount: string;
190
- toContractAddress: string;
191
- toContractCallData: string;
192
- toContractGasLimit: string;
193
- toApprovalAddress?: string;
194
165
  toFallbackAddress?: string;
195
166
  contractOutputsToken?: string;
167
+ contractCalls: ContractCall[];
196
168
  slippage?: number | string;
197
169
  integrator?: string;
198
170
  referrer?: string;
199
171
  fee?: number | string;
200
172
  allowDestinationCall?: boolean;
201
173
  }
202
- export interface ContractCallQuotesRequest extends ToolConfiguration {
174
+ export interface ContractCallQuoteRequest extends ToolConfiguration {
203
175
  fromChain: number | string;
204
176
  fromToken: string;
205
177
  fromAddress: string;
206
178
  toChain: number | string;
179
+ toToken: string;
180
+ toAmount: string;
181
+ toContractAddress: string;
182
+ toContractCallData: string;
183
+ toContractGasLimit: string;
184
+ toApprovalAddress?: string;
207
185
  toFallbackAddress?: string;
208
- toContractCalls: {
209
- sendingAmount: string;
210
- sendingToken: string;
211
- receivingToken: string;
212
- contractAddress: string;
213
- approvalAddress?: string;
214
- callData: string;
215
- gasLimit: string;
216
- }[];
217
- order?: Order;
186
+ contractOutputsToken?: string;
218
187
  slippage?: number | string;
219
188
  integrator?: string;
220
189
  referrer?: string;
190
+ fee?: number | string;
191
+ allowDestinationCall?: boolean;
221
192
  }
222
193
  export interface ConnectionsRequest extends ToolConfiguration {
223
194
  fromChain?: number | string;
224
195
  fromToken?: string;
225
196
  toChain?: number | string;
226
197
  toToken?: string;
198
+ chainTypes?: ChainType[];
227
199
  }
228
200
  export interface Connection {
229
201
  fromChainId: number;
@@ -266,7 +238,7 @@ export type SubstatusPending = (typeof _SubstatusPending)[number];
266
238
  declare const _SubstatusDone: readonly ["COMPLETED", "PARTIAL", "REFUNDED"];
267
239
  export type SubstatusDone = (typeof _SubstatusDone)[number];
268
240
  export type Substatus = SubstatusPending | SubstatusDone;
269
- 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";
241
+ 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";
270
242
  export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
271
243
  export interface BaseStatusData {
272
244
  status: StatusMessage;
@@ -294,11 +266,15 @@ export interface ExtendedChain extends Chain {
294
266
  export interface ChainsResponse {
295
267
  chains: ExtendedChain[];
296
268
  }
269
+ export interface ChainsRequest {
270
+ chainTypes?: ChainType[];
271
+ }
297
272
  export interface ToolsRequest {
298
273
  chains?: ChainId[];
299
274
  }
300
275
  export type TokensRequest = {
301
276
  chains?: ChainId[];
277
+ chainTypes?: ChainType[];
302
278
  };
303
279
  export type TokensResponse = {
304
280
  tokens: {
@@ -0,0 +1,9 @@
1
+ import { Action } from './step';
2
+ export type ToolErrorType = 'NO_QUOTE';
3
+ export interface ToolError {
4
+ errorType: ToolErrorType;
5
+ code: string;
6
+ action: Action;
7
+ tool: string;
8
+ message: string;
9
+ }
package/dist/base.d.ts ADDED
@@ -0,0 +1,231 @@
1
+ import { BridgeTool } from './bridges';
2
+ import { ExchangeTools } from './exchanges';
3
+ export declare enum CoinKey {
4
+ ETH = "ETH",
5
+ MATIC = "MATIC",
6
+ BNB = "BNB",
7
+ DAI = "DAI",
8
+ FTM = "FTM",
9
+ OKT = "OKT",
10
+ AVAX = "AVAX",
11
+ HT = "HT",
12
+ ONE = "ONE",
13
+ FSN = "FSN",
14
+ MOVR = "MOVR",
15
+ EXP = "EXP",
16
+ TCH = "TCH",
17
+ UBQ = "UBQ",
18
+ META = "META",
19
+ DIODE = "DIODE",
20
+ CELO = "CELO",
21
+ FUSE = "FUSE",
22
+ TLOS = "TLOS",
23
+ CRO = "CRO",
24
+ SHIB = "SHIB",
25
+ L1 = "L1",
26
+ RBTC = "RBTC",
27
+ TBG = "TBG",
28
+ VLX = "VLX",
29
+ GLMR = "GLMR",
30
+ METIS = "METIS",
31
+ SOL = "SOL",
32
+ EVM = "EVM",
33
+ USDT = "USDT",
34
+ USDC = "USDC",
35
+ cbtUSDC = "cbtUSDC",
36
+ cbtUSDT = "cbtUSDT",
37
+ cbtWUSDT = "cbtWUSDT",
38
+ cbtWUSDC = "cbtWUSDC",
39
+ cbtCELR = "cbtCELR",
40
+ BUSD = "BUSD",
41
+ USDCe = "USDCe",
42
+ TEST = "TEST",
43
+ KAL = "KAL",
44
+ SDIODE = "SDIODE",
45
+ SPARK = "SPARK",
46
+ TRBTC = "TRBTC",
47
+ CXTT = "CXTT",
48
+ sgMETIS = "sgMETIS",
49
+ sgWOO = "sgWOO",
50
+ sgUSDT = "sgUSDT",
51
+ sgBUSD = "sgBUSD",
52
+ sgUSDC = "sgUSDC",
53
+ WBTC = "WBTC",
54
+ WETH = "WETH",
55
+ SUSHI = "SUSHI",
56
+ DODO = "DODO",
57
+ MCB = "MCB",
58
+ CELR = "CELR",
59
+ IF = "IF"
60
+ }
61
+ export declare enum ChainKey {
62
+ ETH = "eth",
63
+ POL = "pol",
64
+ BSC = "bsc",
65
+ DAI = "dai",
66
+ OKT = "okt",
67
+ FTM = "ftm",
68
+ AVA = "ava",
69
+ ARB = "arb",
70
+ HEC = "hec",
71
+ OPT = "opt",
72
+ ONE = "one",
73
+ FSN = "fsn",
74
+ MOR = "mor",
75
+ EXP = "exp",
76
+ TCH = "tch",
77
+ UBQ = "ubq",
78
+ MET = "met",
79
+ DIO = "dio",
80
+ CEL = "cel",
81
+ FUS = "fus",
82
+ TLO = "tlo",
83
+ CRO = "cro",
84
+ BOB = "bob",
85
+ SHI = "shi",
86
+ GL1 = "gl1",
87
+ RSK = "rsk",
88
+ TBW = "tbw",
89
+ VEL = "vel",
90
+ MOO = "moo",
91
+ MAM = "mam",
92
+ AUR = "aur",
93
+ TER = "ter",
94
+ OAS = "oas",
95
+ SOL = "sol",
96
+ EVM = "evm",
97
+ ARN = "arn",
98
+ ERA = "era",
99
+ PZE = "pze",
100
+ LNA = "lna",
101
+ BAS = "bas",
102
+ GOR = "gor",
103
+ METT = "mett",
104
+ DIOT = "diot",
105
+ MUM = "mum",
106
+ ARBG = "arbg",
107
+ OPTG = "optg",
108
+ BSCT = "bsct",
109
+ HECT = "hect",
110
+ ONET = "onet",
111
+ FUST = "fust",
112
+ TLOT = "tlot",
113
+ RSKT = "rskt",
114
+ SOLT = "solt",
115
+ OAST = "oast",
116
+ TERT = "tert",
117
+ AVAT = "avat",
118
+ EVMT = "evmt",
119
+ MORT = "mort",
120
+ FTMT = "ftmt",
121
+ LNAT = "lnat"
122
+ }
123
+ export declare enum ChainId {
124
+ ETH = 1,
125
+ POL = 137,
126
+ BSC = 56,
127
+ DAI = 100,
128
+ OKT = 66,
129
+ FTM = 250,
130
+ AVA = 43114,
131
+ ARB = 42161,
132
+ HEC = 128,
133
+ OPT = 10,
134
+ ONE = 1666600000,
135
+ FSN = 32659,
136
+ MOR = 1285,
137
+ EXP = 2,
138
+ TCH = 7,
139
+ UBQ = 8,
140
+ MET = 11,
141
+ DIO = 15,
142
+ CEL = 42220,
143
+ FUS = 122,
144
+ TLO = 40,
145
+ CRO = 25,
146
+ BOB = 288,
147
+ SHI = 27,
148
+ GL1 = 29,
149
+ RSK = 30,
150
+ TBW = 35,
151
+ VEL = 106,
152
+ MOO = 1284,
153
+ MAM = 1088,
154
+ AUR = 1313161554,
155
+ SOL = 1151111081099710,
156
+ TER = 1161011141099710,
157
+ OAS = 111971151099710,
158
+ EVM = 9001,
159
+ ARN = 42170,
160
+ ERA = 324,
161
+ PZE = 1101,
162
+ LNA = 59144,
163
+ BAS = 8453,
164
+ GOR = 5,
165
+ METT = 12,
166
+ DIOT = 13,
167
+ MUM = 80001,
168
+ ARBG = 421613,
169
+ OPTG = 420,
170
+ BSCT = 97,
171
+ HECT = 256,
172
+ ONET = 1666700000,
173
+ FUST = 123,
174
+ TLOT = 41,
175
+ RSKT = 31,
176
+ SOLT = 1151111081161011,
177
+ TERT = 1161011141161011,
178
+ OAST = 1119711511610111,
179
+ AVAT = 43113,
180
+ EVMT = 9000,
181
+ MORT = 1287,
182
+ FTMT = 4002,
183
+ LNAT = 59140
184
+ }
185
+ export interface BaseToken {
186
+ chainId: ChainId;
187
+ address: string;
188
+ }
189
+ export interface StaticToken extends BaseToken {
190
+ symbol: string;
191
+ decimals: number;
192
+ name: string;
193
+ coinKey?: CoinKey;
194
+ logoURI?: string;
195
+ }
196
+ export interface Token extends StaticToken {
197
+ priceUSD: string;
198
+ }
199
+ export interface TokenAmount extends Token {
200
+ amount: string;
201
+ blockNumber?: number;
202
+ }
203
+ export interface Coin {
204
+ key: CoinKey;
205
+ name: string;
206
+ logoURI: string;
207
+ verified: boolean;
208
+ chains: {
209
+ [ChainId: string]: StaticToken;
210
+ };
211
+ }
212
+ export interface ExchangeDefinition {
213
+ tool: ExchangeTools;
214
+ chains: number[];
215
+ }
216
+ /**
217
+ * Should not be accessed via the types package anymore
218
+ * @deprecated
219
+ */
220
+ export interface BridgeDefinition {
221
+ tool: BridgeTool;
222
+ fromChainId: number;
223
+ fromToken: BaseToken;
224
+ toChainId: number;
225
+ toToken: BaseToken;
226
+ maximumTransfer: string;
227
+ minimumTransfer: string;
228
+ swapFeeRate: string;
229
+ swapFeeMinimum: string;
230
+ swapFeeMaximum: string;
231
+ }
@@ -1,3 +1,66 @@
1
+ export var CoinKey;
2
+ (function (CoinKey) {
3
+ CoinKey["ETH"] = "ETH";
4
+ CoinKey["MATIC"] = "MATIC";
5
+ CoinKey["BNB"] = "BNB";
6
+ CoinKey["DAI"] = "DAI";
7
+ CoinKey["FTM"] = "FTM";
8
+ CoinKey["OKT"] = "OKT";
9
+ CoinKey["AVAX"] = "AVAX";
10
+ CoinKey["HT"] = "HT";
11
+ CoinKey["ONE"] = "ONE";
12
+ CoinKey["FSN"] = "FSN";
13
+ CoinKey["MOVR"] = "MOVR";
14
+ CoinKey["EXP"] = "EXP";
15
+ CoinKey["TCH"] = "TCH";
16
+ CoinKey["UBQ"] = "UBQ";
17
+ CoinKey["META"] = "META";
18
+ CoinKey["DIODE"] = "DIODE";
19
+ CoinKey["CELO"] = "CELO";
20
+ CoinKey["FUSE"] = "FUSE";
21
+ CoinKey["TLOS"] = "TLOS";
22
+ CoinKey["CRO"] = "CRO";
23
+ CoinKey["SHIB"] = "SHIB";
24
+ CoinKey["L1"] = "L1";
25
+ CoinKey["RBTC"] = "RBTC";
26
+ CoinKey["TBG"] = "TBG";
27
+ CoinKey["VLX"] = "VLX";
28
+ CoinKey["GLMR"] = "GLMR";
29
+ CoinKey["METIS"] = "METIS";
30
+ CoinKey["SOL"] = "SOL";
31
+ CoinKey["EVM"] = "EVM";
32
+ // Stable coins
33
+ CoinKey["USDT"] = "USDT";
34
+ CoinKey["USDC"] = "USDC";
35
+ CoinKey["cbtUSDC"] = "cbtUSDC";
36
+ CoinKey["cbtUSDT"] = "cbtUSDT";
37
+ CoinKey["cbtWUSDT"] = "cbtWUSDT";
38
+ CoinKey["cbtWUSDC"] = "cbtWUSDC";
39
+ CoinKey["cbtCELR"] = "cbtCELR";
40
+ CoinKey["BUSD"] = "BUSD";
41
+ CoinKey["USDCe"] = "USDCe";
42
+ // Testnet
43
+ CoinKey["TEST"] = "TEST";
44
+ CoinKey["KAL"] = "KAL";
45
+ CoinKey["SDIODE"] = "SDIODE";
46
+ CoinKey["SPARK"] = "SPARK";
47
+ CoinKey["TRBTC"] = "TRBTC";
48
+ CoinKey["CXTT"] = "CXTT";
49
+ // stargate testnet tokens
50
+ CoinKey["sgMETIS"] = "sgMETIS";
51
+ CoinKey["sgWOO"] = "sgWOO";
52
+ CoinKey["sgUSDT"] = "sgUSDT";
53
+ CoinKey["sgBUSD"] = "sgBUSD";
54
+ CoinKey["sgUSDC"] = "sgUSDC";
55
+ // Other tokens
56
+ CoinKey["WBTC"] = "WBTC";
57
+ CoinKey["WETH"] = "WETH";
58
+ CoinKey["SUSHI"] = "SUSHI";
59
+ CoinKey["DODO"] = "DODO";
60
+ CoinKey["MCB"] = "MCB";
61
+ CoinKey["CELR"] = "CELR";
62
+ CoinKey["IF"] = "IF";
63
+ })(CoinKey || (CoinKey = {}));
1
64
  export var ChainKey;
2
65
  (function (ChainKey) {
3
66
  ChainKey["ETH"] = "eth";
@@ -39,6 +102,7 @@ export var ChainKey;
39
102
  ChainKey["ERA"] = "era";
40
103
  ChainKey["PZE"] = "pze";
41
104
  ChainKey["LNA"] = "lna";
105
+ ChainKey["BAS"] = "bas";
42
106
  // Testnets
43
107
  ChainKey["GOR"] = "gor";
44
108
  ChainKey["METT"] = "mett";
@@ -102,6 +166,7 @@ export var ChainId;
102
166
  ChainId[ChainId["ERA"] = 324] = "ERA";
103
167
  ChainId[ChainId["PZE"] = 1101] = "PZE";
104
168
  ChainId[ChainId["LNA"] = 59144] = "LNA";
169
+ ChainId[ChainId["BAS"] = 8453] = "BAS";
105
170
  // Testnets
106
171
  ChainId[ChainId["GOR"] = 5] = "GOR";
107
172
  ChainId[ChainId["METT"] = 12] = "METT";
package/dist/bridges.d.ts CHANGED
@@ -1,6 +1,23 @@
1
- import { BaseToken } from './tokens/token';
1
+ /**
2
+ * @deprecated
3
+ * These values are now obtainable from the LI.FI API
4
+ */
5
+ export declare enum BridgeTool {
6
+ connext = "connext",
7
+ hop = "hop",
8
+ multichain = "multichain",
9
+ cbridge = "cbridge",
10
+ hyphen = "hyphen",
11
+ polygon = "polygon",
12
+ arbitrum = "arbitrum",
13
+ avalanche = "avalanche",
14
+ optimism = "optimism",
15
+ across = "across",
16
+ portal = "portal",
17
+ stargate = "stargate"
18
+ }
2
19
  export interface Bridge {
3
- key: string;
20
+ key: BridgeTool;
4
21
  name: string;
5
22
  logoURI: string;
6
23
  bridgeUrl?: string;
@@ -11,18 +28,7 @@ export interface Bridge {
11
28
  analyticsUrl?: string;
12
29
  }
13
30
  /**
14
- * Should not be accessed via the types package anymore
15
31
  * @deprecated
32
+ * These values are now obtainable from the LI.FI API
16
33
  */
17
- export interface BridgeDefinition {
18
- tool: string;
19
- fromChainId: number;
20
- fromToken: BaseToken;
21
- toChainId: number;
22
- toToken: BaseToken;
23
- maximumTransfer: string;
24
- minimumTransfer: string;
25
- swapFeeRate: string;
26
- swapFeeMinimum: string;
27
- swapFeeMaximum: string;
28
- }
34
+ export declare const supportedBridges: Array<Bridge>;