UNPKG

avail-js-sdk

Version:

Avail library of functions to interact with blockchain and manipulate transactions

31 lines (30 loc) 1.41 kB
import { SubmittableExtrinsic } from "@polkadot/api/types"; import { KeyringPair, Events, Client, H256 } from "."; import { TransactionOptions } from "./transaction_options"; import { FeeDetails, RuntimeDispatchInfo } from "./metadata"; export declare enum WaitFor { BlockInclusion = 0, BlockFinalization = 1 } export declare class TransactionDetails { client: Client; events: Events.EventRecords | undefined; txHash: H256; txIndex: number; blockHash: H256; blockNumber: number; constructor(client: Client, events: Events.EventRecords | undefined, txHash: H256, txIndex: number, blockHash: H256, blockNumber: number); isSuccessful(): boolean | undefined; } export declare class Transaction { private client; tx: SubmittableExtrinsic<"promise">; constructor(client: Client, tx: SubmittableExtrinsic<"promise">); executeWaitForInclusion(account: KeyringPair, options: TransactionOptions): Promise<TransactionDetails>; executeWaitForFinalization(account: KeyringPair, options: TransactionOptions): Promise<TransactionDetails>; execute(account: KeyringPair, options: TransactionOptions): Promise<H256>; paymentQueryInfo(address: string): Promise<RuntimeDispatchInfo>; paymentQueryFeeDetails(address: string): Promise<FeeDetails>; paymentQueryCallInfo(): Promise<RuntimeDispatchInfo>; paymentQueryCallFeeDetails(): Promise<FeeDetails>; }