@firefly-exchange/library-sui
Version:
Sui library housing helper methods, classes to interact with Bluefin protocol(s) deployed on Sui
34 lines (33 loc) • 1.5 kB
TypeScript
import { DryRunTransactionBlockResponse, OnChainCallResponse, Signer, SuiClient, SuiTransactionBlockResponse, TransactionBlock } from "../../../src/types";
import { DeploymentParser } from "../utils/deployment-parser";
import { IBluefinV3OptionalParams, IDeployment } from "../interfaces";
import { TxBuilder } from "./tx-builder";
import { Address } from "../../types";
export declare class OnChainCalls {
suiClient: SuiClient;
signer: Signer;
parser: DeploymentParser;
walletAddress: string;
txBuilder: TxBuilder;
network: string;
constructor(_network: string, _suiClient: SuiClient, _deployment: IDeployment, _signer?: Signer, _walletAddress?: Address);
/**
* Signs and executes the given transaction block
* @param txBlock Sui transaction block
* @returns Sui Transaction Block Response
*/
signAndExecuteTxBlock(txBlock: TransactionBlock): Promise<SuiTransactionBlockResponse>;
/**
* Signs and executes the given transaction block
* @param txBlock Sui transaction block
* @returns Sui Transaction Block Response
*/
dryRunTxBlock(txBlock: TransactionBlock): Promise<DryRunTransactionBlockResponse>;
/**
* Dry runs or executes the call on chain depending on the params
* @param dryRun True if dry run is to be performed
* @param txBlock The transaction block
* @returns
*/
execCall(txBlock: TransactionBlock, options?: IBluefinV3OptionalParams): Promise<OnChainCallResponse>;
}