watchTransactions

Watch for transactions to or from a given address.

Example

// this will log out the new transactions every time a new block is finalized
const unsubscribe = watchTransactions({
network: "ethereum",
address: "0x1234",
onTransactions: (transactions) => {
console.log("new transactions", transactions);
},
});
// later on you can call unsubscribe to stop listening for new transactions
unsubscribe();
function watchTransactions(
__namedParameters: WatchTransactionsParams,
): () => void;

Parameters

Type

let __namedParameters: WatchTransactionsParams;

Returns

let returnType: () => void;

An unsubscribe function that will stop listening for new transactions when called