@lifi/types 1.20.0 → 1.22.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,21 @@
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.22.0](https://github.com/lifinance/types/compare/v1.21.0...v1.22.0) (2023-02-06)
6
+
7
+
8
+ ### Features
9
+
10
+ * add opt allowDestCall flag to /routes,/quote ([#122](https://github.com/lifinance/types/issues/122)) ([a899bf2](https://github.com/lifinance/types/commit/a899bf2fee112de6fff002ee0c737f3325f71efa))
11
+ * make properties of Interface GetStatusRequest optional ([f2be836](https://github.com/lifinance/types/commit/f2be8362c4cad7227dba9ff4d4d9d885b9de4bc5))
12
+
13
+ ## [1.21.0](https://github.com/lifinance/types/compare/v1.20.0...v1.21.0) (2023-01-26)
14
+
15
+
16
+ ### Features
17
+
18
+ * add lif3swap dex on POL and BSC ([#120](https://github.com/lifinance/types/issues/120)) ([b213e28](https://github.com/lifinance/types/commit/b213e281ce777465180b11a0585ad71f98404df7))
19
+
5
20
  ## [1.20.0](https://github.com/lifinance/types/compare/v1.19.0...v1.20.0) (2022-12-21)
6
21
 
7
22
 
package/dist/api.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { TransactionRequest } from '@ethersproject/providers';
2
- import { BridgeDefinition, ChainId, ExchangeDefinition, Step, Token, Chain } from '.';
2
+ import { BridgeDefinition, Chain, ChainId, ExchangeDefinition, Step, Token } from '.';
3
3
  import { ToolError } from './apiErrors';
4
4
  export declare const Orders: readonly ["RECOMMENDED", "FASTEST", "CHEAPEST", "SAFEST"];
5
5
  export type Order = typeof Orders[number];
@@ -19,6 +19,7 @@ export interface RouteOptions {
19
19
  infiniteApproval?: boolean;
20
20
  allowSwitchChain?: boolean;
21
21
  integrator?: string;
22
+ allowDestinationCall?: boolean;
22
23
  referrer?: string;
23
24
  bridges?: AllowDenyPrefer;
24
25
  exchanges?: AllowDenyPrefer;
@@ -107,6 +108,7 @@ export interface QuoteRequest extends ToolConfiguration {
107
108
  integrator?: string;
108
109
  referrer?: string;
109
110
  fee?: number | string;
111
+ allowDestinationCall?: boolean;
110
112
  }
111
113
  export interface ContractCallQuoteRequest extends ToolConfiguration {
112
114
  fromChain: number | string;
@@ -125,6 +127,7 @@ export interface ContractCallQuoteRequest extends ToolConfiguration {
125
127
  integrator?: string;
126
128
  referrer?: string;
127
129
  fee?: number | string;
130
+ allowDestinationCall?: boolean;
128
131
  }
129
132
  export interface ContractCallQuotesRequest extends ToolConfiguration {
130
133
  fromChain: number | string;
@@ -164,8 +167,8 @@ export interface ConnectionsResponse {
164
167
  export interface GetStatusRequest {
165
168
  txHash: string;
166
169
  bridge?: string;
167
- fromChain: number | string;
168
- toChain: number | string;
170
+ fromChain?: number | string;
171
+ toChain?: number | string;
169
172
  }
170
173
  export interface TransactionInfo {
171
174
  txHash: string;
package/dist/cjs/api.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { TransactionRequest } from '@ethersproject/providers';
2
- import { BridgeDefinition, ChainId, ExchangeDefinition, Step, Token, Chain } from '.';
2
+ import { BridgeDefinition, Chain, ChainId, ExchangeDefinition, Step, Token } from '.';
3
3
  import { ToolError } from './apiErrors';
4
4
  export declare const Orders: readonly ["RECOMMENDED", "FASTEST", "CHEAPEST", "SAFEST"];
5
5
  export type Order = typeof Orders[number];
@@ -19,6 +19,7 @@ export interface RouteOptions {
19
19
  infiniteApproval?: boolean;
20
20
  allowSwitchChain?: boolean;
21
21
  integrator?: string;
22
+ allowDestinationCall?: boolean;
22
23
  referrer?: string;
23
24
  bridges?: AllowDenyPrefer;
24
25
  exchanges?: AllowDenyPrefer;
@@ -107,6 +108,7 @@ export interface QuoteRequest extends ToolConfiguration {
107
108
  integrator?: string;
108
109
  referrer?: string;
109
110
  fee?: number | string;
111
+ allowDestinationCall?: boolean;
110
112
  }
111
113
  export interface ContractCallQuoteRequest extends ToolConfiguration {
112
114
  fromChain: number | string;
@@ -125,6 +127,7 @@ export interface ContractCallQuoteRequest extends ToolConfiguration {
125
127
  integrator?: string;
126
128
  referrer?: string;
127
129
  fee?: number | string;
130
+ allowDestinationCall?: boolean;
128
131
  }
129
132
  export interface ContractCallQuotesRequest extends ToolConfiguration {
130
133
  fromChain: number | string;
@@ -164,8 +167,8 @@ export interface ConnectionsResponse {
164
167
  export interface GetStatusRequest {
165
168
  txHash: string;
166
169
  bridge?: string;
167
- fromChain: number | string;
168
- toChain: number | string;
170
+ fromChain?: number | string;
171
+ toChain?: number | string;
169
172
  }
170
173
  export interface TransactionInfo {
171
174
  txHash: string;
@@ -171,6 +171,21 @@ exports.supportedExchanges = [
171
171
  (0, _1.findDefaultToken)(_1.CoinKey.SUSHI, _1.ChainId.POL),
172
172
  ],
173
173
  },
174
+ {
175
+ key: 'lif3swap-pol',
176
+ name: 'Lif3 Swap',
177
+ chainId: _1.ChainId.POL,
178
+ webUrl: 'https://lif3.com/',
179
+ logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/lif3.png',
180
+ tokenlistUrl: 'https://assets.lif3.com/swap/polygon/tokens.json',
181
+ routerAddress: '0x67dC2703D306F72E94DbB0cE0aa0CB86149EAc70',
182
+ factoryAddress: '0x3FB1E7D5d9C974141A5B6E5fa4edab0a7Aa15C6A',
183
+ initCodeHash: '0x57cf36086932d62d26c562d18d87afe373f166c06011dc35be0783e29c6eb4eb',
184
+ baseTokens: [
185
+ (0, _1.findWrappedGasOnChain)(_1.ChainId.POL),
186
+ (0, _1.findDefaultToken)(_1.CoinKey.USDC, _1.ChainId.POL),
187
+ ],
188
+ },
174
189
  // 56 - Binance Smart Chain
175
190
  {
176
191
  key: 'pancakeswap-bsc',
@@ -237,6 +252,21 @@ exports.supportedExchanges = [
237
252
  (0, _1.findDefaultToken)(_1.CoinKey.SUSHI, _1.ChainId.BSC),
238
253
  ],
239
254
  },
255
+ {
256
+ key: 'lif3swap-bsc',
257
+ name: 'Lif3 Swap',
258
+ logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/lif3.png',
259
+ chainId: _1.ChainId.BSC,
260
+ webUrl: 'https://lif3.com/',
261
+ tokenlistUrl: 'https://assets.lif3.com/swap/bnb/tokens.json',
262
+ routerAddress: '0x1956005bA9690B7A00b09c78769675C0cE1457AF',
263
+ factoryAddress: '0x3FB1E7D5d9C974141A5B6E5fa4edab0a7Aa15C6A',
264
+ initCodeHash: '0x57cf36086932d62d26c562d18d87afe373f166c06011dc35be0783e29c6eb4eb',
265
+ baseTokens: [
266
+ (0, _1.findWrappedGasOnChain)(_1.ChainId.BSC),
267
+ (0, _1.findDefaultToken)(_1.CoinKey.USDC, _1.ChainId.BSC),
268
+ ],
269
+ },
240
270
  // 100 - Gnosis
241
271
  {
242
272
  key: 'honeyswap-dai',
package/dist/exchanges.js CHANGED
@@ -168,6 +168,21 @@ export const supportedExchanges = [
168
168
  findDefaultToken(CoinKey.SUSHI, ChainId.POL),
169
169
  ],
170
170
  },
171
+ {
172
+ key: 'lif3swap-pol',
173
+ name: 'Lif3 Swap',
174
+ chainId: ChainId.POL,
175
+ webUrl: 'https://lif3.com/',
176
+ logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/lif3.png',
177
+ tokenlistUrl: 'https://assets.lif3.com/swap/polygon/tokens.json',
178
+ routerAddress: '0x67dC2703D306F72E94DbB0cE0aa0CB86149EAc70',
179
+ factoryAddress: '0x3FB1E7D5d9C974141A5B6E5fa4edab0a7Aa15C6A',
180
+ initCodeHash: '0x57cf36086932d62d26c562d18d87afe373f166c06011dc35be0783e29c6eb4eb',
181
+ baseTokens: [
182
+ findWrappedGasOnChain(ChainId.POL),
183
+ findDefaultToken(CoinKey.USDC, ChainId.POL),
184
+ ],
185
+ },
171
186
  // 56 - Binance Smart Chain
172
187
  {
173
188
  key: 'pancakeswap-bsc',
@@ -234,6 +249,21 @@ export const supportedExchanges = [
234
249
  findDefaultToken(CoinKey.SUSHI, ChainId.BSC),
235
250
  ],
236
251
  },
252
+ {
253
+ key: 'lif3swap-bsc',
254
+ name: 'Lif3 Swap',
255
+ logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/lif3.png',
256
+ chainId: ChainId.BSC,
257
+ webUrl: 'https://lif3.com/',
258
+ tokenlistUrl: 'https://assets.lif3.com/swap/bnb/tokens.json',
259
+ routerAddress: '0x1956005bA9690B7A00b09c78769675C0cE1457AF',
260
+ factoryAddress: '0x3FB1E7D5d9C974141A5B6E5fa4edab0a7Aa15C6A',
261
+ initCodeHash: '0x57cf36086932d62d26c562d18d87afe373f166c06011dc35be0783e29c6eb4eb',
262
+ baseTokens: [
263
+ findWrappedGasOnChain(ChainId.BSC),
264
+ findDefaultToken(CoinKey.USDC, ChainId.BSC),
265
+ ],
266
+ },
237
267
  // 100 - Gnosis
238
268
  {
239
269
  key: 'honeyswap-dai',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/types",
3
- "version": "1.20.0",
3
+ "version": "1.22.0",
4
4
  "description": "Types for the LI.FI stack",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/index.js",