Skip to content

Credential Scopes

Client credentials can be created with any combination of the following scopes.

  • read_info: Read basic info: node identity, version, balance, and channels.
  • read_payments: Read the wallet's payments, and listen for incoming and outgoing payments.
  • read: Read-only access to the entire wallet. Includes read_info and read_payments.
  • receive: Receive funds: create invoices, offers, and on-chain addresses.
  • spend: Spend funds: pay invoices, offers, and on-chain addresses.
  • manage_channels: Open and close Lightning channels.
  • full: Full administrative access to the wallet. Can spend all funds, create and revoke SDK clients, change the wallet's Human Bitcoin Addresses, sign messages on behalf of the wallet, etc. The only thing it can't do is read the wallet's root seed. "Full"-scoped credentials can be revoked by clients holding the root seed, such as the Lexe mobile app.

Scopes grant exactly what they say, and often need to be combined with other scopes in order to provide useful functionality. For example:

  • An app that receives payments into the user's wallet should combine receive with read_info and read_payments, so it can check the balance and the status of the payments it created.
  • An app that spends from the user's wallet should usually combine spend with read_info, read_payments, and manage_channels, so it can track the balance and its payments, and open or close channels as funds move.

For exact info on the specific permissions each scope grants, read the code: https://github.com/lexe-app/lexe-public/blob/master/lexe-api-core/src/revocable_clients/scopes.rs