UNPKG

1.34 kBTypeScriptView Raw
1import type { DispatchError, DispatchInfo, EventRecord, ExtrinsicStatus, Hash } from '@polkadot/types/interfaces';
2import type { AnyJson, ISubmittableResult } from '@polkadot/types/types';
3import type { SubmittableResultValue } from './types';
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 constructor({ dispatchError, dispatchInfo, events, internalError, status, txHash, txIndex }: SubmittableResultValue);
13 get isCompleted(): boolean;
14 get isError(): boolean;
15 get isFinalized(): boolean;
16 get isInBlock(): boolean;
17 get isWarning(): boolean;
18 /**
19 * @description Filters EventRecords for the specified method & section (there could be multiple)
20 */
21 filterRecords(section: string, method: string | string[]): EventRecord[];
22 /**
23 * @description Finds an EventRecord for the specified method & section
24 */
25 findRecord(section: string, method: string | string[]): EventRecord | undefined;
26 /**
27 * @description Creates a human representation of the output
28 */
29 toHuman(isExtended?: boolean): AnyJson;
30}