14.05.2026 rip
This commit is contained in:
@@ -193,6 +193,50 @@ export async function getRelayQuote(payload: RelayQuotePayload): Promise<RelayQu
|
||||
return walletPost<RelayQuoteResponse>('/api/relay/quote', payload)
|
||||
}
|
||||
|
||||
export interface RelaySwapStep {
|
||||
id: string
|
||||
action: string
|
||||
description: string
|
||||
kind: string
|
||||
items: Array<{
|
||||
status: string
|
||||
data: {
|
||||
from: string
|
||||
to: string
|
||||
data: string
|
||||
value: string
|
||||
chainId: number
|
||||
gas: string
|
||||
maxFeePerGas: string
|
||||
maxPriorityFeePerGas: string
|
||||
}
|
||||
check: {
|
||||
endpoint: string
|
||||
method: string
|
||||
}
|
||||
}>
|
||||
requestId: string
|
||||
}
|
||||
|
||||
export interface RelaySwapResponse {
|
||||
steps: RelaySwapStep[]
|
||||
fees: RelayQuoteResponse['fees']
|
||||
details: {
|
||||
operation: string
|
||||
sender: string
|
||||
recipient: string
|
||||
currencyIn: { amount: string; amountFormatted: string; amountUsd: string; currency: unknown }
|
||||
currencyOut: { amount: string; amountFormatted: string; amountUsd: string; currency: unknown }
|
||||
totalImpact: { usd: string; percent: string }
|
||||
rate: string
|
||||
timeEstimate: number
|
||||
}
|
||||
}
|
||||
|
||||
export async function executeRelaySwap(payload: RelayQuotePayload): Promise<RelaySwapResponse> {
|
||||
return walletPost<RelaySwapResponse>('/api/relay/execute/swap', payload)
|
||||
}
|
||||
|
||||
export async function createWallet(): Promise<void> {
|
||||
await walletPost<unknown>('/api/wallets/create', {})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user