14.05.2026 rip

This commit is contained in:
2026-05-14 23:05:50 +03:00
parent 51d0b8b3fc
commit 26a7315ea1
5 changed files with 63 additions and 6 deletions

View File

@@ -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', {})
}