Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added advisory around base URLs #83

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ The `drand-client` contains HTTP implementations, but other transports can be su
}

// if you want to connect to a single chain to grab the latest beacon you can simply do the following
// note: if you want to access e.g. quicknet you must use 'https://api.drand.sh/52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971'
// passing the chainHash in the `chainVerificationParams` will not fill in the path for you (unless using `MultiBeaconNode`)
const chain = new HttpCachingChain('https://api.drand.sh', options)
const client = new HttpChainClient(chain, options)
const theLatestBeacon = await fetchBeacon(client)
Expand Down Expand Up @@ -107,6 +109,8 @@ The `drand-client` contains HTTP implementations, but other transports can be su
// finally you can interact with multibeacon nodes by using the `MultiBeaconNode` class
// prior to drand 1.4, each node could only follow and contribute to a single beacon chain
// - now nodes can contribute to many at once
// here you only need the base URL, and the chain hashes for each respective beacon chain
// will be filled in
const multiBeaconNode = new MultiBeaconNode('https://api.drand.sh', options)

// you can monitor its health
Expand Down
Loading