Skip to content

Commit

Permalink
feat: added required types for LF-672 (#48)
Browse files Browse the repository at this point in the history
* feat: added required types for LF-672
  • Loading branch information
H3xept committed May 3, 2022
1 parent 4c463cb commit 9ff0c74
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {
Step,
Token,
} from '.'
import { Bridge } from './bridges'
import { Exchange, ExchangeAggregator } from './exchanges'

export type Order = 'BEST_VALUE' | 'BEST_FEE' | 'BEST_FEE_GAS' // FAST, LESS_INTERACTIONS, SECURITY, ....

Expand Down Expand Up @@ -161,6 +163,15 @@ export interface ChainsResponse {
chains: Chain[]
}

export interface ToolsRequest {
chains?: ChainId[]
}

export type ToolsResponse = {
exchanges: Pick<Exchange | ExchangeAggregator, 'key' | 'name' | 'logoURI'>[]
bridges: Pick<Bridge, 'key' | 'name' | 'logoURI'>[]
}

export type StatusMessage = 'NOT_FOUND' | 'PENDING' | 'DONE' | 'FAILED'

export declare class LifiAPI {
Expand All @@ -180,6 +191,8 @@ export declare class LifiAPI {

getStatus(request: GetStatusRequest): Promise<StatusResponse>

getTools(request: ToolsRequest): ToolsResponse

getChains(): ChainsResponse

getConnections(request: ConnectionsRequest): Promise<ConnectionsResponse>
Expand Down

0 comments on commit 9ff0c74

Please sign in to comment.