Skip to main content

Faraday

Welcome to the API reference documentation for Faraday.

Faraday is a suite of tools built to help node operators and businesses run lnd, the leading implementation of the Lightning Network. Faraday’s tools decrease the operational overhead of running a Lightning node and make it easier to build businesses on Lightning. The current features in the Faraday suite provide insight into node channel performance and support for accounting with both on-chain and off-chain reports for lnd.

Usage

Learn how to install, configure, and use Faraday by viewing the documentation in the Builder's Guide.

Summary

This site features the documentation for frcli (CLI), and the API documentation for Python and JavaScript clients in order to communicate with a local faraday instance through gRPC.

gRPC

The code samples assume that the there is a local faraday instance running and listening for gRPC connections on port 8465. FARADAY_DIR will be used as a placeholder to denote the base directory of the faraday instance. By default, this is ~/.faraday on Linux and ~/Library/Application Support/Faraday on macOS.

At the time of writing this documentation, two things are needed in order to make a gRPC request to an faraday instance: a TLS/SSL connection and a macaroon used for RPC authentication. The code samples will show how these can be used in order to make a successful, secure, and authenticated gRPC request.

The original *.proto files from which the gRPC documentation was generated can be found here:

REST

View a listing of all REST URLs on the REST Endpoints page.

The code samples assume that the there is a local faraday instance running and listening for REST connections on port 8082. FARADAY_DIR will be used as a placeholder to denote the base directory of the faraday instance. By default, this is ~/.faraday on Linux and ~/Library/Application Support/Faraday on macOS.

At the time of writing this documentation, two things are needed in order to make an HTTP request to an faraday instance: a TLS/SSL connection and a macaroon used for RPC authentication. The code samples will show how these can be used in order to make a successful, secure, and authenticated HTTP request.

The original *.swagger.json files from which the gRPC documentation was generated can be found here:

REST Encoding

NOTE: The byte field type must be set as the base64 encoded string representation of a raw byte array. Also, any time this must be used in a URL path (ie. /v1/abc/xyz/{payment_hash}) the base64 string must be encoded using a URL and Filename Safe Alphabet. This means you must replace + with -, / with _, and keep the trailing = as is. Url encoding (ie. %2F) will not work.

This documentation was generated automatically against commit f7ba1fea38fdead61b8c22d57775ec076579b40f.