# Client libraries
Client libraries enable easy access to drand randomness in specific programming languages. They also provide peace of mind by verifying randomness rounds and add additional features like failover, racing, aggregation, and caching.
Drand randomness is available over HTTP, libp2p PubSub and gRPC.
Currently, the following client libraries are available:
If your application cannot use the libraries above, you can still use the drand-client CLI or make requests to the HTTP API endpoints. If you have created a client library or know of a client library not listed here, please let us know by opening an issue (opens new window).
go get github.com/drand/drand
The Go drand client library is structured with a base client interface in
/client, and with protocol-specific transport implementations in
/lp2p/client. The main
client package holds transport agnostic logic for retrying, validation, and caching.
For documentation and examples please check the Go clients reference:
- Transport agnostic top-level client: https://pkg.go.dev/github.com/drand/drand/client (opens new window)
Client implementations (to be used with the above):
- HTTP client: https://pkg.go.dev/github.com/drand/drand/client/http (opens new window)
- libp2p gossip client: https://pkg.go.dev/github.com/drand/drand/lp2p/client (opens new window)
- gRPC client: https://pkg.go.dev/github.com/drand/drand/client/grpc (opens new window)
In the browser or Deno (opens new window) you can grab and use the client from a CDN e.g. https://cdn.jsdelivr.net/npm/drand-client/drand.js (opens new window).
In Node.js (opens new window), install with:
npm install drand-client
The JS drand client is an esmodule. It has no dependencies and is not transpiled. It can be
imported directly in the browser, Deno or Node.js. In Node.js it can be imported from CommonJS using