Function watchTransactions

  • Watch for transactions to or from a given address.

    Parameters

    Returns (() => void)

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

      • (): void
      • Returns void

    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();

Generated using TypeDoc