2021-02-09 15:12:21 +01:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package lnrpc;
|
|
|
|
|
|
|
|
option go_package = "github.com/lightningnetwork/lnd/lnrpc";
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Comments in this file will be directly parsed into the API
|
|
|
|
* Documentation as descriptions of the associated method, message, or field.
|
|
|
|
* These descriptions should go right above the definition of the object, and
|
|
|
|
* can be in either block or // comment format.
|
|
|
|
*
|
|
|
|
* An RPC method can be matched to an lncli command by placing a line in the
|
|
|
|
* beginning of the description in exactly the following format:
|
|
|
|
* lncli: `methodname`
|
|
|
|
*
|
|
|
|
* Failure to specify the exact name of the command will cause documentation
|
|
|
|
* generation to fail.
|
|
|
|
*
|
|
|
|
* More information on how exactly the gRPC documentation is generated from
|
|
|
|
* this proto file can be found here:
|
|
|
|
* https://github.com/lightninglabs/lightning-api
|
|
|
|
*/
|
|
|
|
|
|
|
|
// State service is a always running service that exposes the current state of
|
|
|
|
// the wallet and RPC server.
|
|
|
|
service State {
|
|
|
|
// SubscribeState subscribes to the state of the wallet. The current wallet
|
|
|
|
// state will always be delivered immediately.
|
|
|
|
rpc SubscribeState (SubscribeStateRequest)
|
|
|
|
returns (stream SubscribeStateResponse);
|
2021-03-30 14:44:03 +02:00
|
|
|
|
|
|
|
// GetState returns the current wallet state without streaming further
|
|
|
|
// changes.
|
|
|
|
rpc GetState (GetStateRequest) returns (GetStateResponse);
|
2021-02-09 15:12:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
enum WalletState {
|
2022-09-14 20:26:47 +02:00
|
|
|
// NON_EXISTING means that the wallet has not yet been initialized.
|
2021-02-09 15:12:21 +01:00
|
|
|
NON_EXISTING = 0;
|
2022-09-14 20:26:47 +02:00
|
|
|
|
|
|
|
// LOCKED means that the wallet is locked and requires a password to unlock.
|
2021-02-09 15:12:21 +01:00
|
|
|
LOCKED = 1;
|
2022-09-14 20:26:47 +02:00
|
|
|
|
|
|
|
// UNLOCKED means that the wallet was unlocked successfully, but RPC server
|
|
|
|
// isn't ready.
|
2021-02-09 15:12:21 +01:00
|
|
|
UNLOCKED = 2;
|
2022-09-14 20:26:47 +02:00
|
|
|
|
|
|
|
// RPC_ACTIVE means that the lnd server is active but not fully ready for
|
|
|
|
// calls.
|
2021-02-09 15:12:21 +01:00
|
|
|
RPC_ACTIVE = 3;
|
2021-03-19 15:53:06 +01:00
|
|
|
|
2021-09-11 19:26:43 +02:00
|
|
|
// SERVER_ACTIVE means that the lnd server is ready to accept calls.
|
|
|
|
SERVER_ACTIVE = 4;
|
|
|
|
|
2022-09-14 20:26:47 +02:00
|
|
|
// WAITING_TO_START means that node is waiting to become the leader in a
|
|
|
|
// cluster and is not started yet.
|
2021-03-19 15:53:06 +01:00
|
|
|
WAITING_TO_START = 255;
|
2021-02-09 15:12:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message SubscribeStateRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message SubscribeStateResponse {
|
2021-04-05 15:19:22 +02:00
|
|
|
WalletState state = 1;
|
2021-02-09 15:12:21 +01:00
|
|
|
}
|
2021-03-30 14:44:03 +02:00
|
|
|
|
|
|
|
message GetStateRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetStateResponse {
|
2021-05-10 00:50:10 +02:00
|
|
|
WalletState state = 1;
|
2021-03-30 14:44:03 +02:00
|
|
|
}
|