Skip to main content

IncludedTransaction

type IncludedTransaction: Pick<PendingTransaction, 
| "transaction"
| "toJSON"
| "toPretty"
| "hash"
| "data"> & {
"status": "included";
};

Represents a transaction that has been successfully included in a block.

Type declaration

status

status: "included";

Example

try {
const includedTx: IncludedTransaction = await pendingTransaction.wait();
// If wait() resolves, it means the transaction was successfully included.
console.log(`Transaction ${includedTx.hash} included in a block.`);
} catch (error) {
// If wait() throws, the transaction was not included in a block.
console.error('Transaction failed to be included in a block:', error);
}

Source

lib/mina/transaction.ts:258