TransactionUtils

@human-protocol/sdkarrow-up-right


@human-protocol/sdkarrow-up-right / transaction / TransactionUtils

Class: TransactionUtils

Defined in: transaction.ts:23arrow-up-right

Constructors

Constructor

new TransactionUtils(): TransactionUtils

Returns

TransactionUtils

Methods

getTransaction()

static getTransaction(chainId, hash, options?): Promise<ITransactionarrow-up-right | null>

Defined in: transaction.ts:68arrow-up-right

This function returns the transaction data for the given hash.

Parameters

chainId

ChainIdarrow-up-right

The chain ID.

hash

string

The transaction hash.

options?

SubgraphOptionsarrow-up-right

Optional configuration for subgraph requests.

Returns

Promise<ITransactionarrow-up-right | null>

  • Returns the transaction details or null if not found.

Code example


getTransactions()

static getTransactions(filter, options?): Promise<ITransactionarrow-up-right[]>

Defined in: transaction.ts:170arrow-up-right

This function returns all transaction details based on the provided filter.

This uses Subgraph

Input parameters

@param {ITransactionsFilter} filter Filter for the transactions. @param {SubgraphOptions} options Optional configuration for subgraph requests. @returns {Promise<ITransaction[]>} Returns an array with all the transaction details.

Code example

Parameters

filter

ITransactionsFilterarrow-up-right

options?

SubgraphOptionsarrow-up-right

Returns

Promise<ITransactionarrow-up-right[]>

Last updated