UNPKG

@reservoir0x/relay-sdk

Version:

Relay is the Fastest and Cheapest Way to Bridge and Transact Across Chains.

23 lines 1.06 kB
import { type WalletClient } from 'viem'; import { type SimulateContractRequest } from '../utils/index.js'; import type { AdaptedWallet, Execute, paths } from '../types/index.js'; export type QuoteBody = NonNullable<paths['/quote']['post']['requestBody']['content']['application/json']>; export type QuoteBodyOptions = Omit<QuoteBody, 'destinationChainId' | 'originChainId' | 'originCurrency' | 'destinationCurrency' | 'amount' | 'recipient'>; export type GetQuoteParameters = { chainId: number; currency: string; toChainId: number; toCurrency: string; tradeType: QuoteBodyOptions['tradeType']; wallet?: AdaptedWallet | WalletClient; amount?: string; recipient?: string; options?: Omit<QuoteBodyOptions, 'user' | 'source' | 'txs' | 'tradeType'>; txs?: (NonNullable<QuoteBody['txs']>[0] | SimulateContractRequest)[]; }; /** * Method to get a quote * @param data - {@link GetQuoteParameters} */ export declare function getQuote(parameters: GetQuoteParameters): Promise<Execute>; //# sourceMappingURL=getQuote.d.ts.map