I need to do an offchain action in an application when a transaction is included in a block that is validated.
Is there a way to register a listener for such a notification? Or is there another mechanism?
Thanks!
There is no listener for it. Pooling it in an interval is a common way to do that. The Listening for ada payments using cardano-cli page is worth referring to.
You can also watch the chain from cardano-db-sync or from some Cardano API providers such as Blockfrost.io.
If you use Blockfrost.io, you could use the Websockets link for Blockfrost.io API to create a WebSocket subscription.