command
Version:
v0.16.0
Opens a new window with list of versions in this module.
Published: Oct 14, 2025
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
This example demonstrates how to subscribe to new block headers using WebSocket. It can be adapted to subscribe to other methods as well.
Steps:
- Rename the ".env.template" file located at the root of the "examples" folder to ".env"
- Uncomment, and assign your Sepolia WebSocket testnet endpoint to the
WS_PROVIDER_URL variable in the ".env" file
- Make sure you are in the "websocket" directory
- Execute
go run main.go
The call outputs will be returned at the end of the execution.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.