Developer Fundamentals
-- III. Transaction Log
Learn how to monitor live transactions entering the pool using WebSockets and how to retrieve their details using a second request.
Listening to Transaction Logs
This lesson will take you through the most important information about how to listen to a transaction log and how to establish multiple connections to the node.
The connection is managed using WebSockets, which connect directly to a VeChain node.
A simple connection can be established with this snippet:
This will receive all new entries added to the transaction pool in the form of JSON-encoded strings.
Subscriptions receive the transaction ID as soon as it is added to the transaction pool. A transaction may either be:
Successfully included in a block
Reverted
Expired in the future
To obtain detailed information about a transaction, you need to make a second request, either directly from the node or using a Thor client.
Join our Telegram