@lifi/types 1.11.1 → 1.13.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 +14 -0
- package/dist/api.d.ts +31 -37
- package/dist/cjs/api.d.ts +31 -37
- package/package.json +1 -1
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.13.0](https://github.com/lifinance/types/compare/v1.12.0...v1.13.0) (2022-11-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* moved lifiApi class to the backend ([#106](https://github.com/lifinance/types/issues/106)) ([b416a9c](https://github.com/lifinance/types/commit/b416a9c716423465faa26ae7aca6f652ba5c9587))
|
|
11
|
+
|
|
12
|
+
## [1.12.0](https://github.com/lifinance/types/compare/v1.11.1...v1.12.0) (2022-10-27)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **omni:** add logo for omni bridge ([#105](https://github.com/lifinance/types/issues/105)) ([64ed097](https://github.com/lifinance/types/commit/64ed097fead9ccbcd6cd60dbf9df2ffdada6cec9))
|
|
18
|
+
|
|
5
19
|
### [1.11.1](https://github.com/lifinance/types/compare/v1.11.0...v1.11.1) (2022-10-25)
|
|
6
20
|
|
|
7
21
|
|
package/dist/api.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { TransactionRequest } from '@ethersproject/providers';
|
|
2
|
-
import { BridgeDefinition,
|
|
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
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export interface RoutesRequest {
|
|
7
|
+
fromChainId: number;
|
|
8
|
+
fromAmount: string;
|
|
9
|
+
fromTokenAddress: string;
|
|
10
|
+
fromAddress?: string;
|
|
11
|
+
toChainId: number;
|
|
12
|
+
toTokenAddress: 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
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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,
|
|
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
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export interface RoutesRequest {
|
|
7
|
+
fromChainId: number;
|
|
8
|
+
fromAmount: string;
|
|
9
|
+
fromTokenAddress: string;
|
|
10
|
+
fromAddress?: string;
|
|
11
|
+
toChainId: number;
|
|
12
|
+
toTokenAddress: 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
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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 {};
|