@lifi/types 1.15.0 → 1.17.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
+ ## [1.17.0](https://github.com/lifinance/types/compare/v1.16.0...v1.17.0) (2022-11-17)
6
+
7
+
8
+ ### Features
9
+
10
+ * add solana tokens to coins ([#112](https://github.com/lifinance/types/issues/112)) ([c848cdc](https://github.com/lifinance/types/commit/c848cdc6ff8b9b247e19ad46f6ff40c082e034e9))
11
+
12
+ ## [1.16.0](https://github.com/lifinance/types/compare/v1.15.0...v1.16.0) (2022-11-11)
13
+
14
+
15
+ ### Features
16
+
17
+ * add gas info in tx info ([#111](https://github.com/lifinance/types/issues/111)) ([d56277d](https://github.com/lifinance/types/commit/d56277dd22ad19fded6e0aa2a7d5ee2c67861f19))
18
+
5
19
  ## [1.15.0](https://github.com/lifinance/types/compare/v1.14.1...v1.15.0) (2022-11-09)
6
20
 
7
21
 
package/dist/api.d.ts CHANGED
@@ -2,7 +2,7 @@ import { TransactionRequest } from '@ethersproject/providers';
2
2
  import { BridgeDefinition, ChainId, ExchangeDefinition, Step, Token, Chain } from '.';
3
3
  import { ToolError } from './apiErrors';
4
4
  export declare const Orders: readonly ["RECOMMENDED", "FASTEST", "CHEAPEST", "SAFEST"];
5
- export declare 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;
@@ -24,7 +24,7 @@ export interface RouteOptions {
24
24
  exchanges?: AllowDenyPrefer;
25
25
  fee?: number;
26
26
  }
27
- export declare type ToolsResponse = {
27
+ export type ToolsResponse = {
28
28
  exchanges: {
29
29
  key: string;
30
30
  name: string;
@@ -69,7 +69,7 @@ export interface RoutesResponse {
69
69
  routes: Route[];
70
70
  errors: ToolError[];
71
71
  }
72
- export declare type PossibilityTopic = 'chains' | 'tokens' | 'bridges' | 'exchanges';
72
+ export type PossibilityTopic = 'chains' | 'tokens' | 'bridges' | 'exchanges';
73
73
  export interface PossibilitiesRequest {
74
74
  chains?: number[];
75
75
  bridges?: AllowDenyPrefer;
@@ -175,14 +175,17 @@ export interface TransactionInfo {
175
175
  chainId?: ChainId;
176
176
  gasPrice?: string;
177
177
  gasUsed?: string;
178
+ gasToken?: Token;
179
+ gasAmount?: string;
180
+ gasAmountUSD?: string;
178
181
  }
179
182
  declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
180
- export declare type StatusMessage = typeof _StatusMessage[number];
183
+ export type StatusMessage = typeof _StatusMessage[number];
181
184
  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"];
182
- export declare type SubstatusPending = typeof _SubstatusPending[number];
185
+ export type SubstatusPending = typeof _SubstatusPending[number];
183
186
  declare const _SubstatusDone: readonly ["COMPLETED", "PARTIAL", "REFUNDED"];
184
- export declare type SubstatusDone = typeof _SubstatusDone[number];
185
- export declare type Substatus = SubstatusPending | SubstatusDone;
187
+ export type SubstatusDone = typeof _SubstatusDone[number];
188
+ export type Substatus = SubstatusPending | SubstatusDone;
186
189
  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";
187
190
  export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
188
191
  export interface StatusInformation {
@@ -205,26 +208,26 @@ export interface ChainsResponse {
205
208
  export interface ToolsRequest {
206
209
  chains?: ChainId[];
207
210
  }
208
- export declare type TokensRequest = {
211
+ export type TokensRequest = {
209
212
  chains?: ChainId[];
210
213
  };
211
- export declare type TokensResponse = {
214
+ export type TokensResponse = {
212
215
  tokens: {
213
216
  [chainId: number]: Token[];
214
217
  };
215
218
  };
216
- export declare type RequestOptions = {
219
+ export type RequestOptions = {
217
220
  signal?: AbortSignal;
218
221
  };
219
222
  export interface Integrator {
220
223
  integratorId: string;
221
224
  feeBalances: FeeBalance[];
222
225
  }
223
- export declare type FeeBalance = {
226
+ export type FeeBalance = {
224
227
  chainId: ChainId;
225
228
  tokenBalances: TokenBalance[];
226
229
  };
227
- export declare type TokenBalance = {
230
+ export type TokenBalance = {
228
231
  token: Token;
229
232
  amount: string;
230
233
  amountUsd: string;
@@ -1,5 +1,5 @@
1
1
  import { Action } from './step';
2
- export declare type ToolErrorType = 'NO_QUOTE';
2
+ export type ToolErrorType = 'NO_QUOTE';
3
3
  export interface ToolError {
4
4
  errorType: ToolErrorType;
5
5
  code: string;
@@ -16,4 +16,4 @@ export interface AddEthereumChainParameter {
16
16
  rpcUrls: string[];
17
17
  }
18
18
  export declare const prefixChainId: (chainId: number) => string;
19
- export declare type Chain = EVMChain;
19
+ export type Chain = EVMChain;
@@ -1,2 +1,2 @@
1
1
  import { _Chain } from './Chain';
2
- export declare type SolanaChain = _Chain;
2
+ export type SolanaChain = _Chain;
package/dist/cjs/api.d.ts CHANGED
@@ -2,7 +2,7 @@ import { TransactionRequest } from '@ethersproject/providers';
2
2
  import { BridgeDefinition, ChainId, ExchangeDefinition, Step, Token, Chain } from '.';
3
3
  import { ToolError } from './apiErrors';
4
4
  export declare const Orders: readonly ["RECOMMENDED", "FASTEST", "CHEAPEST", "SAFEST"];
5
- export declare 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;
@@ -24,7 +24,7 @@ export interface RouteOptions {
24
24
  exchanges?: AllowDenyPrefer;
25
25
  fee?: number;
26
26
  }
27
- export declare type ToolsResponse = {
27
+ export type ToolsResponse = {
28
28
  exchanges: {
29
29
  key: string;
30
30
  name: string;
@@ -69,7 +69,7 @@ export interface RoutesResponse {
69
69
  routes: Route[];
70
70
  errors: ToolError[];
71
71
  }
72
- export declare type PossibilityTopic = 'chains' | 'tokens' | 'bridges' | 'exchanges';
72
+ export type PossibilityTopic = 'chains' | 'tokens' | 'bridges' | 'exchanges';
73
73
  export interface PossibilitiesRequest {
74
74
  chains?: number[];
75
75
  bridges?: AllowDenyPrefer;
@@ -175,14 +175,17 @@ export interface TransactionInfo {
175
175
  chainId?: ChainId;
176
176
  gasPrice?: string;
177
177
  gasUsed?: string;
178
+ gasToken?: Token;
179
+ gasAmount?: string;
180
+ gasAmountUSD?: string;
178
181
  }
179
182
  declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
180
- export declare type StatusMessage = typeof _StatusMessage[number];
183
+ export type StatusMessage = typeof _StatusMessage[number];
181
184
  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"];
182
- export declare type SubstatusPending = typeof _SubstatusPending[number];
185
+ export type SubstatusPending = typeof _SubstatusPending[number];
183
186
  declare const _SubstatusDone: readonly ["COMPLETED", "PARTIAL", "REFUNDED"];
184
- export declare type SubstatusDone = typeof _SubstatusDone[number];
185
- export declare type Substatus = SubstatusPending | SubstatusDone;
187
+ export type SubstatusDone = typeof _SubstatusDone[number];
188
+ export type Substatus = SubstatusPending | SubstatusDone;
186
189
  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";
187
190
  export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
188
191
  export interface StatusInformation {
@@ -205,26 +208,26 @@ export interface ChainsResponse {
205
208
  export interface ToolsRequest {
206
209
  chains?: ChainId[];
207
210
  }
208
- export declare type TokensRequest = {
211
+ export type TokensRequest = {
209
212
  chains?: ChainId[];
210
213
  };
211
- export declare type TokensResponse = {
214
+ export type TokensResponse = {
212
215
  tokens: {
213
216
  [chainId: number]: Token[];
214
217
  };
215
218
  };
216
- export declare type RequestOptions = {
219
+ export type RequestOptions = {
217
220
  signal?: AbortSignal;
218
221
  };
219
222
  export interface Integrator {
220
223
  integratorId: string;
221
224
  feeBalances: FeeBalance[];
222
225
  }
223
- export declare type FeeBalance = {
226
+ export type FeeBalance = {
224
227
  chainId: ChainId;
225
228
  tokenBalances: TokenBalance[];
226
229
  };
227
- export declare type TokenBalance = {
230
+ export type TokenBalance = {
228
231
  token: Token;
229
232
  amount: string;
230
233
  amountUsd: string;
@@ -1,5 +1,5 @@
1
1
  import { Action } from './step';
2
- export declare type ToolErrorType = 'NO_QUOTE';
2
+ export type ToolErrorType = 'NO_QUOTE';
3
3
  export interface ToolError {
4
4
  errorType: ToolErrorType;
5
5
  code: string;
@@ -16,4 +16,4 @@ export interface AddEthereumChainParameter {
16
16
  rpcUrls: string[];
17
17
  }
18
18
  export declare const prefixChainId: (chainId: number) => string;
19
- export declare type Chain = EVMChain;
19
+ export type Chain = EVMChain;
@@ -1,2 +1,2 @@
1
1
  import { _Chain } from './Chain';
2
- export declare type SolanaChain = _Chain;
2
+ export type SolanaChain = _Chain;
package/dist/cjs/coins.js CHANGED
@@ -19,6 +19,11 @@ const basicCoins = [
19
19
  address: '0x2170ed0880ac9a755fd29b2688956bd959f933f8',
20
20
  decimals: 18,
21
21
  },
22
+ [base_1.ChainId.SOL]: {
23
+ address: '7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs',
24
+ decimals: 8,
25
+ name: 'Wrapped SOL (Wormhole)',
26
+ },
22
27
  [base_1.ChainId.POL]: {
23
28
  address: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619',
24
29
  decimals: 18,
@@ -135,6 +140,11 @@ const basicCoins = [
135
140
  decimals: 18,
136
141
  name: 'Matic Token',
137
142
  },
143
+ [base_1.ChainId.SOL]: {
144
+ address: 'Gz7VkD4MacbEB6yC5XD3HcumEiYx2EtDYYrfikGsvopG',
145
+ decimals: 8,
146
+ name: 'Wrapped Matic (Wormhole)',
147
+ },
138
148
  [base_1.ChainId.BSC]: {
139
149
  address: '0xcc42724c6683b7e57334c4e856f4c9965ed682bd',
140
150
  decimals: 18,
@@ -172,6 +182,11 @@ const basicCoins = [
172
182
  address: '0xb8c77482e45f1f44de1745f52c74426c631bdd52',
173
183
  decimals: 18,
174
184
  },
185
+ [base_1.ChainId.SOL]: {
186
+ address: '9gP2kCy3wA1ctvYWQk75guqXuHfrEomqydHLtcTCqiLa',
187
+ decimals: 8,
188
+ name: 'Wrapped BNB (Wormhole)',
189
+ },
175
190
  [base_1.ChainId.BSC]: {
176
191
  address: '0x0000000000000000000000000000000000000000',
177
192
  decimals: 18,
@@ -223,6 +238,11 @@ const basicCoins = [
223
238
  decimals: 18,
224
239
  name: 'Dai Stablecoin',
225
240
  },
241
+ [base_1.ChainId.SOL]: {
242
+ address: 'EjmyN6qEC1Tf1JxiG1ae7UTJhUxSwk1TCWNWqxWV4J6o',
243
+ decimals: 8,
244
+ name: 'Dai Stablecoin (Wormhole)',
245
+ },
226
246
  [base_1.ChainId.BSC]: {
227
247
  address: '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3',
228
248
  decimals: 18,
@@ -346,6 +366,11 @@ const basicCoins = [
346
366
  address: '0x0000000000000000000000000000000000000000',
347
367
  decimals: 18,
348
368
  },
369
+ [base_1.ChainId.SOL]: {
370
+ address: '8gC27rQF4NEDYfyf5aS8ZmQJUum5gufowKGYRRba4ENN',
371
+ decimals: 8,
372
+ name: 'Fantom Token (Wormhole)',
373
+ },
349
374
  },
350
375
  },
351
376
  // > OKT
@@ -372,6 +397,11 @@ const basicCoins = [
372
397
  address: '0x0000000000000000000000000000000000000000',
373
398
  decimals: 18,
374
399
  },
400
+ [base_1.ChainId.SOL]: {
401
+ address: 'KgV1GvrHQmRBY8sHQQeUKwTm2r2h8t4C8qt12Cw1HVE',
402
+ decimals: 8,
403
+ name: 'Avalanche (Wormhole)',
404
+ },
375
405
  },
376
406
  },
377
407
  // > HT
@@ -452,6 +482,11 @@ const basicCoins = [
452
482
  address: '0xdac17f958d2ee523a2206206994597c13d831ec7',
453
483
  decimals: 6,
454
484
  },
485
+ [base_1.ChainId.SOL]: {
486
+ address: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
487
+ decimals: 6,
488
+ name: 'USDT',
489
+ },
455
490
  [base_1.ChainId.BSC]: {
456
491
  address: '0x55d398326f99059ff775485246999027b3197955',
457
492
  decimals: 18,
@@ -558,6 +593,11 @@ const basicCoins = [
558
593
  address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
559
594
  decimals: 6,
560
595
  },
596
+ [base_1.ChainId.SOL]: {
597
+ address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
598
+ decimals: 6,
599
+ name: 'USD Coin',
600
+ },
561
601
  [base_1.ChainId.BSC]: {
562
602
  address: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d',
563
603
  decimals: 18,
@@ -706,6 +746,11 @@ const basicCoins = [
706
746
  address: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
707
747
  decimals: 8,
708
748
  },
749
+ [base_1.ChainId.SOL]: {
750
+ address: 'qfnqNqs3nCAHjnyCgLRDbBtq4p2MtHZxw8YjSyYhPoL',
751
+ decimals: 8,
752
+ name: 'Wrapped BTC (Wormhole)',
753
+ },
709
754
  [base_1.ChainId.POL]: {
710
755
  address: '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6',
711
756
  decimals: 8,
@@ -783,6 +828,11 @@ const basicCoins = [
783
828
  address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
784
829
  decimals: 18,
785
830
  },
831
+ [base_1.ChainId.SOL]: {
832
+ address: 'AaAEw2VCw1XzgvKB8Rj2DyK2ZVau9fbt2bE8hZFWsMyE',
833
+ decimals: 9,
834
+ name: 'Allbridge from Ethereum',
835
+ },
786
836
  [base_1.ChainId.BSC]: {
787
837
  address: '0x2170ed0880ac9a755fd29b2688956bd959f933f8',
788
838
  decimals: 18,
@@ -895,6 +945,10 @@ const basicCoins = [
895
945
  address: '0x6b3595068778dd592e39a122f4f5a5cf09c90fe2',
896
946
  decimals: 18,
897
947
  },
948
+ [base_1.ChainId.SOL]: {
949
+ address: 'ChVzxWRmrTeSgwd3Ui3UumcN8KX7VK3WaD4KGeSKpypj',
950
+ decimals: 8,
951
+ },
898
952
  [base_1.ChainId.POL]: {
899
953
  address: '0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a',
900
954
  decimals: 18,
@@ -1062,6 +1116,11 @@ const basicCoins = [
1062
1116
  address: '0x471ece3750da237f93b8e339c536989b8978a438',
1063
1117
  decimals: 18,
1064
1118
  },
1119
+ [base_1.ChainId.SOL]: {
1120
+ address: 'GNCjk3FmPPgZTkbQRSxr6nCvLtYMbXKMnRxg8BgJs62e',
1121
+ decimals: 9,
1122
+ name: 'Allbridge from Celo',
1123
+ },
1065
1124
  },
1066
1125
  },
1067
1126
  // > GLMR
@@ -1118,6 +1177,58 @@ const basicCoins = [
1118
1177
  },
1119
1178
  },
1120
1179
  },
1180
+ // > Solana
1181
+ {
1182
+ key: base_1.CoinKey.SOL,
1183
+ name: base_1.CoinKey.SOL,
1184
+ logoURI: 'https://assets.coingecko.com/coins/images/4128/small/solana.png',
1185
+ verified: true,
1186
+ chains: {
1187
+ [base_1.ChainId.SOL]: {
1188
+ address: 'So11111111111111111111111111111111111111112',
1189
+ decimals: 9,
1190
+ name: 'Wrapped SOL',
1191
+ },
1192
+ [base_1.ChainId.ETH]: {
1193
+ address: '0xD31a59c85aE9D8edEFeC411D448f90841571b89c',
1194
+ decimals: 9,
1195
+ name: 'Wrapped SOL (Wormhole)',
1196
+ },
1197
+ [base_1.ChainId.POL]: {
1198
+ address: '0xd93f7E271cB87c23AaA73edC008A79646d1F9912',
1199
+ decimals: 9,
1200
+ name: 'Wrapped SOL (Wormhole)',
1201
+ },
1202
+ [base_1.ChainId.FTM]: {
1203
+ address: '0xd99021C2A33e4Cf243010539c9e9b7c52E0236c1',
1204
+ decimals: 9,
1205
+ name: 'Token Wrapped SOL (Wormhole)',
1206
+ },
1207
+ [base_1.ChainId.AVA]: {
1208
+ address: '0xFE6B19286885a4F7F55AdAD09C3Cd1f906D2478F',
1209
+ decimals: 9,
1210
+ symbol: 'WSOL',
1211
+ name: 'Wrapped SOL (Wormhole)',
1212
+ },
1213
+ [base_1.ChainId.AUR]: {
1214
+ address: '0x3370C8961A1697F22B49c99669C1d98fE63d031D',
1215
+ decimals: 9,
1216
+ symbol: 'WSOL',
1217
+ name: 'Token Wrapped SOL (Wormhole)',
1218
+ },
1219
+ [base_1.ChainId.CEL]: {
1220
+ address: '0x4581E64115d46CcdeE65Be2336bEc86c9BA54C01',
1221
+ decimals: 9,
1222
+ symbol: 'WSOL',
1223
+ name: 'Token Wrapped SOL (Wormhole)',
1224
+ },
1225
+ // Testnet
1226
+ [base_1.ChainId.SOL]: {
1227
+ address: 'So11111111111111111111111111111111111111112',
1228
+ decimals: 9,
1229
+ },
1230
+ },
1231
+ },
1121
1232
  ];
1122
1233
  exports.defaultCoins = basicCoins.map((coin) => {
1123
1234
  var _a, _b;
@@ -1153,6 +1264,15 @@ exports.wrappedTokens = {
1153
1264
  name: 'WETH',
1154
1265
  logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
1155
1266
  },
1267
+ [base_1.ChainId.SOL]: {
1268
+ address: 'So11111111111111111111111111111111111111112',
1269
+ symbol: 'SOL',
1270
+ decimals: 9,
1271
+ chainId: base_1.ChainId.SOL,
1272
+ coinKey: base_1.CoinKey.SOL,
1273
+ name: 'Wrapped SOL',
1274
+ logoURI: 'https://assets.coingecko.com/coins/images/4128/small/solana.png',
1275
+ },
1156
1276
  [base_1.ChainId.BSC]: {
1157
1277
  // https://bscscan.com/token/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
1158
1278
  address: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c',
@@ -14,7 +14,7 @@ export declare enum ExchangeTool {
14
14
  * @deprecated
15
15
  * These values are now obtainable from the LI.FI API
16
16
  */
17
- export declare type ExchangeTools = ExchangeTool | string;
17
+ export type ExchangeTools = ExchangeTool | string;
18
18
  export interface ExchangeAggregator {
19
19
  key: ExchangeTool;
20
20
  name: string;
@@ -41,8 +41,8 @@ export interface Estimate {
41
41
  executionDuration: number;
42
42
  data?: any;
43
43
  }
44
- export declare type Status = 'NOT_STARTED' | 'STARTED' | 'ACTION_REQUIRED' | 'CHAIN_SWITCH_REQUIRED' | 'PENDING' | 'FAILED' | 'DONE' | 'RESUME' | 'CANCELLED';
45
- export declare type ProcessType = 'TOKEN_ALLOWANCE' | 'SWITCH_CHAIN' | 'SWAP' | 'CROSS_CHAIN' | 'RECEIVING_CHAIN' | 'TRANSACTION';
44
+ export type Status = 'NOT_STARTED' | 'STARTED' | 'ACTION_REQUIRED' | 'CHAIN_SWITCH_REQUIRED' | 'PENDING' | 'FAILED' | 'DONE' | 'RESUME' | 'CANCELLED';
45
+ export type ProcessType = 'TOKEN_ALLOWANCE' | 'SWITCH_CHAIN' | 'SWAP' | 'CROSS_CHAIN' | 'RECEIVING_CHAIN' | 'TRANSACTION';
46
46
  export interface Process {
47
47
  startedAt: number;
48
48
  doneAt?: number;
@@ -69,8 +69,8 @@ export interface Execution {
69
69
  gasPrice?: string;
70
70
  }
71
71
  export declare const emptyExecution: Execution;
72
- export declare type StepType = 'swap' | 'cross' | 'lifi' | 'custom';
73
- export declare type StepTool = string;
72
+ export type StepType = 'swap' | 'cross' | 'lifi' | 'custom';
73
+ export type StepTool = string;
74
74
  export interface StepBase {
75
75
  id: string;
76
76
  type: StepType;
@@ -114,4 +114,4 @@ export interface CustomStep extends StepBase {
114
114
  };
115
115
  }
116
116
  export declare function isCustomStep(step: Step): step is CustomStep;
117
- export declare type Step = SwapStep | CrossStep | LifiStep | CustomStep;
117
+ export type Step = SwapStep | CrossStep | LifiStep | CustomStep;
package/dist/coins.js CHANGED
@@ -16,6 +16,11 @@ const basicCoins = [
16
16
  address: '0x2170ed0880ac9a755fd29b2688956bd959f933f8',
17
17
  decimals: 18,
18
18
  },
19
+ [ChainId.SOL]: {
20
+ address: '7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs',
21
+ decimals: 8,
22
+ name: 'Wrapped SOL (Wormhole)',
23
+ },
19
24
  [ChainId.POL]: {
20
25
  address: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619',
21
26
  decimals: 18,
@@ -132,6 +137,11 @@ const basicCoins = [
132
137
  decimals: 18,
133
138
  name: 'Matic Token',
134
139
  },
140
+ [ChainId.SOL]: {
141
+ address: 'Gz7VkD4MacbEB6yC5XD3HcumEiYx2EtDYYrfikGsvopG',
142
+ decimals: 8,
143
+ name: 'Wrapped Matic (Wormhole)',
144
+ },
135
145
  [ChainId.BSC]: {
136
146
  address: '0xcc42724c6683b7e57334c4e856f4c9965ed682bd',
137
147
  decimals: 18,
@@ -169,6 +179,11 @@ const basicCoins = [
169
179
  address: '0xb8c77482e45f1f44de1745f52c74426c631bdd52',
170
180
  decimals: 18,
171
181
  },
182
+ [ChainId.SOL]: {
183
+ address: '9gP2kCy3wA1ctvYWQk75guqXuHfrEomqydHLtcTCqiLa',
184
+ decimals: 8,
185
+ name: 'Wrapped BNB (Wormhole)',
186
+ },
172
187
  [ChainId.BSC]: {
173
188
  address: '0x0000000000000000000000000000000000000000',
174
189
  decimals: 18,
@@ -220,6 +235,11 @@ const basicCoins = [
220
235
  decimals: 18,
221
236
  name: 'Dai Stablecoin',
222
237
  },
238
+ [ChainId.SOL]: {
239
+ address: 'EjmyN6qEC1Tf1JxiG1ae7UTJhUxSwk1TCWNWqxWV4J6o',
240
+ decimals: 8,
241
+ name: 'Dai Stablecoin (Wormhole)',
242
+ },
223
243
  [ChainId.BSC]: {
224
244
  address: '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3',
225
245
  decimals: 18,
@@ -343,6 +363,11 @@ const basicCoins = [
343
363
  address: '0x0000000000000000000000000000000000000000',
344
364
  decimals: 18,
345
365
  },
366
+ [ChainId.SOL]: {
367
+ address: '8gC27rQF4NEDYfyf5aS8ZmQJUum5gufowKGYRRba4ENN',
368
+ decimals: 8,
369
+ name: 'Fantom Token (Wormhole)',
370
+ },
346
371
  },
347
372
  },
348
373
  // > OKT
@@ -369,6 +394,11 @@ const basicCoins = [
369
394
  address: '0x0000000000000000000000000000000000000000',
370
395
  decimals: 18,
371
396
  },
397
+ [ChainId.SOL]: {
398
+ address: 'KgV1GvrHQmRBY8sHQQeUKwTm2r2h8t4C8qt12Cw1HVE',
399
+ decimals: 8,
400
+ name: 'Avalanche (Wormhole)',
401
+ },
372
402
  },
373
403
  },
374
404
  // > HT
@@ -449,6 +479,11 @@ const basicCoins = [
449
479
  address: '0xdac17f958d2ee523a2206206994597c13d831ec7',
450
480
  decimals: 6,
451
481
  },
482
+ [ChainId.SOL]: {
483
+ address: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
484
+ decimals: 6,
485
+ name: 'USDT',
486
+ },
452
487
  [ChainId.BSC]: {
453
488
  address: '0x55d398326f99059ff775485246999027b3197955',
454
489
  decimals: 18,
@@ -555,6 +590,11 @@ const basicCoins = [
555
590
  address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
556
591
  decimals: 6,
557
592
  },
593
+ [ChainId.SOL]: {
594
+ address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
595
+ decimals: 6,
596
+ name: 'USD Coin',
597
+ },
558
598
  [ChainId.BSC]: {
559
599
  address: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d',
560
600
  decimals: 18,
@@ -703,6 +743,11 @@ const basicCoins = [
703
743
  address: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
704
744
  decimals: 8,
705
745
  },
746
+ [ChainId.SOL]: {
747
+ address: 'qfnqNqs3nCAHjnyCgLRDbBtq4p2MtHZxw8YjSyYhPoL',
748
+ decimals: 8,
749
+ name: 'Wrapped BTC (Wormhole)',
750
+ },
706
751
  [ChainId.POL]: {
707
752
  address: '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6',
708
753
  decimals: 8,
@@ -780,6 +825,11 @@ const basicCoins = [
780
825
  address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
781
826
  decimals: 18,
782
827
  },
828
+ [ChainId.SOL]: {
829
+ address: 'AaAEw2VCw1XzgvKB8Rj2DyK2ZVau9fbt2bE8hZFWsMyE',
830
+ decimals: 9,
831
+ name: 'Allbridge from Ethereum',
832
+ },
783
833
  [ChainId.BSC]: {
784
834
  address: '0x2170ed0880ac9a755fd29b2688956bd959f933f8',
785
835
  decimals: 18,
@@ -892,6 +942,10 @@ const basicCoins = [
892
942
  address: '0x6b3595068778dd592e39a122f4f5a5cf09c90fe2',
893
943
  decimals: 18,
894
944
  },
945
+ [ChainId.SOL]: {
946
+ address: 'ChVzxWRmrTeSgwd3Ui3UumcN8KX7VK3WaD4KGeSKpypj',
947
+ decimals: 8,
948
+ },
895
949
  [ChainId.POL]: {
896
950
  address: '0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a',
897
951
  decimals: 18,
@@ -1059,6 +1113,11 @@ const basicCoins = [
1059
1113
  address: '0x471ece3750da237f93b8e339c536989b8978a438',
1060
1114
  decimals: 18,
1061
1115
  },
1116
+ [ChainId.SOL]: {
1117
+ address: 'GNCjk3FmPPgZTkbQRSxr6nCvLtYMbXKMnRxg8BgJs62e',
1118
+ decimals: 9,
1119
+ name: 'Allbridge from Celo',
1120
+ },
1062
1121
  },
1063
1122
  },
1064
1123
  // > GLMR
@@ -1115,6 +1174,58 @@ const basicCoins = [
1115
1174
  },
1116
1175
  },
1117
1176
  },
1177
+ // > Solana
1178
+ {
1179
+ key: CoinKey.SOL,
1180
+ name: CoinKey.SOL,
1181
+ logoURI: 'https://assets.coingecko.com/coins/images/4128/small/solana.png',
1182
+ verified: true,
1183
+ chains: {
1184
+ [ChainId.SOL]: {
1185
+ address: 'So11111111111111111111111111111111111111112',
1186
+ decimals: 9,
1187
+ name: 'Wrapped SOL',
1188
+ },
1189
+ [ChainId.ETH]: {
1190
+ address: '0xD31a59c85aE9D8edEFeC411D448f90841571b89c',
1191
+ decimals: 9,
1192
+ name: 'Wrapped SOL (Wormhole)',
1193
+ },
1194
+ [ChainId.POL]: {
1195
+ address: '0xd93f7E271cB87c23AaA73edC008A79646d1F9912',
1196
+ decimals: 9,
1197
+ name: 'Wrapped SOL (Wormhole)',
1198
+ },
1199
+ [ChainId.FTM]: {
1200
+ address: '0xd99021C2A33e4Cf243010539c9e9b7c52E0236c1',
1201
+ decimals: 9,
1202
+ name: 'Token Wrapped SOL (Wormhole)',
1203
+ },
1204
+ [ChainId.AVA]: {
1205
+ address: '0xFE6B19286885a4F7F55AdAD09C3Cd1f906D2478F',
1206
+ decimals: 9,
1207
+ symbol: 'WSOL',
1208
+ name: 'Wrapped SOL (Wormhole)',
1209
+ },
1210
+ [ChainId.AUR]: {
1211
+ address: '0x3370C8961A1697F22B49c99669C1d98fE63d031D',
1212
+ decimals: 9,
1213
+ symbol: 'WSOL',
1214
+ name: 'Token Wrapped SOL (Wormhole)',
1215
+ },
1216
+ [ChainId.CEL]: {
1217
+ address: '0x4581E64115d46CcdeE65Be2336bEc86c9BA54C01',
1218
+ decimals: 9,
1219
+ symbol: 'WSOL',
1220
+ name: 'Token Wrapped SOL (Wormhole)',
1221
+ },
1222
+ // Testnet
1223
+ [ChainId.SOL]: {
1224
+ address: 'So11111111111111111111111111111111111111112',
1225
+ decimals: 9,
1226
+ },
1227
+ },
1228
+ },
1118
1229
  ];
1119
1230
  export const defaultCoins = basicCoins.map((coin) => {
1120
1231
  var _a, _b;
@@ -1150,6 +1261,15 @@ export const wrappedTokens = {
1150
1261
  name: 'WETH',
1151
1262
  logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
1152
1263
  },
1264
+ [ChainId.SOL]: {
1265
+ address: 'So11111111111111111111111111111111111111112',
1266
+ symbol: 'SOL',
1267
+ decimals: 9,
1268
+ chainId: ChainId.SOL,
1269
+ coinKey: CoinKey.SOL,
1270
+ name: 'Wrapped SOL',
1271
+ logoURI: 'https://assets.coingecko.com/coins/images/4128/small/solana.png',
1272
+ },
1153
1273
  [ChainId.BSC]: {
1154
1274
  // https://bscscan.com/token/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
1155
1275
  address: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c',
@@ -14,7 +14,7 @@ export declare enum ExchangeTool {
14
14
  * @deprecated
15
15
  * These values are now obtainable from the LI.FI API
16
16
  */
17
- export declare type ExchangeTools = ExchangeTool | string;
17
+ export type ExchangeTools = ExchangeTool | string;
18
18
  export interface ExchangeAggregator {
19
19
  key: ExchangeTool;
20
20
  name: string;
package/dist/step.d.ts CHANGED
@@ -41,8 +41,8 @@ export interface Estimate {
41
41
  executionDuration: number;
42
42
  data?: any;
43
43
  }
44
- export declare type Status = 'NOT_STARTED' | 'STARTED' | 'ACTION_REQUIRED' | 'CHAIN_SWITCH_REQUIRED' | 'PENDING' | 'FAILED' | 'DONE' | 'RESUME' | 'CANCELLED';
45
- export declare type ProcessType = 'TOKEN_ALLOWANCE' | 'SWITCH_CHAIN' | 'SWAP' | 'CROSS_CHAIN' | 'RECEIVING_CHAIN' | 'TRANSACTION';
44
+ export type Status = 'NOT_STARTED' | 'STARTED' | 'ACTION_REQUIRED' | 'CHAIN_SWITCH_REQUIRED' | 'PENDING' | 'FAILED' | 'DONE' | 'RESUME' | 'CANCELLED';
45
+ export type ProcessType = 'TOKEN_ALLOWANCE' | 'SWITCH_CHAIN' | 'SWAP' | 'CROSS_CHAIN' | 'RECEIVING_CHAIN' | 'TRANSACTION';
46
46
  export interface Process {
47
47
  startedAt: number;
48
48
  doneAt?: number;
@@ -69,8 +69,8 @@ export interface Execution {
69
69
  gasPrice?: string;
70
70
  }
71
71
  export declare const emptyExecution: Execution;
72
- export declare type StepType = 'swap' | 'cross' | 'lifi' | 'custom';
73
- export declare type StepTool = string;
72
+ export type StepType = 'swap' | 'cross' | 'lifi' | 'custom';
73
+ export type StepTool = string;
74
74
  export interface StepBase {
75
75
  id: string;
76
76
  type: StepType;
@@ -114,4 +114,4 @@ export interface CustomStep extends StepBase {
114
114
  };
115
115
  }
116
116
  export declare function isCustomStep(step: Step): step is CustomStep;
117
- export declare type Step = SwapStep | CrossStep | LifiStep | CustomStep;
117
+ export type Step = SwapStep | CrossStep | LifiStep | CustomStep;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/types",
3
- "version": "1.15.0",
3
+ "version": "1.17.0",
4
4
  "description": "Types for the LI.FI stack",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/index.js",
@@ -70,28 +70,28 @@
70
70
  "url": "https://github.com/lifinance/types"
71
71
  },
72
72
  "dependencies": {
73
- "ethers": "^5.6.9"
73
+ "ethers": "^5.7.2"
74
74
  },
75
75
  "devDependencies": {
76
- "@commitlint/cli": "^17.0.3",
77
- "@commitlint/config-conventional": "^17.0.3",
78
- "@types/jest": "^28.1.4",
79
- "@typescript-eslint/eslint-plugin": "^5.30.6",
80
- "@typescript-eslint/parser": "^5.30.6",
81
- "eslint": "^8.19.0",
76
+ "@commitlint/cli": "^17.2.0",
77
+ "@commitlint/config-conventional": "^17.2.0",
78
+ "@types/jest": "^29.2.2",
79
+ "@typescript-eslint/eslint-plugin": "^5.42.1",
80
+ "@typescript-eslint/parser": "^5.42.1",
81
+ "eslint": "^8.27.0",
82
82
  "eslint-config-prettier": "^8.5.0",
83
83
  "eslint-plugin-prettier": "^4.2.1",
84
- "husky": "^8.0.1",
85
- "jest": "^28.1.2",
84
+ "husky": "^8.0.2",
85
+ "jest": "^29.3.1",
86
86
  "lint-staged": ">=13.0.3",
87
87
  "npm-run-all": "^4.1.5",
88
88
  "pinst": "^3.0.0",
89
89
  "prettier": "^2.7.1",
90
90
  "standard-version": "^9.5.0",
91
- "ts-jest": "^28.0.5",
92
- "ts-loader": "^9.3.1",
93
- "typescript": "^4.7.4",
94
- "webpack": "^5.73.0",
91
+ "ts-jest": "^29.0.3",
92
+ "ts-loader": "^9.4.1",
93
+ "typescript": "^4.8.4",
94
+ "webpack": "^5.75.0",
95
95
  "webpack-cli": "^4.10.0"
96
96
  },
97
97
  "directories": {