@celo/connect › "utils/tx-result" › TransactionResult
Class: 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.
Hierarchy
- TransactionResult
Index
Constructors
Methods
Constructors
constructor
+ new TransactionResult(pe
: PromiEvent‹any›): TransactionResult
Defined in packages/sdk/connect/src/utils/tx-result.ts:21
Parameters:
Name | Type |
---|---|
pe |
PromiEvent‹any› |
Returns: TransactionResult
Methods
getHash
▸ getHash(): Promise‹string›
Defined in packages/sdk/connect/src/utils/tx-result.ts:45
Get (& wait for) transaction hash
Returns: Promise‹string›
waitReceipt
▸ waitReceipt(): Promise‹CeloTxReceipt›
Defined in packages/sdk/connect/src/utils/tx-result.ts:57
Get (& wait for) transaction receipt
Returns: Promise‹CeloTxReceipt›