@firefly-exchange/library-sui
Version:
Sui library housing helper methods, classes to interact with Bluefin protocol(s) deployed on Sui
39 lines (38 loc) • 1.95 kB
TypeScript
import { OnChainCallResponse, SuiClient } from "../types";
import { Address, NumStr } from "../types";
import { IBluefinRfqContracts } from "./interfaces/IDeployment";
import { IRfqSwapParams } from "./interfaces";
import { IOnChainCallOptionalParams, ISignerConfig } from "../interfaces";
import { ChainCallsUtils } from "../classes/ChainCallsUtils";
import { ISignerOptions } from "../interfaces/IChainCalls";
export declare class RFQChainCalls extends ChainCallsUtils<IBluefinRfqContracts> {
suiClient: SuiClient;
config: IBluefinRfqContracts;
signerConfig: ISignerConfig;
constructor(_suiClient: SuiClient, _config: IBluefinRfqContracts, options?: ISignerOptions);
/**
* Allows caller to execute authorized swap in vault
* @param swapParams params required for swap call
* @param options: OnChain params call
* Returns OnChainCallResponse
*/
swap(swapParams: IRfqSwapParams, options?: IOnChainCallOptionalParams): Promise<OnChainCallResponse>;
/**
* Allows caller to deposit token in the vault
* @param vault address of the vault
* @param amount The amount of token to be deposited in vault
* @param tokenType The type of the token to be deposited in vault
* @param options: OnChain params call
* Returns OnChainCallResponse
*/
depositInVault(vault: Address, amount: NumStr, tokenType: string, options?: IOnChainCallOptionalParams): Promise<OnChainCallResponse>;
/**
* Allows only manager of the vault to withdraw token from the vault
* @param vault address of the vault
* @param amount The amount of token to be withdraw from vault
* @param tokenType The type of the token to be withdraw from vault
* @param options: OnChain params call
* Returns OnChainCallResponse
*/
withdrawFromVault(vault: Address, amount: NumStr, tokenType: string, options?: IOnChainCallOptionalParams): Promise<OnChainCallResponse>;
}