TransactionUtils

@human-protocol/sdk


@human-protocol/sdk / transaction / TransactionUtils

Class: TransactionUtils

Defined in: transaction.ts:23

Constructors

Constructor

new TransactionUtils(): TransactionUtils

Returns

TransactionUtils

Methods

getTransaction()

static getTransaction(chainId, hash, options?): Promise<ITransaction | null>

Defined in: transaction.ts:68

This function returns the transaction data for the given hash.

Parameters

chainId

ChainId

The chain ID.

hash

string

The transaction hash.

options?

SubgraphOptions

Optional configuration for subgraph requests.

Returns

Promise<ITransaction | null>

  • Returns the transaction details or null if not found.

Code example


getTransactions()

static getTransactions(filter, options?): Promise<ITransaction[]>

Defined in: transaction.ts:170

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

ITransactionsFilter

options?

SubgraphOptions

Returns

Promise<ITransaction[]>

Last updated