Watch for new blocks on a given network. (Includes parsed transactions)
// this will log out the new block every time a new block is finalizedconst unsubscribe = watchBlockWithTransactions({ network: "ethereum", onBlock: (block) => { console.log("new block", block); console.log("new transactions", block.transactions); },});// later on you can call unsubscribe to stop listening for new blocksunsubscribe();
function watchBlockWithTransactions( __namedParameters: WatchBlockWithTransactionsParams,): () => void;
let __namedParameters: WatchBlockWithTransactionsParams;
let returnType: () => void;
An unsubscribe function that will stop listening for new blocks when called