@0xobelisk/rooch-client
Version:
Tookit for interacting with rooch move framework
45 lines (44 loc) • 2.33 kB
TypeScript
import { Args, Bytes, ModuleABIView, RoochClient, Secp256k1Keypair, Transaction, TypeArgs, TypeTag, NetworkType, GetStatesParams, ObjectStateView, ListStatesParams, PaginatedStateKVViews, ExecuteTransactionResponseView, address, GetEventsByEventHandleParams, PaginatedEventViews } from '@roochnetwork/rooch-sdk';
/**
* `RoochTransaction` is used to send transaction with a given gas coin.
* It always uses the gas coin to pay for the gas,
* and update the gas coin after the transaction.
*/
export declare class RoochInteractor {
readonly clients: RoochClient[];
currentClient: RoochClient;
readonly fullNodes: string[];
currentFullNode: string;
network?: NetworkType;
constructor(fullNodeUrls: string[], network?: NetworkType);
switchToNextProvider(): void;
createSession(sessionArgs: {
appName: string;
appUrl: string;
scopes: string[];
}, signer: Secp256k1Keypair): Promise<import("@roochnetwork/rooch-sdk").Session>;
signAndExecuteTransaction(transaction: Transaction | Bytes, signer: Secp256k1Keypair, option: {
withOutput: boolean;
}): Promise<any>;
executeViewFunction(contractAddress: string, moduleName: string, funcName: string, typeArguments?: TypeTag[], args?: Args[]): Promise<import("@roochnetwork/rooch-sdk").AnnotatedFunctionResultView>;
getModuleAbi(accountAddress: string, moduleName: string): Promise<ModuleABIView>;
getModuleAbis(accountAddress: string, modules: string[]): Promise<ModuleABIView[]>;
getBalance(address: string, coinType: string): Promise<import("@roochnetwork/rooch-sdk").BalanceInfoView>;
getRpcApiVersion(): Promise<string | undefined>;
getChainId(): Promise<bigint>;
getStates(params: GetStatesParams): Promise<ObjectStateView[]>;
listStates(params: ListStatesParams): Promise<PaginatedStateKVViews>;
getEvents(input: GetEventsByEventHandleParams): Promise<PaginatedEventViews>;
transfer(input: {
signer: Secp256k1Keypair;
recipient: address;
amount: number | bigint;
coinType: TypeArgs;
}): Promise<ExecuteTransactionResponseView>;
transferObject(input: {
signer: Secp256k1Keypair;
recipient: address;
objectId: string;
objectType: TypeArgs;
}): Promise<ExecuteTransactionResponseView>;
}