UNPKG

1.41 kBTypeScriptView Raw
1import type { BlockNumber, DispatchError, DispatchInfo, EventRecord, ExtrinsicStatus, Hash } from '@polkadot/types/interfaces';
2import type { AnyJson, ISubmittableResult } from '@polkadot/types/types';
3import type { SubmittableResultValue } from './types.js';
4export declare class SubmittableResult implements ISubmittableResult {
5 readonly dispatchError?: DispatchError;
6 readonly dispatchInfo?: DispatchInfo;
7 readonly internalError?: Error;
8 readonly events: EventRecord[];
9 readonly status: ExtrinsicStatus;
10 readonly txHash: Hash;
11 readonly txIndex?: number;
12 readonly blockNumber?: BlockNumber;
13 constructor({ blockNumber, dispatchError, dispatchInfo, events, internalError, status, txHash, txIndex }: SubmittableResultValue);
14 get isCompleted(): boolean;
15 get isError(): boolean;
16 get isFinalized(): boolean;
17 get isInBlock(): boolean;
18 get isWarning(): boolean;
19 /**
20 * @description Filters EventRecords for the specified method & section (there could be multiple)
21 */
22 filterRecords(section: string, method: string | string[]): EventRecord[];
23 /**
24 * @description Finds an EventRecord for the specified method & section
25 */
26 findRecord(section: string, method: string | string[]): EventRecord | undefined;
27 /**
28 * @description Creates a human representation of the output
29 */
30 toHuman(isExtended?: boolean): AnyJson;
31}