websocket

command
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2025 License: MIT Imports: 5 Imported by: 0

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:

  1. Rename the ".env.template" file located at the root of the "examples" folder to ".env"
  2. Uncomment, and assign your Sepolia WebSocket testnet endpoint to the WS_PROVIDER_URL variable in the ".env" file
  3. Make sure you are in the "websocket" directory
  4. Execute go run main.go

The call outputs will be returned at the end of the execution.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL