@cyberk/hyperion-sdk
Version:
Hyperion SDK from Cyberk
33 lines (32 loc) • 1.31 kB
TypeScript
import type { QueryOptions } from "@tanstack/query-core";
import { CosmWasmClient } from "@cosmjs/cosmwasm-stargate";
import { SimulationResponse, RawSimulationResponse } from "../types/simulation";
export interface GetQuoteOptions {
client?: CosmWasmClient;
routerContract: string;
offerAmount: string;
offerAsset: string;
askAsset: string;
}
export declare const getQuoteQueryMsg: (options: GetQuoteOptions) => {
simulate_swap_operations: {
operations: {
hyperion: {
offer_asset_info: {
native_token: {
denom: string;
};
};
ask_asset_info: {
native_token: {
denom: string;
};
};
};
}[];
offer_amount: string;
};
};
export declare const getQuoteQueryKey: (options: GetQuoteOptions) => readonly ["simulateSwapOperations", string, string, string, string];
export declare const getQuoteFn: (options: GetQuoteOptions) => Promise<RawSimulationResponse>;
export declare const getQuoteQueryOptions: (options: GetQuoteOptions) => QueryOptions<SimulationResponse | undefined, Error, SimulationResponse | undefined, ReturnType<typeof getQuoteQueryKey>>;