@firefly-exchange/library-sui
Version:
Sui library housing helper methods, classes to interact with Bluefin protocol(s) deployed on Sui
53 lines (52 loc) • 1.33 kB
TypeScript
import { ZkPayload } from "../../interfaces";
import { BigNumberable, Signer, SuiAddress, TransactionBlock } from "../../types";
import { Address } from "../../types";
import { Pool } from "../types";
export interface IOnChainCallOptionalParams {
txb?: TransactionBlock;
gasBudget?: number;
sender?: string;
sign?: boolean;
dryRun?: boolean;
returnTx?: boolean;
shioFastModeCustomRange?: IShioFastModeCustomRange;
}
export interface ISwapParams {
pool: Pool;
amountIn: BigNumberable;
amountOut: BigNumberable;
aToB: boolean;
byAmountIn: boolean;
slippage: number;
recipient?: SuiAddress;
estimateAmount?: boolean;
applySlippageToPrice?: boolean;
}
export interface ISwapRoute {
fromCoin: string;
toCoin: string;
inputAmount: number | string;
outputAmount: number | string;
slippage: number;
byAmountIn: boolean;
path: Array<IEdge>;
recepient?: SuiAddress;
}
export interface IEdge {
pool: Pool;
a2b: boolean;
byAmountIn: boolean;
amountIn: number;
amountOut: number;
}
export interface ISignerConfig {
signer: Signer;
address: Address;
isUIWallet: boolean;
isZkLogin?: boolean;
zkPayload?: ZkPayload;
}
export interface IShioFastModeCustomRange {
gasPrice: number;
maxGas: number;
}