Skip to content

Commit

Permalink
feat(api): add getTokens endpoint (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasmoeller committed May 4, 2022
1 parent 41d9d33 commit 0f4895b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ export type ToolsResponse = {
bridges: Pick<Bridge, 'key' | 'name' | 'logoURI'>[]
}

export type TokensRequest = {
chains?: ChainId[]
}

export type TokensResponse = {
tokens: { [chainId: number]: Token[] }
}

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

export declare class LifiAPI {
Expand All @@ -187,6 +195,8 @@ export declare class LifiAPI {

getToken(request: GetTokenRequest): Promise<Token>

getTokens(request: TokensRequest): TokensResponse

getQuote(request: QuoteRequest): Promise<Step>

getStatus(request: GetStatusRequest): Promise<StatusResponse>
Expand Down

0 comments on commit 0f4895b

Please sign in to comment.