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;
|
|
|
|
|
|
|
|
service Lightning {
|
2016-10-16 00:38:47 +03:00
|
|
|
rpc WalletBalance(WalletBalanceRequest) returns (WalletBalanceResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/balance/blockchain"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
rpc ChannelBalance(ChannelBalanceRequest) returns (ChannelBalanceResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/balance/channels"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc GetTransactions(GetTransactionsRequest) returns (TransactionDetails) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/transactions"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
rpc SendCoins(SendCoinsRequest) returns (SendCoinsResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/transactions"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
rpc SubscribeTransactions(GetTransactionsRequest) returns (stream Transaction);
|
2016-09-15 21:59:51 +03:00
|
|
|
|
2015-12-31 05:58:15 +03:00
|
|
|
rpc SendMany(SendManyRequest) returns (SendManyResponse);
|
2015-12-31 06:02:24 +03:00
|
|
|
|
2016-10-16 00:38:47 +03:00
|
|
|
rpc NewAddress(NewAddressRequest) returns (NewAddressResponse);
|
|
|
|
rpc NewWitnessAddress(NewWitnessAddressRequest) returns (NewAddressResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/newaddress"
|
|
|
|
};
|
|
|
|
}
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2016-10-16 00:38:47 +03:00
|
|
|
rpc ConnectPeer(ConnectPeerRequest) returns (ConnectPeerResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/peers"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
rpc ListPeers(ListPeersRequest) returns (ListPeersResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/peers"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
rpc GetInfo(GetInfoRequest) returns (GetInfoResponse) {
|
|
|
|
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?
|
|
|
|
rpc PendingChannels(PendingChannelRequest) returns (PendingChannelResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/channels/pending"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
rpc ListChannels(ListChannelsRequest) returns (ListChannelsResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/channels"
|
|
|
|
};
|
|
|
|
}
|
2016-11-11 04:33:24 +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
|
|
|
|
|
|
|
rpc OpenChannel(OpenChannelRequest) returns (stream OpenStatusUpdate);
|
|
|
|
|
2016-10-16 00:38:47 +03:00
|
|
|
rpc CloseChannel(CloseChannelRequest) returns (stream CloseStatusUpdate) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
delete: "/v1/channels/{channel_point.funding_txid}/{channel_point.output_index}/{force}"
|
|
|
|
};
|
|
|
|
}
|
2016-07-13 03:36:34 +03:00
|
|
|
|
2016-11-11 04:33:24 +03:00
|
|
|
rpc SendPayment(stream SendRequest) returns (stream SendResponse);
|
|
|
|
|
|
|
|
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
|
|
|
|
2016-10-16 00:38:47 +03:00
|
|
|
rpc AddInvoice(Invoice) returns (AddInvoiceResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/invoices"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
rpc ListInvoices(ListInvoiceRequest) returns (ListInvoiceResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/invoices/{pending_only}"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
rpc LookupInvoice(PaymentHash) returns (Invoice) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/invoices/{r_hash_str}"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
rpc SubscribeInvoices(InvoiceSubscription) returns (stream Invoice) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/invoices/subscribe"
|
|
|
|
};
|
|
|
|
}
|
2017-01-18 00:24:55 +03:00
|
|
|
rpc DecodePayReq(PayReqString) returns (PayReq) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/payreq/{pay_req}"
|
|
|
|
};
|
|
|
|
}
|
2016-09-19 21:52:23 +03:00
|
|
|
|
2016-12-05 14:59:36 +03:00
|
|
|
rpc ListPayments(ListPaymentsRequest) returns (ListPaymentsResponse){
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/payments"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
rpc DeleteAllPayments(DeleteAllPaymentsRequest) returns (DeleteAllPaymentsResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
delete: "/v1/payments"
|
|
|
|
};
|
|
|
|
};
|
2016-07-13 03:36:34 +03:00
|
|
|
|
2016-12-27 08:44:44 +03:00
|
|
|
rpc DescribeGraph(ChannelGraphRequest) returns (ChannelGraph) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/graph"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc GetChanInfo(ChanInfoRequest) returns (ChannelEdge) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/graph/edge/{chan_id}"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc GetNodeInfo(NodeInfoRequest) returns (NodeInfo) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/graph/node/{pub_key}"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc QueryRoute(RouteRequest) returns (Route) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/graph/route/{pub_key}/{amt}"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc GetNetworkInfo(NetworkInfoRequest) returns (NetworkInfo) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/graph/info"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-03-14 06:37:25 +03:00
|
|
|
rpc SubscribeChannelGraph(GraphTopologySubscription) returns (stream GraphTopologyUpdate);
|
|
|
|
|
2016-12-27 08:44:44 +03:00
|
|
|
rpc SetAlias(SetAliasRequest) returns (SetAliasResponse);
|
2017-01-15 05:14:03 +03:00
|
|
|
|
|
|
|
rpc DebugLevel(DebugLevelRequest) returns (DebugLevelResponse);
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
2016-10-16 00:38:47 +03:00
|
|
|
|
|
|
|
message Transaction {
|
2017-02-28 06:03:43 +03:00
|
|
|
string tx_hash = 1 [ json_name = "tx_hash" ];
|
2017-03-06 01:53:37 +03:00
|
|
|
int64 amount = 2 [ json_name = "amount" ];
|
2017-02-28 06:03:43 +03:00
|
|
|
int32 num_confirmations = 3 [ json_name = "num_confirmations" ];
|
|
|
|
string block_hash = 4 [ json_name = "block_hash" ];
|
|
|
|
int32 block_height = 5 [ json_name = "block_height" ];
|
|
|
|
int64 time_stamp = 6 [ json_name = "time_stamp" ];
|
|
|
|
int64 total_fees = 7 [ json_name = "total_fees" ];
|
2016-10-16 00:38:47 +03:00
|
|
|
}
|
|
|
|
message GetTransactionsRequest {
|
|
|
|
}
|
|
|
|
message TransactionDetails {
|
2017-02-28 06:03:43 +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 {
|
|
|
|
bytes dest = 1;
|
2016-11-11 04:33:24 +03:00
|
|
|
string dest_string = 2;
|
|
|
|
|
|
|
|
int64 amt = 3;
|
2016-07-13 03:36:34 +03:00
|
|
|
|
2016-11-11 04:33:24 +03:00
|
|
|
bytes payment_hash = 4;
|
|
|
|
string payment_hash_string = 5;
|
|
|
|
|
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-02-28 06:03:43 +03:00
|
|
|
bytes payment_preimage = 1 [ json_name = "payment_preimage" ];
|
|
|
|
Route payment_route = 2 [ 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-02-28 06:03:43 +03:00
|
|
|
bytes funding_txid = 1 [ json_name = "funding_txid" ];
|
|
|
|
string funding_txid_str = 2 [ json_name = "funding_txid_str" ];
|
|
|
|
uint32 output_index = 3 [ json_name = "output_index" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message LightningAddress {
|
2017-02-28 06:03:43 +03:00
|
|
|
string pubkey = 1 [ json_name = "pubkey" ];
|
|
|
|
string host = 2 [ json_name = "host" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
2015-12-30 23:19:09 +03:00
|
|
|
message SendManyRequest {
|
|
|
|
map<string, int64> AddrToAmount = 1;
|
|
|
|
}
|
|
|
|
message SendManyResponse {
|
2017-02-28 06:03:43 +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 {
|
|
|
|
string addr = 1;
|
|
|
|
int64 amount = 2;
|
|
|
|
}
|
|
|
|
message SendCoinsResponse {
|
2017-02-28 06:03:43 +03:00
|
|
|
string txid = 1 [ json_name = "txid" ];
|
2016-06-29 21:28:10 +03:00
|
|
|
}
|
|
|
|
|
2016-04-25 06:26:32 +03:00
|
|
|
message NewAddressRequest {
|
|
|
|
enum AddressType {
|
|
|
|
WITNESS_PUBKEY_HASH = 0;
|
|
|
|
NESTED_PUBKEY_HASH = 1;
|
|
|
|
PUBKEY_HASH = 2;
|
|
|
|
}
|
|
|
|
AddressType type = 1;
|
|
|
|
}
|
2016-10-16 00:38:47 +03:00
|
|
|
message NewWitnessAddressRequest {}
|
2015-12-30 23:19:09 +03:00
|
|
|
message NewAddressResponse {
|
2017-02-28 06:03:43 +03:00
|
|
|
string address = 1 [ json_name = "address" ];
|
2015-12-30 23:19:09 +03:00
|
|
|
}
|
2015-12-31 05:58:15 +03:00
|
|
|
|
2016-01-17 06:03:47 +03:00
|
|
|
message ConnectPeerRequest {
|
2016-06-21 21:52:09 +03:00
|
|
|
LightningAddress addr = 1;
|
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-02-28 06:03:43 +03:00
|
|
|
int32 peer_id = 1 [ json_name = "peer_id" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message HTLC {
|
2017-02-28 06:03:43 +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" ];
|
|
|
|
uint32 revocation_delay = 5 [ json_name = "revocation_delay" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ActiveChannel {
|
2017-03-09 01:45:58 +03:00
|
|
|
bool active = 1 [ json_name = "active" ];
|
|
|
|
string remote_pubkey = 2 [ json_name = "remote_pubkey" ];
|
|
|
|
string channel_point = 3 [ json_name = "channel_point" ];
|
|
|
|
uint64 chan_id = 4 [ json_name = "chan_id" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-03-09 01:45:58 +03:00
|
|
|
int64 capacity = 5 [ json_name = "capacity" ];
|
|
|
|
int64 local_balance = 6 [ json_name = "local_balance" ];
|
|
|
|
int64 remote_balance = 7 [ json_name = "remote_balance" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-03-09 01:45:58 +03:00
|
|
|
int64 unsettled_balance = 8 [ json_name = "unsettled_balance" ];
|
|
|
|
int64 total_satoshis_sent = 9 [ json_name = "total_satoshis_sent" ];
|
|
|
|
int64 total_satoshis_received = 10 [ json_name = "total_satoshis_received" ];
|
|
|
|
uint64 num_updates = 11 [ json_name = "num_updates" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-03-09 01:45:58 +03:00
|
|
|
repeated HTLC pending_htlcs = 12 [ json_name = "pending_htlcs" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
2016-09-26 06:02:33 +03:00
|
|
|
message ListChannelsRequest {}
|
|
|
|
message ListChannelsResponse {
|
2017-02-28 06:03:43 +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-02-28 06:03:43 +03:00
|
|
|
string pub_key = 1 [ json_name = "pub_key" ];
|
|
|
|
int32 peer_id = 2 [ json_name = "peer_id" ];
|
|
|
|
string address = 3 [ json_name = "address" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
uint64 bytes_sent = 4 [ json_name = "bytes_sent" ];
|
|
|
|
uint64 bytes_recv = 5 [ json_name = "bytes_recv" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
int64 sat_sent = 6 [ json_name = "sat_sent" ];
|
|
|
|
int64 sat_recv = 7 [ json_name = "sat_recv" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
bool inbound = 8 [ json_name = "inbound" ];
|
2017-01-26 05:16:28 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
int64 ping_time = 9 [ json_name = "ping_time" ];
|
2016-06-21 21:52:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ListPeersRequest {}
|
|
|
|
message ListPeersResponse {
|
2017-02-28 06:03:43 +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
|
|
|
|
2016-07-06 04:52:05 +03:00
|
|
|
message GetInfoRequest{}
|
|
|
|
message GetInfoResponse {
|
2017-02-28 06:03:43 +03:00
|
|
|
string identity_pubkey = 1 [ json_name = "identity_pubkey" ];
|
|
|
|
string alias = 2 [ json_name = "alias" ];
|
2016-07-06 04:52:05 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
uint32 num_pending_channels = 3 [ json_name = "num_pending_channels" ];
|
|
|
|
uint32 num_active_channels = 4 [ json_name = "num_active_channels" ];
|
2016-07-06 04:52:05 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
uint32 num_peers = 5 [ json_name = "num_peers" ];
|
2016-11-15 02:54:47 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
uint32 block_height = 6 [ json_name = "block_height" ];
|
|
|
|
string block_hash = 8 [ json_name = "block_hash" ];
|
2016-12-13 02:34:20 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
bool synced_to_chain = 9 [ json_name = "synced_to_chain" ];
|
|
|
|
bool testnet = 10 [ json_name = "testnet" ];
|
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-02-28 06:03:43 +03:00
|
|
|
ChannelPoint channel_point = 1 [ json_name = "channel_point"] ;
|
2016-07-08 01:23:29 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ChannelCloseUpdate {
|
2017-02-28 06:03:43 +03:00
|
|
|
bytes closing_txid = 1 [ json_name = "closing_txid" ];
|
2016-07-08 01:23:29 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
bool success = 2 [ json_name = "success" ];
|
2016-07-08 01:23:29 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message CloseChannelRequest {
|
|
|
|
ChannelPoint channel_point = 1;
|
|
|
|
int64 time_limit = 2;
|
2016-09-12 22:27:44 +03:00
|
|
|
bool force = 3;
|
2016-07-08 01:23:29 +03:00
|
|
|
}
|
|
|
|
message CloseStatusUpdate {
|
|
|
|
oneof update {
|
2017-02-28 06:03:43 +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-02-28 06:03:43 +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-02-28 06:03:43 +03:00
|
|
|
int32 target_peer_id = 1 [ json_name = "target_peer_id" ];
|
|
|
|
bytes node_pubkey = 2 [ json_name = "node_pubkey" ];
|
|
|
|
string node_pubkey_string = 3 [ json_name = "node_pubkey_string" ];
|
2016-11-11 04:33:24 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
int64 local_funding_amount = 4 [ json_name = "local_funding_amount" ];
|
|
|
|
int64 push_sat = 5 [ json_name = "push_sat" ];
|
2016-06-21 22:32:32 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
uint32 num_confs = 6 [ json_name = "num_confs" ];
|
2016-06-21 22:32:32 +03:00
|
|
|
}
|
2016-07-08 01:23:29 +03:00
|
|
|
message OpenStatusUpdate {
|
|
|
|
oneof update {
|
2017-02-28 06:03:43 +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
|
|
|
}
|
|
|
|
|
2016-07-08 01:24:52 +03:00
|
|
|
enum ChannelStatus {
|
|
|
|
ALL = 0;
|
|
|
|
OPENING = 1;
|
|
|
|
CLOSING = 2;
|
2016-06-21 22:32:32 +03:00
|
|
|
}
|
2016-07-08 01:24:52 +03:00
|
|
|
message PendingChannelRequest {
|
|
|
|
ChannelStatus status = 1;
|
|
|
|
}
|
|
|
|
message PendingChannelResponse {
|
|
|
|
message PendingChannel {
|
2017-02-28 06:03:43 +03:00
|
|
|
string identity_key = 1 [ json_name = "identity_key" ];
|
|
|
|
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" ];
|
|
|
|
int64 local_balance = 4 [ json_name = "local_balance" ];
|
|
|
|
int64 remote_balance = 5 [ json_name = "remote_balance" ];
|
2016-07-08 01:24:52 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
string closing_txid = 6 [ json_name = "closing_txid" ];
|
2016-07-08 01:24:52 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
ChannelStatus status = 7 [ json_name = "status" ];
|
2016-07-08 01:24:52 +03:00
|
|
|
}
|
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
repeated PendingChannel pending_channels = 1 [ json_name = "pending_channels" ];
|
2016-06-21 22:32:32 +03:00
|
|
|
}
|
|
|
|
|
2016-06-21 21:46:27 +03:00
|
|
|
message WalletBalanceRequest {
|
|
|
|
bool witness_only = 1;
|
|
|
|
}
|
|
|
|
message WalletBalanceResponse {
|
2017-02-28 06:03:43 +03:00
|
|
|
double 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-02-28 06:03:43 +03:00
|
|
|
int64 balance = 1 [ json_name = "balance" ];
|
2016-09-15 21:59:51 +03:00
|
|
|
}
|
|
|
|
|
2016-12-27 08:44:44 +03:00
|
|
|
message RouteRequest {
|
|
|
|
string pub_key = 1;
|
|
|
|
int64 amt = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Hop {
|
2017-02-28 06:03:43 +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" ];
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Route {
|
2017-02-28 06:03:43 +03:00
|
|
|
uint32 total_time_lock = 1 [ json_name = "total_time_lock" ];
|
|
|
|
int64 total_fees = 2 [ json_name = "total_fees" ];
|
|
|
|
int64 total_amt = 3 [ json_name = "total_amt" ];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
repeated Hop hops = 4 [ json_name = "hops" ];
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message NodeInfoRequest{
|
|
|
|
string pub_key = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message NodeInfo {
|
2017-02-28 06:03:43 +03:00
|
|
|
LightningNode node = 1 [ json_name = "node" ];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-02-28 06:03:43 +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
|
|
|
}
|
|
|
|
|
|
|
|
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" ];
|
|
|
|
string address = 3 [ json_name = "address" ];
|
|
|
|
string alias = 4 [ json_name = "alias" ];
|
2016-12-27 08:44:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message RoutingPolicy {
|
2017-02-28 06:03:43 +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
|
|
|
}
|
|
|
|
|
|
|
|
message ChannelEdge {
|
2017-02-28 06:03:43 +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-02-28 06:03:43 +03:00
|
|
|
uint32 last_update = 3 [ json_name = "last_update" ];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-02-28 06:03:43 +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-02-28 06:03:43 +03:00
|
|
|
int64 capacity = 6 [ json_name = "capacity" ];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-02-28 06:03:43 +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
|
|
|
}
|
|
|
|
|
|
|
|
message ChannelGraphRequest{}
|
|
|
|
|
|
|
|
message ChannelGraph {
|
2017-02-28 06:03:43 +03:00
|
|
|
repeated LightningNode nodes = 1 [ json_name = "nodes" ];
|
|
|
|
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 {
|
|
|
|
uint64 chan_id = 1;
|
2016-07-15 14:02:59 +03:00
|
|
|
}
|
|
|
|
|
2016-12-27 08:44:44 +03:00
|
|
|
message NetworkInfoRequest{}
|
|
|
|
message NetworkInfo {
|
2017-02-28 06:03:43 +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-02-28 06:03:43 +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-02-28 06:03:43 +03:00
|
|
|
int64 total_network_capacity = 6 [ json_name = "total_network_capacity" ];
|
2016-12-27 08:44:44 +03:00
|
|
|
|
2017-02-28 06:03:43 +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-03-14 06:37:25 +03:00
|
|
|
message GraphTopologySubscription {}
|
|
|
|
message GraphTopologyUpdate {
|
|
|
|
repeated NodeUpdate node_updates = 1;
|
|
|
|
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 {
|
|
|
|
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 {
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
message SetAliasResponse{}
|
|
|
|
|
2016-09-19 21:52:23 +03:00
|
|
|
message Invoice {
|
2017-02-28 06:03:43 +03:00
|
|
|
string memo = 1 [ json_name = "memo" ];
|
|
|
|
bytes receipt = 2 [ json_name = "receipt" ];
|
2016-09-19 21:52:23 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
bytes r_preimage = 3 [ json_name = "r_preimage" ];
|
|
|
|
bytes r_hash = 4 [ json_name = "r_hash" ];
|
2016-09-19 21:52:23 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
int64 value = 5 [ json_name = "value" ];
|
2016-09-24 01:06:25 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
bool settled = 6 [ json_name = "settled" ];
|
2016-11-13 05:03:19 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
int64 creation_date = 7 [ json_name = "creation_date" ];
|
|
|
|
int64 settle_date = 8 [ json_name = "settle_date" ];
|
2017-01-13 05:51:41 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
string payment_request = 9 [ json_name = "payment_request" ];
|
2016-09-19 21:52:23 +03:00
|
|
|
}
|
|
|
|
message AddInvoiceResponse {
|
2017-02-28 06:03:43 +03:00
|
|
|
bytes r_hash = 1 [ json_name = "r_hash" ];
|
2017-01-03 02:31:38 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
string payment_request = 2 [ json_name = "payment_request" ];
|
2016-09-19 21:52:23 +03:00
|
|
|
}
|
|
|
|
message PaymentHash {
|
2017-02-28 06:03:43 +03:00
|
|
|
string r_hash_str = 1 [ json_name = "r_hash_str" ];
|
|
|
|
bytes r_hash = 2 [ json_name = "r_hash" ];
|
2016-09-19 21:52:23 +03:00
|
|
|
}
|
|
|
|
message ListInvoiceRequest {
|
|
|
|
bool pending_only = 1;
|
|
|
|
}
|
|
|
|
message ListInvoiceResponse {
|
2017-02-28 06:03:43 +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
|
|
|
|
|
|
|
message InvoiceSubscription {}
|
2016-12-05 14:59:36 +03:00
|
|
|
|
|
|
|
|
|
|
|
message Payment {
|
2017-02-28 06:03:43 +03:00
|
|
|
string payment_hash = 1 [ json_name = "payment_hash" ];
|
|
|
|
int64 value = 2 [ json_name = "value" ];
|
2016-12-05 14:59:36 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
int64 creation_date = 3 [ json_name = "creation_date" ];
|
2016-12-31 03:38:48 +03:00
|
|
|
|
2017-03-17 05:45:45 +03:00
|
|
|
repeated string path = 4 [ json_name = "path" ];
|
2016-12-31 03:38:48 +03:00
|
|
|
|
2017-02-28 06:03:43 +03:00
|
|
|
int64 fee = 5 [ json_name = "fee" ];
|
2016-12-05 14:59:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ListPaymentsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListPaymentsResponse {
|
2017-02-28 06:03:43 +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-02-28 06:03:43 +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 {
|
|
|
|
string pay_req = 1;
|
|
|
|
}
|
|
|
|
message PayReq {
|
2017-02-28 06:03:43 +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-01-18 00:24:55 +03:00
|
|
|
}
|