@lifi/types 1.12.0 → 1.14.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.14.0](https://github.com/lifinance/types/compare/v1.13.0...v1.14.0) (2022-11-09)
6
+
7
+
8
+ ### Features
9
+
10
+ * add support for token symbols in /routes ([#107](https://github.com/lifinance/types/issues/107)) ([b149aa0](https://github.com/lifinance/types/commit/b149aa0f43b3a9e78beb7b2e536979bbb6766ade))
11
+
12
+ ## [1.13.0](https://github.com/lifinance/types/compare/v1.12.0...v1.13.0) (2022-11-09)
13
+
14
+
15
+ ### Features
16
+
17
+ * moved lifiApi class to the backend ([#106](https://github.com/lifinance/types/issues/106)) ([b416a9c](https://github.com/lifinance/types/commit/b416a9c716423465faa26ae7aca6f652ba5c9587))
18
+
5
19
  ## [1.12.0](https://github.com/lifinance/types/compare/v1.11.1...v1.12.0) (2022-10-27)
6
20
 
7
21
 
package/dist/api.d.ts CHANGED
@@ -1,14 +1,17 @@
1
1
  import { TransactionRequest } from '@ethersproject/providers';
2
- import { BridgeDefinition, Chain, ChainId, ExchangeDefinition, Step, Token } from '.';
2
+ import { BridgeDefinition, ChainId, ExchangeDefinition, Step, Token, Chain } from '.';
3
3
  import { ToolError } from './apiErrors';
4
- import { Bridge } from './bridges';
5
- import { Exchange, ExchangeAggregator } from './exchanges';
6
4
  export declare const Orders: readonly ["RECOMMENDED", "FASTEST", "CHEAPEST", "SAFEST"];
7
5
  export declare type Order = typeof Orders[number];
8
- export interface AllowDenyPrefer {
9
- allow?: string[];
10
- deny?: string[];
11
- prefer?: string[];
6
+ export interface RoutesRequest {
7
+ fromChainId: number;
8
+ fromAmount: string;
9
+ fromToken: string;
10
+ fromAddress?: string;
11
+ toChainId: number;
12
+ toToken: string;
13
+ toAddress?: string;
14
+ options?: RouteOptions;
12
15
  }
13
16
  export interface RouteOptions {
14
17
  order?: Order;
@@ -21,15 +24,27 @@ export interface RouteOptions {
21
24
  exchanges?: AllowDenyPrefer;
22
25
  fee?: number;
23
26
  }
24
- export interface RoutesRequest {
25
- fromChainId: number;
26
- fromAmount: string;
27
- fromTokenAddress: string;
28
- fromAddress?: string;
29
- toChainId: number;
30
- toTokenAddress: string;
31
- toAddress?: string;
32
- options?: RouteOptions;
27
+ export declare type ToolsResponse = {
28
+ exchanges: {
29
+ key: string;
30
+ name: string;
31
+ logoURI: string;
32
+ supportedChains: ChainId[];
33
+ }[];
34
+ bridges: {
35
+ key: string;
36
+ name: string;
37
+ logoURI: string;
38
+ supportedChains: {
39
+ fromChainId: ChainId;
40
+ toChainId: ChainId;
41
+ }[];
42
+ }[];
43
+ };
44
+ export interface AllowDenyPrefer {
45
+ allow?: string[];
46
+ deny?: string[];
47
+ prefer?: string[];
33
48
  }
34
49
  export interface Route {
35
50
  id: string;
@@ -190,10 +205,6 @@ export interface ChainsResponse {
190
205
  export interface ToolsRequest {
191
206
  chains?: ChainId[];
192
207
  }
193
- export declare type ToolsResponse = {
194
- exchanges: Pick<Exchange | ExchangeAggregator, 'key' | 'name' | 'logoURI'>[];
195
- bridges: Pick<Bridge, 'key' | 'name' | 'logoURI'>[];
196
- };
197
208
  export declare type TokensRequest = {
198
209
  chains?: ChainId[];
199
210
  };
@@ -226,21 +237,4 @@ export interface IntegratorWithdrawalRequest {
226
237
  export interface IntegratorWithdrawalTransactionResponse {
227
238
  transactionRequest: TransactionRequest;
228
239
  }
229
- export declare class LifiAPI {
230
- getRoutes(request: RoutesRequest): Promise<RoutesResponse>;
231
- getPossibilities(request?: PossibilitiesRequest): Promise<PossibilitiesResponse>;
232
- updateRoute(route: Route): Promise<Route>;
233
- getStepTransaction(step: Step): Promise<Step>;
234
- getToken(request: GetTokenRequest): Promise<Token>;
235
- getTokens(request: TokensRequest): Promise<TokensResponse>;
236
- getQuote(request: QuoteRequest): Promise<Step>;
237
- getContractCallQuote(request: ContractCallQuoteRequest): Promise<Step>;
238
- getContractCallQuotes(request: ContractCallQuotesRequest): Promise<Step>;
239
- getStatus(request: GetStatusRequest): Promise<StatusResponse>;
240
- getTools(request: ToolsRequest): Promise<ToolsResponse>;
241
- getChains(): Promise<ChainsResponse>;
242
- getConnections(request: ConnectionsRequest): Promise<ConnectionsResponse>;
243
- getIntegratorData(integratorAddress: string): Promise<Integrator>;
244
- getIntegratorWithdrawalTransaction(request: IntegratorWithdrawalRequest): Promise<IntegratorWithdrawalTransactionResponse>;
245
- }
246
240
  export {};
package/dist/cjs/api.d.ts CHANGED
@@ -1,14 +1,17 @@
1
1
  import { TransactionRequest } from '@ethersproject/providers';
2
- import { BridgeDefinition, Chain, ChainId, ExchangeDefinition, Step, Token } from '.';
2
+ import { BridgeDefinition, ChainId, ExchangeDefinition, Step, Token, Chain } from '.';
3
3
  import { ToolError } from './apiErrors';
4
- import { Bridge } from './bridges';
5
- import { Exchange, ExchangeAggregator } from './exchanges';
6
4
  export declare const Orders: readonly ["RECOMMENDED", "FASTEST", "CHEAPEST", "SAFEST"];
7
5
  export declare type Order = typeof Orders[number];
8
- export interface AllowDenyPrefer {
9
- allow?: string[];
10
- deny?: string[];
11
- prefer?: string[];
6
+ export interface RoutesRequest {
7
+ fromChainId: number;
8
+ fromAmount: string;
9
+ fromToken: string;
10
+ fromAddress?: string;
11
+ toChainId: number;
12
+ toToken: string;
13
+ toAddress?: string;
14
+ options?: RouteOptions;
12
15
  }
13
16
  export interface RouteOptions {
14
17
  order?: Order;
@@ -21,15 +24,27 @@ export interface RouteOptions {
21
24
  exchanges?: AllowDenyPrefer;
22
25
  fee?: number;
23
26
  }
24
- export interface RoutesRequest {
25
- fromChainId: number;
26
- fromAmount: string;
27
- fromTokenAddress: string;
28
- fromAddress?: string;
29
- toChainId: number;
30
- toTokenAddress: string;
31
- toAddress?: string;
32
- options?: RouteOptions;
27
+ export declare type ToolsResponse = {
28
+ exchanges: {
29
+ key: string;
30
+ name: string;
31
+ logoURI: string;
32
+ supportedChains: ChainId[];
33
+ }[];
34
+ bridges: {
35
+ key: string;
36
+ name: string;
37
+ logoURI: string;
38
+ supportedChains: {
39
+ fromChainId: ChainId;
40
+ toChainId: ChainId;
41
+ }[];
42
+ }[];
43
+ };
44
+ export interface AllowDenyPrefer {
45
+ allow?: string[];
46
+ deny?: string[];
47
+ prefer?: string[];
33
48
  }
34
49
  export interface Route {
35
50
  id: string;
@@ -190,10 +205,6 @@ export interface ChainsResponse {
190
205
  export interface ToolsRequest {
191
206
  chains?: ChainId[];
192
207
  }
193
- export declare type ToolsResponse = {
194
- exchanges: Pick<Exchange | ExchangeAggregator, 'key' | 'name' | 'logoURI'>[];
195
- bridges: Pick<Bridge, 'key' | 'name' | 'logoURI'>[];
196
- };
197
208
  export declare type TokensRequest = {
198
209
  chains?: ChainId[];
199
210
  };
@@ -226,21 +237,4 @@ export interface IntegratorWithdrawalRequest {
226
237
  export interface IntegratorWithdrawalTransactionResponse {
227
238
  transactionRequest: TransactionRequest;
228
239
  }
229
- export declare class LifiAPI {
230
- getRoutes(request: RoutesRequest): Promise<RoutesResponse>;
231
- getPossibilities(request?: PossibilitiesRequest): Promise<PossibilitiesResponse>;
232
- updateRoute(route: Route): Promise<Route>;
233
- getStepTransaction(step: Step): Promise<Step>;
234
- getToken(request: GetTokenRequest): Promise<Token>;
235
- getTokens(request: TokensRequest): Promise<TokensResponse>;
236
- getQuote(request: QuoteRequest): Promise<Step>;
237
- getContractCallQuote(request: ContractCallQuoteRequest): Promise<Step>;
238
- getContractCallQuotes(request: ContractCallQuotesRequest): Promise<Step>;
239
- getStatus(request: GetStatusRequest): Promise<StatusResponse>;
240
- getTools(request: ToolsRequest): Promise<ToolsResponse>;
241
- getChains(): Promise<ChainsResponse>;
242
- getConnections(request: ConnectionsRequest): Promise<ConnectionsResponse>;
243
- getIntegratorData(integratorAddress: string): Promise<Integrator>;
244
- getIntegratorWithdrawalTransaction(request: IntegratorWithdrawalRequest): Promise<IntegratorWithdrawalTransactionResponse>;
245
- }
246
240
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/types",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "Types for the LI.FI stack",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/index.js",