Skip to main content

Class: Transaction

Represents a transaction that can be awaited for completion

Constructors

new Transaction()

new Transaction(txHash, client): Transaction

Parameters

ParameterType

txHash

Uint8Array<ArrayBufferLike>

client

PublicClient

Returns

Transaction

Defined

@nilfoundation/niljs/src/utils/transaction.ts:13

Properties

hash

readonly hash: 0x${string};

Defined

@nilfoundation/niljs/src/utils/transaction.ts:11

Methods

wait()

wait(options?): Promise<ProcessedReceipt[]>

Makes it so that the client waits until the processing of the transaction whose hash is passed.

Parameters

ParameterTypeDescription

options?

TransactionOptions

The options for the wait operation.

Returns

Promise<ProcessedReceipt[]>

A promise that resolves to an array of processed receipts.

Async

Example

await transaction.wait();

Defined

@nilfoundation/niljs/src/utils/transaction.ts:31