UNPKG

@funkit/fun-relay

Version:
39 lines 1.44 kB
import type { Execute, GetQuoteParameters } from '@reservoir0x/relay-sdk'; import { type Address } from 'viem'; import type { ApiFunkitCheckoutActionParams, CheckoutQuoteResponse, Logger } from './types'; type RelayQuoteOptions = GetQuoteParameters['options'] & {}; export type GetRelayQuoteParams = { actionParams?: ApiFunkitCheckoutActionParams[]; fromChainId: string; fromTokenAddress: Address; logger: Logger; /** * {@link getRelayQuote} already sets {@link RelayQuoteOptions.appFees|appFees} and {@link RelayQuoteOptions.referrer|referrer}. * Only include them if you wish to override. */ options?: RelayQuoteOptions; recipientAddress: Address | undefined; toChainId: string; toTokenAddress: Address; tradeType: 'EXACT_INPUT' | 'EXACT_OUTPUT'; userAddress: Address | undefined; clientId: string; } & ({ fromTokenAmountBaseUnit: bigint | string; tradeType: 'EXACT_INPUT'; } | { toTokenAmountBaseUnit: bigint | string; tradeType: 'EXACT_OUTPUT'; }); export type RelayQuote = CheckoutQuoteResponse & { /** Required for EXACT_INPUT checkouts */ finalToAmountBaseUnit: string; metadata: { fromAmountBaseUnit: string; relayQuote: Execute; toAmountBaseUnit: string; }; }; export declare function getRelayQuote({ logger, ...params }: GetRelayQuoteParams): Promise<RelayQuote>; export {}; //# sourceMappingURL=quote.d.ts.map