@planq-network/connect
Version:
Light Toolkit for connecting with the Planq network
20 lines (19 loc) • 726 B
TypeScript
import { PromiEvent } from '../types';
/**
* Transforms a `PromiEvent` to a `TransactionResult`.
*/
export declare function toTxResult(pe: PromiEvent<any>): TransactionResult;
/**
* Replacement interface for web3's `PromiEvent`. Instead of emiting events
* to signal different stages, eveything is exposed as a promise. Which ends
* up being nicer when doing promise/async based programming.
*/
export declare class TransactionResult {
private hashFuture;
private receiptFuture;
constructor(pe: PromiEvent<any>);
/** Get (& wait for) transaction hash */
getHash(): Promise<string>;
/** Get (& wait for) transaction receipt */
waitReceipt(): Promise<import("web3-core").TransactionReceipt>;
}