Skip to main content

Class: Transaction

Defined in: bee-js/src/modules/transaction.ts:12

Pending transaction operations for the Bee node's /transactions queue.

Accessed as bee.transaction.

Constructors

Constructor

new Transaction(context): Transaction

Defined in: bee-js/src/modules/transaction.ts:13

Parameters

context

BeeContext

Returns

Transaction

Methods

cancel()

cancel(transactionHash, gasPrice?, requestOptions?): Promise<TransactionId>

Defined in: bee-js/src/modules/transaction.ts:63

Cancels a currently pending transaction.

Parameters

transactionHash

Hash of the transaction

string | Uint8Array<ArrayBufferLike> | TransactionId

gasPrice?

Optional gas price

string | bigint | NumberString

requestOptions?

BeeRequestOptions

Options for making requests, such as timeouts, custom HTTP agents, headers, etc.

Returns

Promise<TransactionId>


get()

get(transactionHash, requestOptions?): Promise<TransactionInfo>

Defined in: bee-js/src/modules/transaction.ts:30

Fetches the transaction information for a specific pending transaction.

Parameters

transactionHash

Hash of the transaction

string | Uint8Array<ArrayBufferLike> | TransactionId

requestOptions?

BeeRequestOptions

Options for making requests, such as timeouts, custom HTTP agents, headers, etc.

Returns

Promise<TransactionInfo>


getAll()

getAll(requestOptions?): Promise<TransactionInfo[]>

Defined in: bee-js/src/modules/transaction.ts:20

Fetches the list of all current pending transactions for the Bee node.

Parameters

requestOptions?

BeeRequestOptions

Options for making requests, such as timeouts, custom HTTP agents, headers, etc.

Returns

Promise<TransactionInfo[]>


rebroadcast()

rebroadcast(transactionHash, requestOptions?): Promise<TransactionId>

Defined in: bee-js/src/modules/transaction.ts:47

Rebroadcasts an already created pending transaction.

Mainly needed when the transaction falls off the mempool or is not incorporated into any block.

Parameters

transactionHash

Hash of the transaction

string | Uint8Array<ArrayBufferLike> | TransactionId

requestOptions?

BeeRequestOptions

Options for making requests, such as timeouts, custom HTTP agents, headers, etc.

Returns

Promise<TransactionId>

💬 Get Help