import { BlockResponse, OperationContentsAndResult, OperationResultStatusEnum } from '@taquito/rpc'; import { Observable, ReplaySubject } from 'rxjs'; import { Context } from '../context'; import { Receipt } from './receipt'; import { BlockIdentifier } from '../read-provider/interface'; export type OperationStatus = 'pending' | 'unknown' | OperationResultStatusEnum; /** * WalletOperation allows to monitor operation inclusion on chains and surface information related to the operation */ export declare class WalletOperation { readonly opHash: string; protected readonly context: Context; private _newHead$; protected _operationResult: ReplaySubject; protected _includedInBlock: ReplaySubject; protected _included: boolean; private lastHead; protected newHead$: Observable; private confirmed$; operationResults(): Promise; protected getInclusionBlock(): Promise; private getOperationResultsIfIncluded; /** * Receipt expose the total amount of tezos token burn and spent on fees * The promise returned by receipt will resolve only once the transaction is included */ receipt(): Promise; /** * * @param opHash Operation hash * @param context Taquito context allowing access to rpc and signer * @throws {InvalidOperationHashError} */ constructor(opHash: string, context: Context, _newHead$: Observable); getCurrentConfirmation(): Promise; isInCurrentBranch(tipBlockIdentifier?: BlockIdentifier): Promise; confirmationObservable(confirmations?: number): Observable<{ block: BlockResponse; expectedConfirmation: number; currentConfirmation: number; completed: boolean; isInCurrentBranch: () => Promise; }>; /** * * @param confirmations [0] Number of confirmation to wait for */ confirmation(confirmations?: number): Promise<{ block: BlockResponse; expectedConfirmation: number; currentConfirmation: number; completed: boolean; isInCurrentBranch: () => Promise; } | undefined>; }