@cyberk/hyperion-sdk
Version:
Hyperion SDK from Cyberk
32 lines (31 loc) • 1.41 kB
TypeScript
import type { StdFee } from "@titanlabjs/titan-types/types";
import { SigningClient } from "@titanlabjs/cosmos/signing-client";
import type { DeliverTxResponse } from "@cosmjs/cosmwasm-stargate";
import type { MutationOptions } from "@tanstack/react-query";
export interface ExecuteSwapVariables {
signingClient: SigningClient;
signerAddress: string;
routerAddress: string;
offerAsset: string;
askAsset: string;
offerAmount: string;
minimumReceiveAmount: string;
to?: string;
deadline?: number;
memo?: string;
fee?: StdFee;
}
export declare const getExecuteSwapContractExecuteMsg: (options: Pick<ExecuteSwapVariables, "offerAsset" | "askAsset" | "offerAmount" | "minimumReceiveAmount" | "to" | "deadline" | "signerAddress" | "routerAddress">) => {
typeUrl: string;
value: import("@titanlabjs/titan-types/cosmwasm/wasm/v1/tx").MsgExecuteContract;
};
export interface ExecuteSwapOptions {
isSimulate?: boolean;
}
export declare const getExecuteSwapQueryKey: (options: ExecuteSwapOptions & ExecuteSwapVariables) => string[];
export declare const executeSwapFn: (variables: ExecuteSwapVariables & {
isSimulate?: boolean;
}) => Promise<bigint | DeliverTxResponse | undefined>;
export declare const getExecuteSwapMutationOptions: (options: {
isSimulate?: boolean;
}) => MutationOptions<bigint | DeliverTxResponse | undefined, Error, ExecuteSwapVariables>;