UNPKG

@0xtemple/client

Version:
34 lines (33 loc) 1.56 kB
import { GearApi, PayloadType, HexString } from '@gear-js/api'; import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types'; import { ISubmittableResult } from '@polkadot/types/types'; import { Network, NodeUrlType } from '../../types'; import { ApiPromise, WsProvider } from '@polkadot/api'; import { KeyringPair } from '@polkadot/keyring/types'; /** * `SuiTransactionSender` 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 VaraInteractor { readonly clients: GearApi[]; currentClient: GearApi; readonly fullNodes: NodeUrlType[]; currentFullNode: NodeUrlType; readonly wsProviders?: WsProvider[]; wsProvider?: WsProvider; wsApi?: Promise<ApiPromise>; network?: Network; constructor(fullNodeUrls: NodeUrlType[], network?: Network, connectWs?: boolean); nodeInfo(): Promise<{ chain: string; nodeName: string; nodeVersion: string; }>; switchToNextClient(): void; signAndSend(signer: KeyringPair, tx: SubmittableExtrinsic): Promise<any>; structuredTransaction(signer: KeyringPair, programId: string, payload: PayloadType, metadata: string, gasLimit?: number, value?: number): Promise<SubmittableExtrinsic<"promise", ISubmittableResult>>; getMetaHash(programId: HexString): Promise<`0x${string}`>; queryState(programId: string, payload: PayloadType, metadata: string): Promise<any>; queryBalance(addr: String): Promise<any>; }