2015-12-30 23:19:09 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2016-10-16 00:38:47 +03:00
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
2015-12-30 23:19:09 +03:00
|
|
|
package lnrpc;
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* One edge case exists where a // comment followed by a /// comment in the
|
|
|
|
* next line will cause the description not to show up in the documentation. In
|
|
|
|
* that instance, simply separate the two comments with a blank line.
|
|
|
|
*
|
|
|
|
* 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/MaxFangX/lightning-api
|
|
|
|
*/
|
2015-12-30 23:19:09 +03:00
|
|
|
|
2017-10-12 12:10:29 +03:00
|
|
|
// The WalletUnlocker service is used to set up a wallet password for
|
|
|
|
// lnd at first startup, and unlock a previously set up wallet.
|
|
|
|
service WalletUnlocker {
|
|
|
|
/** lncli: `create`
|
|
|
|
CreateWallet is used at lnd startup to set the encryption password for
|
|
|
|
the wallet database.
|
|
|
|
*/
|
|
|
|
rpc CreateWallet(CreateWalletRequest) returns (CreateWalletResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/createwallet"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/** lncli: `unlock`
|
|
|
|
UnlockWallet is used at startup of lnd to provide a password to unlock
|
|
|
|
the wallet database.
|
|
|
|
*/
|
|
|
|
rpc UnlockWallet(UnlockWalletRequest) returns (UnlockWalletResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/unlockwallet"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message CreateWalletRequest {
|
|
|
|
bytes password = 1;
|
|
|
|
}
|
|
|
|
message CreateWalletResponse {}
|
|
|
|
|
|
|
|
|
|
|
|
message UnlockWalletRequest {
|
|
|
|
bytes password = 1;
|
|
|
|
}
|
|
|
|
message UnlockWalletResponse {}
|
|
|
|
|
2015-12-30 23:19:09 +03:00
|
|
|
service Lightning {
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `walletbalance`
|
|
|
|
WalletBalance returns the sum of all confirmed unspent outputs under control
|
|
|
|
by the wallet. This method can be modified by having the request specify
|
|
|
|
only witness outputs should be factored into the final output sum.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc WalletBalance (WalletBalanceRequest) returns (WalletBalanceResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/balance/blockchain"
|
|
|
|
};
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/** lncli: `channelbalance`
|
|
|
|
ChannelBalance returns the total funds available across all open channels
|
|
|
|
in satoshis.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc ChannelBalance (ChannelBalanceRequest) returns (ChannelBalanceResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/balance/channels"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `listchaintxns`
|
|
|
|
GetTransactions returns a list describing all the known transactions
|
|
|
|
relevant to the wallet.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc GetTransactions (GetTransactionsRequest) returns (TransactionDetails) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
2017-05-12 00:55:56 +03:00
|
|
|
get: "/v1/transactions"
|
2016-10-16 00:38:47 +03:00
|
|
|
};
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/** lncli: `sendcoins`
|
|
|
|
SendCoins executes a request to send coins to a particular address. Unlike
|
|
|
|
SendMany, this RPC call only allows creating a single output at a time.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc SendCoins (SendCoinsRequest) returns (SendCoinsResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/transactions"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
SubscribeTransactions creates a uni-directional stream from the server to
|
|
|
|
the client in which any newly discovered transactions relevant to the
|
|
|
|
wallet are sent over.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc SubscribeTransactions (GetTransactionsRequest) returns (stream Transaction);
|
2016-09-15 21:59:51 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `sendmany`
|
|
|
|
SendMany handles a request for a transaction that creates multiple specified
|
|
|
|
outputs in parallel.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc SendMany (SendManyRequest) returns (SendManyResponse);
|
2015-12-31 06:02:24 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `newaddress`
|
|
|
|
NewAddress creates a new address under control of the local wallet.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc NewAddress (NewAddressRequest) returns (NewAddressResponse);
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
NewWitnessAddress creates a new witness address under control of the local wallet.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc NewWitnessAddress (NewWitnessAddressRequest) returns (NewAddressResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/newaddress"
|
|
|
|
};
|
|
|
|
}
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `signmessage`
|
|
|
|
SignMessage signs a message with this node's private key. The returned
|
|
|
|
signature string is `zbase32` encoded and pubkey recoverable, meaning that
|
|
|
|
only the message digest and signature are needed for verification.
|
|
|
|
*/
|
2017-04-20 05:28:10 +03:00
|
|
|
rpc SignMessage (SignMessageRequest) returns (SignMessageResponse);
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/** lncli: `verifymessage`
|
|
|
|
VerifyMessage verifies a signature over a msg. The signature must be
|
|
|
|
zbase32 encoded and signed by an active node in the resident node's
|
|
|
|
channel database. In addition to returning the validity of the signature,
|
|
|
|
VerifyMessage also returns the recovered pubkey from the signature.
|
|
|
|
*/
|
2017-04-20 05:28:10 +03:00
|
|
|
rpc VerifyMessage (VerifyMessageRequest) returns (VerifyMessageResponse);
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `connect`
|
|
|
|
ConnectPeer attempts to establish a connection to a remote peer. This is at
|
|
|
|
the networking level, and is used for communication between nodes. This is
|
|
|
|
distinct from establishing a channel with a peer.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc ConnectPeer (ConnectPeerRequest) returns (ConnectPeerResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/peers"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
2017-04-12 00:49:39 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `disconnect`
|
|
|
|
DisconnectPeer attempts to disconnect one peer from another identified by a
|
|
|
|
given pubKey. In the case that we currently have a pending or active channel
|
|
|
|
with the target peer, then this action will be not be allowed.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc DisconnectPeer (DisconnectPeerRequest) returns (DisconnectPeerResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
delete: "/v1/peers/{pub_key}"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `listpeers`
|
|
|
|
ListPeers returns a verbose listing of all currently active peers.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc ListPeers (ListPeersRequest) returns (ListPeersResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/peers"
|
|
|
|
};
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/** lncli: `getinfo`
|
|
|
|
GetInfo returns general information concerning the lightning node including
|
|
|
|
it's identity pubkey, alias, the chains it is connected to, and information
|
|
|
|
concerning the number of open+pending channels.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc GetInfo (GetInfoRequest) returns (GetInfoResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/getinfo"
|
|
|
|
};
|
|
|
|
}
|
2016-09-26 06:02:33 +03:00
|
|
|
|
2016-10-16 00:38:47 +03:00
|
|
|
// TODO(roasbeef): merge with below with bool?
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `pendingchannels`
|
|
|
|
PendingChannels returns a list of all the channels that are currently
|
|
|
|
considered "pending". A channel is pending if it has finished the funding
|
|
|
|
workflow and is waiting for confirmations for the funding txn, or is in the
|
|
|
|
process of closure, either initiated cooperatively or non-cooperatively.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc PendingChannels (PendingChannelRequest) returns (PendingChannelResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/channels/pending"
|
|
|
|
};
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/** lncli: `listchannels`
|
|
|
|
ListChannels returns a description of all the open channels that this node
|
|
|
|
is a participant in.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc ListChannels (ListChannelsRequest) returns (ListChannelsResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/channels"
|
|
|
|
};
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
OpenChannelSync is a synchronous version of the OpenChannel RPC call. This
|
|
|
|
call is meant to be consumed by clients to the REST proxy. As with all
|
|
|
|
other sync calls, all byte slices are intended to be populated as hex
|
|
|
|
encoded strings.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc OpenChannelSync (OpenChannelRequest) returns (ChannelPoint) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/channels"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
2016-11-11 04:33:24 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `openchannel`
|
|
|
|
OpenChannel attempts to open a singly funded channel specified in the
|
|
|
|
request to a remote peer.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc OpenChannel (OpenChannelRequest) returns (stream OpenStatusUpdate);
|
2016-11-11 04:33:24 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `closechannel`
|
|
|
|
CloseChannel attempts to close an active channel identified by its channel
|
|
|
|
outpoint (ChannelPoint). The actions of this method can additionally be
|
|
|
|
augmented to attempt a force close after a timeout period in the case of an
|
|
|
|
inactive peer.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc CloseChannel (CloseChannelRequest) returns (stream CloseStatusUpdate) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
2017-08-22 10:07:25 +03:00
|
|
|
delete: "/v1/channels/{channel_point.funding_txid}/{channel_point.output_index}"
|
2016-10-16 00:38:47 +03:00
|
|
|
};
|
|
|
|
}
|
2016-07-13 03:36:34 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `sendpayment`
|
|
|
|
SendPayment dispatches a bi-directional streaming RPC for sending payments
|
|
|
|
through the Lightning Network. A single RPC invocation creates a persistent
|
|
|
|
bi-directional stream allowing clients to rapidly send payments through the
|
|
|
|
Lightning Network with a single persistent connection.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc SendPayment (stream SendRequest) returns (stream SendResponse);
|
2016-11-11 04:33:24 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
SendPaymentSync is the synchronous non-streaming version of SendPayment.
|
|
|
|
This RPC is intended to be consumed by clients of the REST proxy.
|
|
|
|
Additionally, this RPC expects the destination's public key and the payment
|
|
|
|
hash (if any) to be encoded as hex strings.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc SendPaymentSync (SendRequest) returns (SendResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/channels/transactions"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
2016-09-19 21:52:23 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `addinvoice`
|
|
|
|
AddInvoice attempts to add a new invoice to the invoice database. Any
|
|
|
|
duplicated invoices are rejected, therefore all invoices *must* have a
|
|
|
|
unique payment preimage.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc AddInvoice (Invoice) returns (AddInvoiceResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/invoices"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/** lncli: `listinvoices`
|
|
|
|
ListInvoices returns a list of all the invoices currently stored within the
|
|
|
|
database. Any active debug invoices are ignored.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc ListInvoices (ListInvoiceRequest) returns (ListInvoiceResponse) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/invoices/{pending_only}"
|
|
|
|
};
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/** lncli: `lookupinvoice`
|
|
|
|
LookupInvoice attemps to look up an invoice according to its payment hash.
|
|
|
|
The passed payment hash *must* be exactly 32 bytes, if not, an error is
|
|
|
|
returned.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc LookupInvoice (PaymentHash) returns (Invoice) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/invoices/{r_hash_str}"
|
|
|
|
};
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
SubscribeInvoices returns a uni-directional stream (sever -> client) for
|
|
|
|
notifying the client of newly added/settled invoices.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc SubscribeInvoices (InvoiceSubscription) returns (stream Invoice) {
|
2016-10-16 00:38:47 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/invoices/subscribe"
|
|
|
|
};
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/** lncli: `decodepayreq`
|
|
|
|
DecodePayReq takes an encoded payment request string and attempts to decode
|
|
|
|
it, returning a full description of the conditions encoded within the
|
|
|
|
payment request.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc DecodePayReq (PayReqString) returns (PayReq) {
|
2017-01-18 00:24:55 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/payreq/{pay_req}"
|
|
|
|
};
|
|
|
|
}
|
2016-09-19 21:52:23 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `listpayments`
|
|
|
|
ListPayments returns a list of all outgoing payments.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc ListPayments (ListPaymentsRequest) returns (ListPaymentsResponse) {
|
2016-12-05 14:59:36 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/payments"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
DeleteAllPayments deletes all outgoing payments from DB.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc DeleteAllPayments (DeleteAllPaymentsRequest) returns (DeleteAllPaymentsResponse) {
|
2016-12-05 14:59:36 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
delete: "/v1/payments"
|
|
|
|
};
|
|
|
|
};
|
2016-07-13 03:36:34 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `describegraph`
|
|
|
|
DescribeGraph returns a description of the latest graph state from the
|
|
|
|
point of view of the node. The graph information is partitioned into two
|
|
|
|
components: all the nodes/vertexes, and all the edges that connect the
|
|
|
|
vertexes themselves. As this is a directed graph, the edges also contain
|
|
|
|
the node directional specific routing policy which includes: the time lock
|
|
|
|
delta, fee information, etc.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc DescribeGraph (ChannelGraphRequest) returns (ChannelGraph) {
|
2016-12-27 08:44:44 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/graph"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `getchaninfo`
|
|
|
|
GetChanInfo returns the latest authenticated network announcement for the
|
|
|
|
given channel identified by its channel ID: an 8-byte integer which
|
|
|
|
uniquely identifies the location of transaction's funding output within the
|
|
|
|
blockchain.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc GetChanInfo (ChanInfoRequest) returns (ChannelEdge) {
|
2016-12-27 08:44:44 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/graph/edge/{chan_id}"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `getnodeinfo`
|
|
|
|
GetNodeInfo returns the latest advertised, aggregated, and authenticated
|
|
|
|
channel information for the specified node identified by its public key.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc GetNodeInfo (NodeInfoRequest) returns (NodeInfo) {
|
2016-12-27 08:44:44 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/graph/node/{pub_key}"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `queryroutes`
|
|
|
|
QueryRoutes attempts to query the daemon's Channel Router for a possible
|
|
|
|
route to a target destination capable of carrying a specific amount of
|
|
|
|
satoshis. The retuned route contains the full details required to craft and
|
|
|
|
send an HTLC, also including the necessary information that should be
|
|
|
|
present within the Sphinx packet encapsualted within the HTLC.
|
|
|
|
*/
|
2017-03-21 05:01:32 +03:00
|
|
|
rpc QueryRoutes(QueryRoutesRequest) returns (QueryRoutesResponse) {
|
2016-12-27 08:44:44 +03:00
|
|
|
option (google.api.http) = {
|
2017-03-21 05:01:32 +03:00
|
|
|
get: "/v1/graph/routes/{pub_key}/{amt}"
|
2016-12-27 08:44:44 +03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `getnetworkinfo`
|
|
|
|
GetNetworkInfo returns some basic stats about the known channel graph from
|
|
|
|
the point of view of the node.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc GetNetworkInfo (NetworkInfoRequest) returns (NetworkInfo) {
|
2016-12-27 08:44:44 +03:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/graph/info"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `stop`
|
|
|
|
StopDaemon will send a shutdown request to the interrupt handler, triggering
|
|
|
|
a graceful shutdown of the daemon.
|
|
|
|
*/
|
2017-05-12 00:55:56 +03:00
|
|
|
rpc StopDaemon(StopRequest) returns (StopResponse);
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
SubscribeChannelGraph launches a streaming RPC that allows the caller to
|
|
|
|
receive notifications upon any changes to the channel graph topology from
|
|
|
|
the point of view of the responding node. Events notified include: new
|
|
|
|
nodes coming online, nodes updating their authenticated attributes, new
|
|
|
|
channels being advertised, updates in the routing policy for a directional
|
|
|
|
channel edge, and when channels are closed on-chain.
|
|
|
|
*/
|
2017-03-14 06:37:25 +03:00
|
|
|
rpc SubscribeChannelGraph(GraphTopologySubscription) returns (stream GraphTopologyUpdate);
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
SetAlias sets the alias for this node; e.g. "alice"
|
|
|
|
*/
|
2016-12-27 08:44:44 +03:00
|
|
|
rpc SetAlias(SetAliasRequest) returns (SetAliasResponse);
|
2017-01-15 05:14:03 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/** lncli: `debuglevel`
|
|
|
|
DebugLevel allows a caller to programmatically set the logging verbosity of
|
|
|
|
lnd. The logging can be targeted according to a coarse daemon-wide logging
|
|
|
|
level, or in a granular fashion to specify the logging for a target
|
|
|
|
sub-system.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
rpc DebugLevel (DebugLevelRequest) returns (DebugLevelResponse);
|
2017-08-22 10:07:25 +03:00
|
|
|
|
|
|
|
/** lncli: `feereport`
|
|
|
|
FeeReport allows the caller to obtain a report detailing the current fee
|
|
|
|
schedule enforced by the node globally for each channel.
|
|
|
|
*/
|
|
|
|
rpc FeeReport(FeeReportRequest) returns (FeeReportResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/fees"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/** lncli: `updatefees`
|
|
|
|
UpdateFees allows the caller to update the fee schedule for all channels
|
|
|
|
globally, or a particular channel.
|
|
|
|
*/
|
|
|
|
rpc UpdateFees(FeeUpdateRequest) returns (FeeUpdateResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/fees"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
2016-10-16 00:38:47 +03:00
|
|
|
|
|
|
|
message Transaction {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The transaction hash
|
2017-02-28 06:03:43 +03:00
|
|
|
string tx_hash = 1 [ json_name = "tx_hash" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The transaction ammount, denominated in satoshis
|
2017-03-06 01:53:37 +03:00
|
|
|
int64 amount = 2 [ json_name = "amount" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The number of confirmations
|
2017-02-28 06:03:43 +03:00
|
|
|
int32 num_confirmations = 3 [ json_name = "num_confirmations" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The hash of the block this transaction was included in
|
2017-02-28 06:03:43 +03:00
|
|
|
string block_hash = 4 [ json_name = "block_hash" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The height of the block this transaction was included in
|
2017-02-28 06:03:43 +03:00
|
|
|
int32 block_height = 5 [ json_name = "block_height" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Timestamp of this transaction
|
2017-02-28 06:03:43 +03:00
|
|
|
int64 time_stamp = 6 [ json_name = "time_stamp" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Fees paid for this transaction
|
2017-02-28 06:03:43 +03:00
|
|
|
int64 total_fees = 7 [ json_name = "total_fees" ];
|
2016-10-16 00:38:47 +03:00
|
|
|
}
|
|
|
|
message GetTransactionsRequest {
|
|
|
|
}
|
|
|
|
message TransactionDetails {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The list of transactions relevant to the wallet.
|
2017-04-12 00:49:39 +03:00
|
|
|
repeated Transaction transactions = 1 [json_name = "transactions"];
|
2016-10-16 00:38:47 +03:00
|
|
|
}
|
|
|
|
|
2016-07-13 03:36:34 +03:00
|
|
|
message SendRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The identity pubkey of the payment recipient
|
2016-07-13 03:36:34 +03:00
|
|
|
bytes dest = 1;
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The hex-encoded identity pubkey of the payment recipient
|
2016-11-11 04:33:24 +03:00
|
|
|
string dest_string = 2;
|
|
|
|
|
2017-08-22 10:07:25 +03:00
|
|
|
/// Number of satoshis to send.
|
2016-11-11 04:33:24 +03:00
|
|
|
int64 amt = 3;
|
2016-07-13 03:36:34 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The hash to use within the payment's HTLC
|
2016-11-11 04:33:24 +03:00
|
|
|
bytes payment_hash = 4;
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The hex-encoded hash to use within the payment's HTLC
|
2016-11-11 04:33:24 +03:00
|
|
|
string payment_hash_string = 5;
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
A bare-bones invoice for a payment within the Lightning Network. With the
|
|
|
|
details of the invoice, the sender has all the data necessary to send a
|
|
|
|
payment to the recipient.
|
|
|
|
*/
|
2017-01-03 02:31:38 +03:00
|
|
|
string payment_request = 6;
|
2016-07-13 03:36:34 +03:00
|
|
|
}
|
2016-10-16 00:38:47 +03:00
|
|
|
message SendResponse {
|
2017-05-19 15:18:21 +03:00
|
|
|
string payment_error = 1 [json_name = "payment_error"];
|
|
|
|
bytes payment_preimage = 2 [json_name = "payment_preimage"];
|
|
|
|
Route payment_route = 3 [json_name = "payment_route"];
|
2015-12-30 23:19:09 +03:00
|
|
|
}
|
|
|
|
|
2016-06-21 21:52:09 +03:00
|
|
|
message ChannelPoint {
|
2017-03-14 06:37:25 +03:00
|
|
|
// TODO(roasbeef): make str vs bytes into a oneof
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// Txid of the funding transaction
|
2017-02-28 06:03:43 +03:00
|
|
|
bytes funding_txid = 1 [ json_name = "funding_txid" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Hex-encoded string representing the funding transaction
|
2017-02-28 06:03:43 +03:00
|
|
|
string funding_txid_str = 2 [ json_name = "funding_txid_str" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The index of the output of the funding transaction
|
2017-02-28 06:03:43 +03:00
|
|
|
uint32 output_index = 3 [ json_name = "output_index" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message LightningAddress {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The identity pubkey of the Lightning node
|
2017-04-12 00:49:39 +03:00
|
|
|
string pubkey = 1 [json_name = "pubkey"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The network location of the lightning node, e.g. `69.69.69.69:1337` or `localhost:10011`
|
2017-04-12 00:49:39 +03:00
|
|
|
string host = 2 [json_name = "host"];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
2015-12-30 23:19:09 +03:00
|
|
|
message SendManyRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The map from addresses to amounts
|
2015-12-30 23:19:09 +03:00
|
|
|
map<string, int64> AddrToAmount = 1;
|
|
|
|
}
|
|
|
|
message SendManyResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The id of the transaction
|
2017-04-12 00:49:39 +03:00
|
|
|
string txid = 1 [json_name = "txid"];
|
2015-12-30 23:19:09 +03:00
|
|
|
}
|
|
|
|
|
2016-06-29 21:28:10 +03:00
|
|
|
message SendCoinsRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The address to send coins to
|
2016-06-29 21:28:10 +03:00
|
|
|
string addr = 1;
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The amount in satoshis to send
|
2016-06-29 21:28:10 +03:00
|
|
|
int64 amount = 2;
|
|
|
|
}
|
|
|
|
message SendCoinsResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The transaction ID of the transaction
|
2017-04-12 00:49:39 +03:00
|
|
|
string txid = 1 [json_name = "txid"];
|
2016-06-29 21:28:10 +03:00
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
`AddressType` has to be one of:
|
|
|
|
|
|
|
|
- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)
|
|
|
|
- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)
|
|
|
|
- `p2pkh`: Pay to public key hash (`PUBKEY_HASH` = 2)
|
|
|
|
*/
|
2016-04-25 06:26:32 +03:00
|
|
|
message NewAddressRequest {
|
|
|
|
enum AddressType {
|
|
|
|
WITNESS_PUBKEY_HASH = 0;
|
|
|
|
NESTED_PUBKEY_HASH = 1;
|
|
|
|
PUBKEY_HASH = 2;
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// The address type
|
2016-04-25 06:26:32 +03:00
|
|
|
AddressType type = 1;
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
message NewWitnessAddressRequest {
|
|
|
|
}
|
2017-07-28 02:39:49 +03:00
|
|
|
|
2015-12-30 23:19:09 +03:00
|
|
|
message NewAddressResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The newly generated wallet address
|
2017-04-12 00:49:39 +03:00
|
|
|
string address = 1 [json_name = "address"];
|
2015-12-30 23:19:09 +03:00
|
|
|
}
|
2015-12-31 05:58:15 +03:00
|
|
|
|
2017-04-20 05:28:10 +03:00
|
|
|
message SignMessageRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The message to be signed
|
2017-04-20 05:28:10 +03:00
|
|
|
bytes msg = 1 [ json_name = "msg" ];
|
|
|
|
}
|
|
|
|
message SignMessageResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The signature for the given message
|
2017-04-20 05:28:10 +03:00
|
|
|
string signature = 1 [ json_name = "signature" ];
|
|
|
|
}
|
|
|
|
|
|
|
|
message VerifyMessageRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The message over which the signature is to be verified
|
2017-04-20 05:28:10 +03:00
|
|
|
bytes msg = 1 [ json_name = "msg" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The signature to be verifed over the given message
|
2017-04-20 05:28:10 +03:00
|
|
|
string signature = 2 [ json_name = "signature" ];
|
|
|
|
}
|
|
|
|
message VerifyMessageResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Whether the signature was valid over the given message
|
2017-04-20 05:28:10 +03:00
|
|
|
bool valid = 1 [ json_name = "valid" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The pubkey recovered from the signature
|
2017-04-29 14:44:29 +03:00
|
|
|
string pubkey = 2 [ json_name = "pubkey" ];
|
2017-04-20 05:28:10 +03:00
|
|
|
}
|
|
|
|
|
2016-01-17 06:03:47 +03:00
|
|
|
message ConnectPeerRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Lightning address of the peer, in the format `<pubkey>@host`
|
2016-06-21 21:52:09 +03:00
|
|
|
LightningAddress addr = 1;
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/** If set, the daemon will attempt to persistently connect to the target
|
|
|
|
* peer. Otherwise, the call will be synchronous. */
|
2017-01-10 05:58:21 +03:00
|
|
|
bool perm = 2;
|
2015-12-31 05:58:15 +03:00
|
|
|
}
|
2016-01-17 06:03:47 +03:00
|
|
|
message ConnectPeerResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The id of the newly connected peer
|
2017-04-12 00:49:39 +03:00
|
|
|
int32 peer_id = 1 [json_name = "peer_id"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message DisconnectPeerRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The pubkey of the node to disconnect from
|
2017-04-12 00:49:39 +03:00
|
|
|
string pub_key = 1 [json_name = "pub_key"];
|
|
|
|
}
|
|
|
|
message DisconnectPeerResponse {
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message HTLC {
|
2017-04-12 00:49:39 +03:00
|
|
|
bool incoming = 1 [json_name = "incoming"];
|
|
|
|
int64 amount = 2 [json_name = "amount"];
|
|
|
|
bytes hash_lock = 3 [json_name = "hash_lock"];
|
|
|
|
uint32 expiration_height = 4 [json_name = "expiration_height"];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ActiveChannel {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Whether this channel is active or not
|
2017-04-12 00:49:39 +03:00
|
|
|
bool active = 1 [json_name = "active"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The identity pubkey of the remote node
|
2017-04-12 00:49:39 +03:00
|
|
|
string remote_pubkey = 2 [json_name = "remote_pubkey"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
The outpoint (txid:index) of the funding transaction. With this value, Bob
|
|
|
|
will be able to generate a signature for Alice's version of the commitment
|
|
|
|
transaction.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
string channel_point = 3 [json_name = "channel_point"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
The unique channel ID for the channel. The first 3 bytes are the block
|
|
|
|
height, the next 3 the index within the block, and the last 2 bytes are the
|
|
|
|
output index for the channel.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
uint64 chan_id = 4 [json_name = "chan_id"];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The total amount of funds held in this channel
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 capacity = 5 [json_name = "capacity"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// This node's current balance in this channel
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 local_balance = 6 [json_name = "local_balance"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// The counterparty's current balance in this channel
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 remote_balance = 7 [json_name = "remote_balance"];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
The amount calculated to be paid in fees for the current set of commitment
|
|
|
|
transactions. The fee amount is persisted with the channel in order to
|
|
|
|
allow the fee amount to be removed and recalculated with each channel state
|
|
|
|
update, including updates that happen after a system restart.
|
|
|
|
*/
|
2017-05-17 05:13:25 +03:00
|
|
|
int64 commit_fee = 8 [json_name = "commit_fee"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The weight of the commitment transaction
|
2017-05-17 05:13:25 +03:00
|
|
|
int64 commit_weight = 9 [ json_name = "commit_weight" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
The required number of satoshis per kilo-weight that the requester will pay
|
|
|
|
at all times, for both the funding transaction and commitment transaction.
|
|
|
|
This value can later be updated once the channel is open.
|
|
|
|
*/
|
2017-05-17 05:13:25 +03:00
|
|
|
int64 fee_per_kw = 10 [json_name = "fee_per_kw"];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The unsettled balance in this channel
|
2017-05-17 05:13:25 +03:00
|
|
|
int64 unsettled_balance = 11 [json_name = "unsettled_balance"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
The total number of satoshis we've sent within this channel.
|
|
|
|
*/
|
2017-05-17 05:13:25 +03:00
|
|
|
int64 total_satoshis_sent = 12 [json_name = "total_satoshis_sent"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
The total number of satoshis we've received within this channel.
|
|
|
|
*/
|
2017-05-17 05:13:25 +03:00
|
|
|
int64 total_satoshis_received = 13 [json_name = "total_satoshis_received"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
The total number of updates conducted within this channel.
|
|
|
|
*/
|
2017-05-17 05:13:25 +03:00
|
|
|
uint64 num_updates = 14 [json_name = "num_updates"];
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
The list of active, uncleared HTLCs currently pending within the channel.
|
|
|
|
*/
|
2017-05-17 05:13:25 +03:00
|
|
|
repeated HTLC pending_htlcs = 15 [json_name = "pending_htlcs"];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
message ListChannelsRequest {
|
|
|
|
}
|
2016-09-26 06:02:33 +03:00
|
|
|
message ListChannelsResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The list of active channels
|
2017-04-12 00:49:39 +03:00
|
|
|
repeated ActiveChannel channels = 11 [json_name = "channels"];
|
2016-09-26 06:02:33 +03:00
|
|
|
}
|
|
|
|
|
2016-06-21 21:52:09 +03:00
|
|
|
message Peer {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The identity pubkey of the peer
|
2017-04-12 00:49:39 +03:00
|
|
|
string pub_key = 1 [json_name = "pub_key"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The peer's id from the local point of view
|
2017-04-12 00:49:39 +03:00
|
|
|
int32 peer_id = 2 [json_name = "peer_id"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Network address of the peer; eg `127.0.0.1:10011`
|
2017-04-12 00:49:39 +03:00
|
|
|
string address = 3 [json_name = "address"];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Bytes of data transmitted to this peer
|
2017-04-12 00:49:39 +03:00
|
|
|
uint64 bytes_sent = 4 [json_name = "bytes_sent"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Bytes of data transmitted from this peer
|
2017-04-12 00:49:39 +03:00
|
|
|
uint64 bytes_recv = 5 [json_name = "bytes_recv"];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Satoshis sent to this peer
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 sat_sent = 6 [json_name = "sat_sent"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Satoshis received from this peer
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 sat_recv = 7 [json_name = "sat_recv"];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// A channel is inbound if the counterparty initiated the channel
|
2017-04-12 00:49:39 +03:00
|
|
|
bool inbound = 8 [json_name = "inbound"];
|
2017-01-26 05:16:28 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Ping time to this peer
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 ping_time = 9 [json_name = "ping_time"];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
message ListPeersRequest {
|
|
|
|
}
|
2016-06-21 21:52:09 +03:00
|
|
|
message ListPeersResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The list of currently connected peers
|
2017-04-12 00:49:39 +03:00
|
|
|
repeated Peer peers = 1 [json_name = "peers"];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
2016-06-21 22:32:32 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
message GetInfoRequest {
|
|
|
|
}
|
2016-07-06 04:52:05 +03:00
|
|
|
message GetInfoResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// The identity pubkey of the current node.
|
2017-04-12 00:49:39 +03:00
|
|
|
string identity_pubkey = 1 [json_name = "identity_pubkey"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// If applicable, the alias of the current node, e.g. "bob"
|
2017-04-12 00:49:39 +03:00
|
|
|
string alias = 2 [json_name = "alias"];
|
2016-07-06 04:52:05 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Number of pending channels
|
2017-04-12 00:49:39 +03:00
|
|
|
uint32 num_pending_channels = 3 [json_name = "num_pending_channels"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Number of active channels
|
2017-04-12 00:49:39 +03:00
|
|
|
uint32 num_active_channels = 4 [json_name = "num_active_channels"];
|
2016-07-06 04:52:05 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Number of peers
|
2017-04-12 00:49:39 +03:00
|
|
|
uint32 num_peers = 5 [json_name = "num_peers"];
|
2016-11-15 02:54:47 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The node's current view of the height of the best block
|
2017-04-12 00:49:39 +03:00
|
|
|
uint32 block_height = 6 [json_name = "block_height"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The node's current view of the hash of the best block
|
2017-04-12 00:49:39 +03:00
|
|
|
string block_hash = 8 [json_name = "block_hash"];
|
2016-12-13 02:34:20 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Whether the wallet's view is synced to the main chain
|
2017-02-28 06:03:43 +03:00
|
|
|
bool synced_to_chain = 9 [ json_name = "synced_to_chain" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Whether the current node is connected to testnet
|
2017-02-28 06:03:43 +03:00
|
|
|
bool testnet = 10 [ json_name = "testnet" ];
|
2017-05-03 05:49:41 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// A list of active chains the node is connected to
|
2017-05-17 05:13:25 +03:00
|
|
|
repeated string chains = 11 [ json_name = "chains" ];
|
2016-07-06 04:52:05 +03:00
|
|
|
}
|
|
|
|
|
2016-07-08 01:23:29 +03:00
|
|
|
message ConfirmationUpdate {
|
|
|
|
bytes block_sha = 1;
|
|
|
|
int32 block_height = 2;
|
|
|
|
|
|
|
|
uint32 num_confs_left = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ChannelOpenUpdate {
|
2017-04-12 00:49:39 +03:00
|
|
|
ChannelPoint channel_point = 1 [json_name = "channel_point"];
|
2016-07-08 01:23:29 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ChannelCloseUpdate {
|
2017-04-12 00:49:39 +03:00
|
|
|
bytes closing_txid = 1 [json_name = "closing_txid"];
|
2016-07-08 01:23:29 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
bool success = 2 [json_name = "success"];
|
2016-07-08 01:23:29 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message CloseChannelRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
The outpoint (txid:index) of the funding transaction. With this value, Bob
|
|
|
|
will be able to generate a signature for Alice's version of the commitment
|
|
|
|
transaction.
|
|
|
|
*/
|
2016-07-08 01:23:29 +03:00
|
|
|
ChannelPoint channel_point = 1;
|
2017-08-22 10:07:25 +03:00
|
|
|
|
|
|
|
/// If true, then the channel will be closed forcibly. This means the current commitment transaction will be signed and broadcast.
|
|
|
|
bool force = 2;
|
2016-07-08 01:23:29 +03:00
|
|
|
}
|
|
|
|
message CloseStatusUpdate {
|
|
|
|
oneof update {
|
2017-04-12 00:49:39 +03:00
|
|
|
PendingUpdate close_pending = 1 [json_name = "close_pending"];
|
|
|
|
ConfirmationUpdate confirmation = 2 [json_name = "confirmation"];
|
|
|
|
ChannelCloseUpdate chan_close = 3 [json_name = "chan_close"];
|
2016-07-08 01:23:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-31 02:42:23 +03:00
|
|
|
message PendingUpdate {
|
2017-04-12 00:49:39 +03:00
|
|
|
bytes txid = 1 [json_name = "txid"];
|
|
|
|
uint32 output_index = 2 [json_name = "output_index"];
|
2016-08-31 02:42:23 +03:00
|
|
|
}
|
|
|
|
|
2016-06-21 22:32:32 +03:00
|
|
|
message OpenChannelRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// The peer_id of the node to open a channel with
|
2017-04-12 00:49:39 +03:00
|
|
|
int32 target_peer_id = 1 [json_name = "target_peer_id"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// The pubkey of the node to open a channel with
|
2017-04-12 00:49:39 +03:00
|
|
|
bytes node_pubkey = 2 [json_name = "node_pubkey"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// The hex encorded pubkey of the node to open a channel with
|
2017-04-12 00:49:39 +03:00
|
|
|
string node_pubkey_string = 3 [json_name = "node_pubkey_string"];
|
2016-11-11 04:33:24 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The number of satoshis the wallet should commit to the channel
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 local_funding_amount = 4 [json_name = "local_funding_amount"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// The number of satoshis to push to the remote side as part of the initial commitment state
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 push_sat = 5 [json_name = "push_sat"];
|
2016-06-21 22:32:32 +03:00
|
|
|
}
|
2016-07-08 01:23:29 +03:00
|
|
|
message OpenStatusUpdate {
|
|
|
|
oneof update {
|
2017-04-12 00:49:39 +03:00
|
|
|
PendingUpdate chan_pending = 1 [json_name = "chan_pending"];
|
|
|
|
ConfirmationUpdate confirmation = 2 [json_name = "confirmation"];
|
|
|
|
ChannelOpenUpdate chan_open = 3 [json_name = "chan_open"];
|
2016-07-08 01:23:29 +03:00
|
|
|
}
|
2016-06-21 22:32:32 +03:00
|
|
|
}
|
|
|
|
|
2017-05-05 01:34:02 +03:00
|
|
|
message PendingChannelRequest {}
|
2016-07-08 01:24:52 +03:00
|
|
|
message PendingChannelResponse {
|
|
|
|
message PendingChannel {
|
2017-05-05 01:34:02 +03:00
|
|
|
string remote_node_pub = 1 [ json_name = "remote_node_pub" ];
|
2017-02-28 06:03:43 +03:00
|
|
|
string channel_point = 2 [ json_name = "channel_point" ];
|
2016-07-08 01:24:52 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
int64 capacity = 3 [ json_name = "capacity" ];
|
2017-05-05 01:34:02 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
int64 local_balance = 4 [ json_name = "local_balance" ];
|
|
|
|
int64 remote_balance = 5 [ json_name = "remote_balance" ];
|
2017-05-05 01:34:02 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message PendingOpenChannel {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The pending channel
|
2017-05-05 01:34:02 +03:00
|
|
|
PendingChannel channel = 1 [ json_name = "channel" ];
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The height at which this channel will be confirmed
|
2017-05-05 01:34:02 +03:00
|
|
|
uint32 confirmation_height = 2 [ json_name = "confirmation_height" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The number of blocks until this channel is open
|
2017-05-05 01:34:02 +03:00
|
|
|
uint32 blocks_till_open = 3 [ json_name = "blocks_till_open" ];
|
2017-05-17 05:13:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
The amount calculated to be paid in fees for the current set of
|
|
|
|
commitment transactions. The fee amount is persisted with the channel
|
|
|
|
in order to allow the fee amount to be removed and recalculated with
|
|
|
|
each channel state update, including updates that happen after a system
|
|
|
|
restart.
|
|
|
|
*/
|
2017-05-17 05:13:25 +03:00
|
|
|
int64 commit_fee = 4 [json_name = "commit_fee" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The weight of the commitment transaction
|
2017-05-17 05:13:25 +03:00
|
|
|
int64 commit_weight = 5 [ json_name = "commit_weight" ];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
The required number of satoshis per kilo-weight that the requester will
|
|
|
|
pay at all times, for both the funding transaction and commitment
|
|
|
|
transaction. This value can later be updated once the channel is open.
|
|
|
|
*/
|
2017-05-17 05:13:25 +03:00
|
|
|
int64 fee_per_kw = 6 [ json_name = "fee_per_kw" ];
|
2017-05-05 01:34:02 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ClosedChannel {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The pending channel to be closed
|
2017-05-05 01:34:02 +03:00
|
|
|
PendingChannel channel = 1;
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The transaction id of the closing transaction
|
2017-05-05 01:34:02 +03:00
|
|
|
string closing_txid = 2 [ json_name = "closing_txid" ];
|
|
|
|
}
|
|
|
|
|
|
|
|
message ForceClosedChannel {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The pending channel to be force closed
|
2017-05-05 01:34:02 +03:00
|
|
|
PendingChannel channel = 1 [ json_name = "channel" ];
|
|
|
|
|
|
|
|
// TODO(roasbeef): HTLC's as well?
|
2016-07-08 01:24:52 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The transaction id of the closing transaction
|
2017-05-05 01:34:02 +03:00
|
|
|
string closing_txid = 2 [ json_name = "closing_txid" ];
|
2016-07-08 01:24:52 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The balance in satoshis encumbered in this pending channel
|
2017-05-05 01:34:02 +03:00
|
|
|
int64 limbo_balance = 3 [ json_name = "limbo_balance" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The height at which funds can be sweeped into the wallet
|
2017-05-05 01:34:02 +03:00
|
|
|
uint32 maturity_height = 4 [ json_name = "maturity_height" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Remaining # of blocks until funds can be sweeped into the wallet
|
2017-05-05 01:34:02 +03:00
|
|
|
uint32 blocks_til_maturity = 5 [ json_name = "blocks_til_maturity" ];
|
2016-07-08 01:24:52 +03:00
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The balance in satoshis encumbered in pending channels
|
2017-05-05 01:34:02 +03:00
|
|
|
int64 total_limbo_balance = 1 [ json_name = "total_limbo_balance" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Channels pending opening
|
2017-05-05 01:34:02 +03:00
|
|
|
repeated PendingOpenChannel pending_open_channels = 2 [ json_name = "pending_open_channels" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Channels pending closing
|
2017-05-05 01:34:02 +03:00
|
|
|
repeated ClosedChannel pending_closing_channels = 3 [ json_name = "pending_closing_channels" ];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Channels pending force closing
|
2017-05-05 01:34:02 +03:00
|
|
|
repeated ForceClosedChannel pending_force_closing_channels = 4 [ json_name = "pending_force_closing_channels" ];
|
2016-06-21 22:32:32 +03:00
|
|
|
}
|
|
|
|
|
2016-06-21 21:46:27 +03:00
|
|
|
message WalletBalanceRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// If only witness outputs should be considered when calculating the wallet's balance
|
2016-06-21 21:46:27 +03:00
|
|
|
bool witness_only = 1;
|
|
|
|
}
|
|
|
|
message WalletBalanceResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The balance of the wallet
|
2017-07-05 01:50:24 +03:00
|
|
|
int64 balance = 1 [json_name = "balance"];
|
2015-12-31 05:58:15 +03:00
|
|
|
}
|
2016-07-15 14:02:59 +03:00
|
|
|
|
2016-09-15 21:59:51 +03:00
|
|
|
message ChannelBalanceRequest {
|
|
|
|
}
|
|
|
|
message ChannelBalanceResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Sum of channels balances denominated in satoshis
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 balance = 1 [json_name = "balance"];
|
2016-09-15 21:59:51 +03:00
|
|
|
}
|
|
|
|
|
2017-03-21 05:01:32 +03:00
|
|
|
message QueryRoutesRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The 33-byte hex-encoded public key for the payment destination
|
2016-12-27 08:44:44 +03:00
|
|
|
string pub_key = 1;
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// The amount to send expressed in satoshis
|
2016-12-27 08:44:44 +03:00
|
|
|
int64 amt = 2;
|
|
|
|
}
|
2017-03-21 05:01:32 +03:00
|
|
|
message QueryRoutesResponse {
|
|
|
|
repeated Route routes = 1 [ json_name = "routes"];
|
|
|
|
}
|
2016-12-27 08:44:44 +03:00
|
|
|
|
|
|
|
message Hop {
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
The unique channel ID for the channel. The first 3 bytes are the block
|
|
|
|
height, the next 3 the index within the block, and the last 2 bytes are the
|
|
|
|
output index for the channel.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
uint64 chan_id = 1 [json_name = "chan_id"];
|
|
|
|
int64 chan_capacity = 2 [json_name = "chan_capacity"];
|
|
|
|
int64 amt_to_forward = 3 [json_name = "amt_to_forward"];
|
|
|
|
int64 fee = 4 [json_name = "fee"];
|
2017-08-03 07:13:45 +03:00
|
|
|
uint32 expiry = 5 [json_name = "expiry"];
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
A path through the channel graph which runs over one or more channels in
|
|
|
|
succession. This struct carries all the information required to craft the
|
|
|
|
Sphinx onion packet, and send the payment along the first hop in the path. A
|
|
|
|
route is only selected as valid if all the channels have sufficient capacity to
|
|
|
|
carry the initial payment amount after fees are accounted for.
|
|
|
|
*/
|
2016-12-27 08:44:44 +03:00
|
|
|
message Route {
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
The cumulative (final) time lock across the entire route. This is the CLTV
|
|
|
|
value that should be extended to the first hop in the route. All other hops
|
|
|
|
will decrement the time-lock as advertised, leaving enough time for all
|
|
|
|
hops to wait for or present the payment preimage to complete the payment.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
uint32 total_time_lock = 1 [json_name = "total_time_lock"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
The sum of the fees paid at each hop within the final route. In the case
|
|
|
|
of a one-hop payment, this value will be zero as we don't need to pay a fee
|
|
|
|
it ourself.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 total_fees = 2 [json_name = "total_fees"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
The total amount of funds required to complete a payment over this route.
|
|
|
|
This value includes the cumulative fees at each hop. As a result, the HTLC
|
|
|
|
extended to the first-hop in the route will need to have at least this many
|
|
|
|
satoshis, otherwise the route will fail at an intermediate node due to an
|
|
|
|
insufficient amount of fees.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 total_amt = 3 [json_name = "total_amt"];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
Contains details concerning the specific forwarding details at each hop.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
repeated Hop hops = 4 [json_name = "hops"];
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
message NodeInfoRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The 33-byte hex-encoded compressed public of the target node
|
2017-04-12 00:49:39 +03:00
|
|
|
string pub_key = 1;
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message NodeInfo {
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
An individual vertex/node within the channel graph. A node is
|
|
|
|
connected to other nodes by one or more channel edges emanating from it. As
|
|
|
|
the graph is directed, a node will also have an incoming edge attached to
|
|
|
|
it for each outgoing edge.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
LightningNode node = 1 [json_name = "node"];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
uint32 num_channels = 2 [json_name = "num_channels"];
|
|
|
|
int64 total_capacity = 3 [json_name = "total_capacity"];
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
An individual vertex/node within the channel graph. A node is
|
|
|
|
connected to other nodes by one or more channel edges emanating from it. As the
|
|
|
|
graph is directed, a node will also have an incoming edge attached to it for
|
|
|
|
each outgoing edge.
|
|
|
|
*/
|
2016-12-27 08:44:44 +03:00
|
|
|
message LightningNode {
|
2017-02-28 06:03:43 +03:00
|
|
|
uint32 last_update = 1 [ json_name = "last_update" ];
|
|
|
|
string pub_key = 2 [ json_name = "pub_key" ];
|
2017-02-17 12:29:23 +03:00
|
|
|
string alias = 3 [ json_name = "alias" ];
|
|
|
|
repeated NodeAddress addresses = 4 [ json_name = "addresses" ];
|
|
|
|
}
|
|
|
|
|
|
|
|
message NodeAddress {
|
|
|
|
string network = 1 [ json_name = "network" ];
|
|
|
|
string addr = 2 [ json_name = "addr" ];
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message RoutingPolicy {
|
2017-04-12 00:49:39 +03:00
|
|
|
uint32 time_lock_delta = 1 [json_name = "time_lock_delta"];
|
|
|
|
int64 min_htlc = 2 [json_name = "min_htlc"];
|
|
|
|
int64 fee_base_msat = 3 [json_name = "fee_base_msat"];
|
|
|
|
int64 fee_rate_milli_msat = 4 [json_name = "fee_rate_milli_msat"];
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
A fully authenticated channel along with all its unique attributes.
|
|
|
|
Once an authenticated channel announcement has been processed on the network,
|
|
|
|
then a instance of ChannelEdgeInfo encapsulating the channels attributes is
|
|
|
|
stored. The other portions relevant to routing policy of a channel are stored
|
|
|
|
within a ChannelEdgePolicy for each direction of the channel.
|
|
|
|
*/
|
2016-12-27 08:44:44 +03:00
|
|
|
message ChannelEdge {
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
The unique channel ID for the channel. The first 3 bytes are the block
|
|
|
|
height, the next 3 the index within the block, and the last 2 bytes are the
|
|
|
|
output index for the channel.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
uint64 channel_id = 1 [json_name = "channel_id"];
|
|
|
|
string chan_point = 2 [json_name = "chan_point"];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
uint32 last_update = 3 [json_name = "last_update"];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
string node1_pub = 4 [json_name = "node1_pub"];
|
|
|
|
string node2_pub = 5 [json_name = "node2_pub"];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 capacity = 6 [json_name = "capacity"];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
RoutingPolicy node1_policy = 7 [json_name = "node1_policy"];
|
|
|
|
RoutingPolicy node2_policy = 8 [json_name = "node2_policy"];
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
message ChannelGraphRequest {
|
|
|
|
}
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Returns a new instance of the directed channel graph.
|
2016-12-27 08:44:44 +03:00
|
|
|
message ChannelGraph {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The list of `LightningNode`s in this channel graph
|
2017-04-12 00:49:39 +03:00
|
|
|
repeated LightningNode nodes = 1 [json_name = "nodes"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The list of `ChannelEdge`s in this channel graph
|
2017-04-12 00:49:39 +03:00
|
|
|
repeated ChannelEdge edges = 2 [json_name = "edges"];
|
2016-08-20 23:49:35 +03:00
|
|
|
}
|
|
|
|
|
2016-12-27 08:44:44 +03:00
|
|
|
message ChanInfoRequest {
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
The unique channel ID for the channel. The first 3 bytes are the block
|
|
|
|
height, the next 3 the index within the block, and the last 2 bytes are the
|
|
|
|
output index for the channel.
|
|
|
|
*/
|
2016-12-27 08:44:44 +03:00
|
|
|
uint64 chan_id = 1;
|
2016-07-15 14:02:59 +03:00
|
|
|
}
|
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
message NetworkInfoRequest {
|
|
|
|
}
|
2016-12-27 08:44:44 +03:00
|
|
|
message NetworkInfo {
|
2017-04-12 00:49:39 +03:00
|
|
|
uint32 graph_diameter = 1 [json_name = "graph_diameter"];
|
|
|
|
double avg_out_degree = 2 [json_name = "avg_out_degree"];
|
|
|
|
uint32 max_out_degree = 3 [json_name = "max_out_degree"];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
uint32 num_nodes = 4 [json_name = "num_nodes"];
|
|
|
|
uint32 num_channels = 5 [json_name = "num_channels"];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 total_network_capacity = 6 [json_name = "total_network_capacity"];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
double avg_channel_size = 7 [json_name = "avg_channel_size"];
|
|
|
|
int64 min_channel_size = 8 [json_name = "min_channel_size"];
|
|
|
|
int64 max_channel_size = 9 [json_name = "max_channel_size"];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
|
|
|
// TODO(roasbeef): fee rate info, expiry
|
|
|
|
// * also additional RPC for tracking fee info once in
|
2016-07-15 14:02:59 +03:00
|
|
|
}
|
2016-09-19 21:52:23 +03:00
|
|
|
|
2017-05-12 00:55:56 +03:00
|
|
|
message StopRequest{}
|
|
|
|
message StopResponse{}
|
|
|
|
|
2017-03-14 06:37:25 +03:00
|
|
|
message GraphTopologySubscription {}
|
|
|
|
message GraphTopologyUpdate {
|
2017-05-12 00:55:56 +03:00
|
|
|
repeated NodeUpdate node_updates = 1;
|
2017-03-14 06:37:25 +03:00
|
|
|
repeated ChannelEdgeUpdate channel_updates = 2;
|
|
|
|
repeated ClosedChannelUpdate closed_chans = 3;
|
|
|
|
}
|
|
|
|
message NodeUpdate {
|
|
|
|
repeated string addresses = 1;
|
|
|
|
string identity_key = 2;
|
|
|
|
bytes global_features = 3;
|
|
|
|
string alias = 4;
|
|
|
|
}
|
|
|
|
message ChannelEdgeUpdate {
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
The unique channel ID for the channel. The first 3 bytes are the block
|
|
|
|
height, the next 3 the index within the block, and the last 2 bytes are the
|
|
|
|
output index for the channel.
|
|
|
|
*/
|
2017-03-14 06:37:25 +03:00
|
|
|
uint64 chan_id = 1;
|
|
|
|
|
|
|
|
ChannelPoint chan_point = 2;
|
|
|
|
|
|
|
|
int64 capacity = 3;
|
|
|
|
|
|
|
|
RoutingPolicy routing_policy = 4;
|
|
|
|
|
|
|
|
string advertising_node = 5;
|
|
|
|
string connecting_node = 6;
|
|
|
|
}
|
|
|
|
message ClosedChannelUpdate {
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
The unique channel ID for the channel. The first 3 bytes are the block
|
|
|
|
height, the next 3 the index within the block, and the last 2 bytes are the
|
|
|
|
output index for the channel.
|
|
|
|
*/
|
2017-03-14 06:37:25 +03:00
|
|
|
uint64 chan_id = 1;
|
|
|
|
int64 capacity = 2;
|
|
|
|
uint32 closed_height = 3;
|
|
|
|
ChannelPoint chan_point = 4;
|
|
|
|
}
|
|
|
|
|
2016-12-27 08:44:44 +03:00
|
|
|
message SetAliasRequest {
|
|
|
|
string new_alias = 1;
|
|
|
|
}
|
2017-04-12 00:49:39 +03:00
|
|
|
message SetAliasResponse {
|
|
|
|
}
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2016-09-19 21:52:23 +03:00
|
|
|
message Invoice {
|
2017-09-05 19:01:01 +03:00
|
|
|
/**
|
|
|
|
An optional memo to attach along with the invoice. Used for record keeping
|
|
|
|
purposes for the invoice's creator, and will also be set in the description
|
|
|
|
field of the encoded payment request if the description_hash field is not
|
|
|
|
being used.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
string memo = 1 [json_name = "memo"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// An optional cryptographic receipt of payment
|
2017-04-12 00:49:39 +03:00
|
|
|
bytes receipt = 2 [json_name = "receipt"];
|
2016-09-19 21:52:23 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
The hex-encoded preimage (32 byte) which will allow settling an incoming
|
|
|
|
HTLC payable to this preimage
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
bytes r_preimage = 3 [json_name = "r_preimage"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// The hash of the preimage
|
2017-04-12 00:49:39 +03:00
|
|
|
bytes r_hash = 4 [json_name = "r_hash"];
|
2016-09-19 21:52:23 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The value of this invoice in satoshis
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 value = 5 [json_name = "value"];
|
2016-09-24 01:06:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// Whether this invoice has been fulfilled
|
2017-04-12 00:49:39 +03:00
|
|
|
bool settled = 6 [json_name = "settled"];
|
2016-11-13 05:03:19 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// When this invoice was created
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 creation_date = 7 [json_name = "creation_date"];
|
2017-07-28 02:39:49 +03:00
|
|
|
|
|
|
|
/// When this invoice was settled
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 settle_date = 8 [json_name = "settle_date"];
|
2017-01-13 05:51:41 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
A bare-bones invoice for a payment within the Lightning Network. With the
|
|
|
|
details of the invoice, the sender has all the data necessary to send a
|
|
|
|
payment to the recipient.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
string payment_request = 9 [json_name = "payment_request"];
|
2017-09-05 19:01:01 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
Hash (SHA-256) of a description of the payment. Used if the description of
|
|
|
|
payment (memo) is too long to naturally fit within the description field
|
|
|
|
of an encoded payment request.
|
|
|
|
*/
|
|
|
|
bytes description_hash = 10 [json_name = "description_hash"];
|
|
|
|
|
|
|
|
/// Payment request expiry time in seconds. Default is 3600 (1 hour).
|
|
|
|
int64 expiry = 11 [json_name = "expiry"];
|
|
|
|
|
|
|
|
/// Fallback on-chain address.
|
|
|
|
string fallback_addr = 12 [json_name = "fallback_addr"];
|
2016-09-19 21:52:23 +03:00
|
|
|
}
|
|
|
|
message AddInvoiceResponse {
|
2017-04-12 00:49:39 +03:00
|
|
|
bytes r_hash = 1 [json_name = "r_hash"];
|
2017-01-03 02:31:38 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
A bare-bones invoice for a payment within the Lightning Network. With the
|
|
|
|
details of the invoice, the sender has all the data necessary to send a
|
|
|
|
payment to the recipient.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
string payment_request = 2 [json_name = "payment_request"];
|
2016-09-19 21:52:23 +03:00
|
|
|
}
|
|
|
|
message PaymentHash {
|
2017-07-28 02:39:49 +03:00
|
|
|
/**
|
|
|
|
The hex-encoded payment hash of the invoice to be looked up. The passed
|
|
|
|
payment hash must be exactly 32 bytes, otherwise an error is returned.
|
|
|
|
*/
|
2017-04-12 00:49:39 +03:00
|
|
|
string r_hash_str = 1 [json_name = "r_hash_str"];
|
2017-08-22 10:07:25 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The payment hash of the invoice to be looked up.
|
2017-04-12 00:49:39 +03:00
|
|
|
bytes r_hash = 2 [json_name = "r_hash"];
|
2016-09-19 21:52:23 +03:00
|
|
|
}
|
|
|
|
message ListInvoiceRequest {
|
2017-08-22 10:07:25 +03:00
|
|
|
/// Toggles if all invoices should be returned, or only those that are currently unsettled.
|
2016-09-19 21:52:23 +03:00
|
|
|
bool pending_only = 1;
|
|
|
|
}
|
|
|
|
message ListInvoiceResponse {
|
2017-04-12 00:49:39 +03:00
|
|
|
repeated Invoice invoices = 1 [json_name = "invoices"];
|
2016-09-19 21:52:23 +03:00
|
|
|
}
|
2016-10-16 00:38:47 +03:00
|
|
|
|
2017-04-12 00:49:39 +03:00
|
|
|
message InvoiceSubscription {
|
|
|
|
}
|
2016-12-05 14:59:36 +03:00
|
|
|
|
|
|
|
|
|
|
|
message Payment {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The payment hash
|
2017-04-12 00:49:39 +03:00
|
|
|
string payment_hash = 1 [json_name = "payment_hash"];
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The value of the payment in satoshis
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 value = 2 [json_name = "value"];
|
2016-12-05 14:59:36 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The date of this payment
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 creation_date = 3 [json_name = "creation_date"];
|
2016-12-31 03:38:48 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The path this payment took
|
2017-03-17 05:45:45 +03:00
|
|
|
repeated string path = 4 [ json_name = "path" ];
|
2016-12-31 03:38:48 +03:00
|
|
|
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The fee paid for this payment in satoshis
|
2017-04-12 00:49:39 +03:00
|
|
|
int64 fee = 5 [json_name = "fee"];
|
2016-12-05 14:59:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ListPaymentsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListPaymentsResponse {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The list of payments
|
2017-04-12 00:49:39 +03:00
|
|
|
repeated Payment payments = 1 [json_name = "payments"];
|
2016-12-05 14:59:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteAllPaymentsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteAllPaymentsResponse {
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
2017-01-15 05:14:03 +03:00
|
|
|
|
|
|
|
message DebugLevelRequest {
|
|
|
|
bool show = 1;
|
|
|
|
string level_spec = 2;
|
|
|
|
}
|
|
|
|
message DebugLevelResponse {
|
2017-04-12 00:49:39 +03:00
|
|
|
string sub_systems = 1 [json_name = "sub_systems"];
|
2017-01-15 05:14:03 +03:00
|
|
|
}
|
2017-01-18 00:24:55 +03:00
|
|
|
|
|
|
|
message PayReqString {
|
2017-07-28 02:39:49 +03:00
|
|
|
/// The payment request string to be decoded
|
2017-01-18 00:24:55 +03:00
|
|
|
string pay_req = 1;
|
|
|
|
}
|
|
|
|
message PayReq {
|
2017-04-12 00:49:39 +03:00
|
|
|
string destination = 1 [json_name = "destination"];
|
|
|
|
string payment_hash = 2 [json_name = "payment_hash"];
|
|
|
|
int64 num_satoshis = 3 [json_name = "num_satoshis"];
|
2017-09-05 19:01:01 +03:00
|
|
|
int64 timestamp = 4 [json_name = "timestamp"];
|
|
|
|
int64 expiry = 5 [json_name = "expiry"];
|
|
|
|
string description = 6 [json_name = "description"];
|
|
|
|
string description_hash = 7 [json_name = "description_hash"];
|
|
|
|
string fallback_addr = 8 [json_name = "fallback_addr"];
|
2017-01-18 00:24:55 +03:00
|
|
|
}
|
2017-08-22 10:07:25 +03:00
|
|
|
|
|
|
|
message FeeReportRequest {}
|
|
|
|
message ChannelFeeReport {
|
|
|
|
/// The channel that this fee report belongs to.
|
|
|
|
string chan_point = 1 [json_name = "channel_point"];
|
|
|
|
|
|
|
|
/// The base fee charged regardless of the number of milli-satoshis sent.
|
|
|
|
int64 base_fee_msat = 2 [json_name = "base_fee_msat"];
|
|
|
|
|
|
|
|
/// The amount charged per milli-satoshis transferred expressed in millionths of a satoshi.
|
|
|
|
int64 fee_per_mil = 3 [json_name = "fee_per_mil"];
|
|
|
|
|
|
|
|
/// The effective fee rate in milli-satoshis. Computed by dividing the fee_per_mil value by 1 million.
|
|
|
|
double fee_rate = 4 [json_name = "fee_rate"];
|
|
|
|
}
|
|
|
|
message FeeReportResponse {
|
|
|
|
/// An array of channel fee reports which describes the current fee schedule for each channel.
|
|
|
|
repeated ChannelFeeReport channel_fees = 1 [json_name = "channel_fees"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message FeeUpdateRequest {
|
|
|
|
oneof scope {
|
|
|
|
/// If set, then this fee update applies to all currently active channels.
|
|
|
|
bool global = 1 [json_name = "global"] ;
|
|
|
|
|
|
|
|
/// If set, this fee update will target a specific channel.
|
|
|
|
ChannelPoint chan_point = 2 [json_name = "chan_point"];
|
|
|
|
}
|
|
|
|
|
|
|
|
/// The base fee charged regardless of the number of milli-satoshis sent.
|
|
|
|
int64 base_fee_msat = 3 [json_name = "base_fee_msat"];
|
|
|
|
|
|
|
|
/// The effective fee rate in milli-satoshis. The precision of this value goes up to 6 decimal places, so 1e-6.
|
|
|
|
double fee_rate = 4 [json_name = "fee_rate"];
|
|
|
|
}
|
|
|
|
message FeeUpdateResponse {
|
|
|
|
}
|