Class: SentTx
contract.SentTx
The SentTx class represents a sent transaction through the PXE, providing methods to fetch its hash, receipt, and mining status.
Hierarchy
-
SentTx
Constructors
constructor
• new SentTx(pxe
, txHashPromise
): SentTx
Parameters
Name | Type |
---|---|
pxe | PXE |
txHashPromise | Promise <TxHash > |
Returns
Properties
pxe
• Protected
pxe: PXE
txHashPromise
• Protected
txHashPromise: Promise
<TxHash
>
Methods
getReceipt
▸ getReceipt(): Promise
<TxReceipt
>
Retrieve the transaction receipt associated with the current SentTx instance. The function fetches the transaction hash using 'getTxHash' and then queries the PXE to get the corresponding transaction receipt.
Returns
Promise
<TxReceipt
>
A promise that resolves to a TxReceipt object representing the fetched transaction receipt.
getTxHash
▸ getTxHash(): Promise
<TxHash
>
Retrieves the transaction hash of the SentTx instance. The function internally awaits for the 'txHashPromise' to resolve, and then returns the resolved transaction hash.
Returns
Promise
<TxHash
>
A promise that resolves to the transaction hash of the SentTx instance.
getUnencryptedLogs
▸ getUnencryptedLogs(): Promise
<GetUnencryptedLogsResponse
>
Gets unencrypted logs emitted by this tx.
Returns
Promise
<GetUnencryptedLogsResponse
>
The requested logs.
Remarks
This function will wait for the tx to be mined if it hasn't been already.
getVisibleNotes
▸ getVisibleNotes(): Promise
<ExtendedNote
[]>
Get notes of accounts registered in the provided PXE/Wallet created in this tx.
Returns
Promise
<ExtendedNote
[]>
The requested notes.
Remarks
This function will wait for the tx to be mined if it hasn't been already.
wait
▸ wait(opts?
): Promise
<FieldsOf
<TxReceipt
>>
Awaits for a tx to be mined and returns the receipt. Throws if tx is not mined.
Parameters
Name | Type | Description |
---|---|---|
opts? | WaitOpts | Options for configuring the waiting for the tx to be mined. |
Returns
Promise
<FieldsOf
<TxReceipt
>>
The transaction receipt.
waitForReceipt
▸ waitForReceipt(opts?
): Promise
<TxReceipt
>
Parameters
Name | Type |
---|---|
opts? | WaitOpts |
Returns
Promise
<TxReceipt
>