useWatchTransactions

Hook that listens to transactions on a given chain for a given address.

import { useWatchTransactions } from "@thirdweb-dev/react";

Example

const transactions = useWatchTransactions({
address: "0x1234",
network: "ethereum",
});
function useWatchTransactions(
watchTransactionParams: UseWatchTransactionsParams,
): Array<Transaction>;

Parameters

Options for watching transactions

address

The address to watch transactions for

network

The network to watch transactions on

sdkOptions

Options to pass to the thirdweb SDK

Type

let watchTransactionParams: UseWatchTransactionsParams;

Returns

let returnType: Array<Transaction>;

An array of Transaction objects