github.com/decred/dcrlnd@v0.7.6/lnrpc/stateservice.proto (about)

     1  syntax = "proto3";
     2  
     3  package lnrpc;
     4  
     5  option go_package = "github.com/decred/dcrlnd/lnrpc";
     6  
     7  /*
     8   * Comments in this file will be directly parsed into the API
     9   * Documentation as descriptions of the associated method, message, or field.
    10   * These descriptions should go right above the definition of the object, and
    11   * can be in either block or // comment format.
    12   *
    13   * An RPC method can be matched to an lncli command by placing a line in the
    14   * beginning of the description in exactly the following format:
    15   * lncli: `methodname`
    16   *
    17   * Failure to specify the exact name of the command will cause documentation
    18   * generation to fail.
    19   *
    20   * More information on how exactly the gRPC documentation is generated from
    21   * this proto file can be found here:
    22   * https://github.com/lightninglabs/lightning-api
    23   */
    24  
    25  // State service is a always running service that exposes the current state of
    26  // the wallet and RPC server.
    27  service State {
    28      // SubscribeState subscribes to the state of the wallet. The current wallet
    29      // state will always be delivered immediately.
    30      rpc SubscribeState (SubscribeStateRequest)
    31          returns (stream SubscribeStateResponse);
    32  
    33      // GetState returns the current wallet state without streaming further
    34      // changes.
    35      rpc GetState (GetStateRequest) returns (GetStateResponse);
    36  }
    37  
    38  enum WalletState {
    39      NON_EXISTING = 0;
    40      LOCKED = 1;
    41      UNLOCKED = 2;
    42      RPC_ACTIVE = 3;
    43  
    44      // SERVER_ACTIVE means that the lnd server is ready to accept calls.
    45      SERVER_ACTIVE = 4;
    46  
    47      WAITING_TO_START = 255;
    48  }
    49  
    50  message SubscribeStateRequest {
    51  }
    52  
    53  message SubscribeStateResponse {
    54      WalletState state = 1;
    55  }
    56  
    57  message GetStateRequest {
    58  }
    59  
    60  message GetStateResponse {
    61      WalletState state = 1;
    62  }