syntax = "proto3";

package devrpc;

import "lightning.proto";

option go_package = "github.com/lightningnetwork/lnd/lnrpc/devrpc";

/*
 * 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
 */

service Dev {
    /* lncli: `importgraph`
    ImportGraph imports a ChannelGraph into the graph database. Should only be
    used for development.
    */
    rpc ImportGraph (lnrpc.ChannelGraph) returns (ImportGraphResponse);

    /*
    Quiesce instructs a channel to initiate the quiescence (stfu) protocol. This
    RPC is for testing purposes only. The commit that adds it will be removed
    once interop is confirmed.
    */
    rpc Quiesce (QuiescenceRequest) returns (QuiescenceResponse);
}

message ImportGraphResponse {
}

message QuiescenceRequest {
    // The channel point of the channel we wish to quiesce
    lnrpc.ChannelPoint chan_id = 1;
}

message QuiescenceResponse {
    // Indicates whether or not we hold the initiator role or not once the
    // negotiation completes
    bool initiator = 1;
}
