@reservoir0x/relay-sdk
Version:
Relay is the Fastest and Cheapest Way to Bridge and Transact Across Chains.
23 lines • 1.05 kB
TypeScript
import { type Address } from 'viem';
import { type SimulateContractRequest } from '../utils/index.js';
import type { Execute, paths } from '../types/index.js';
export type PriceBody = NonNullable<paths['/price']['post']['requestBody']['content']['application/json']>;
export type PriceBodyOptions = Omit<PriceBody, 'destinationChainId' | 'originChainId' | 'originCurrency' | 'destinationCurrency' | 'amount' | 'recipient'>;
export type GetPriceParameters = {
originChainId: number;
originCurrency: string;
destinationChainId: number;
destinationCurrency: string;
tradeType: PriceBodyOptions['tradeType'];
amount?: string;
user?: Address;
recipient?: Address;
options?: Omit<PriceBodyOptions, 'user' | 'source' | 'txs' | 'tradeType'>;
txs?: (NonNullable<PriceBody['txs']>[0] | SimulateContractRequest)[];
};
/**
* Method to get the price
* @param data - {@link GetPriceParameters}
*/
export declare function getPrice(parameters: GetPriceParameters): Promise<Execute>;
//# sourceMappingURL=getPrice.d.ts.map