@@ -75,6 +75,17 @@ service WalletUnlocker {
7575 body : "*"
7676 };
7777 }
78+
79+ /** lncli: `changepassword`
80+ ChangePassword changes the password of the encrypted wallet. This will
81+ automatically unlock the wallet database if successful.
82+ */
83+ rpc ChangePassword (ChangePasswordRequest ) returns (ChangePasswordResponse ) {
84+ option (google.api.http ) = {
85+ post : "/v1/changepassword"
86+ body : "*"
87+ };
88+ }
7889}
7990
8091message GenSeedRequest {
@@ -159,6 +170,21 @@ message UnlockWalletRequest {
159170}
160171message UnlockWalletResponse {}
161172
173+ message ChangePasswordRequest {
174+ /**
175+ current_password should be the current valid passphrase used to unlock the
176+ daemon.
177+ */
178+ bytes current_password = 1 ;
179+
180+ /**
181+ new_password should be the new passphrase that will be needed to unlock the
182+ daemon.
183+ */
184+ bytes new_password = 2 ;
185+ }
186+ message ChangePasswordResponse {}
187+
162188service Lightning {
163189 /** lncli: `walletbalance`
164190 WalletBalance returns total unspent outputs(confirmed and unconfirmed), all
@@ -315,6 +341,17 @@ service Lightning {
315341 };
316342 }
317343
344+ /** lncli: `closedchannels`
345+ ClosedChannels returns a description of all the closed channels that
346+ this node was a participant in.
347+ */
348+ rpc ClosedChannels (ClosedChannelsRequest ) returns (ClosedChannelsResponse ) {
349+ option (google.api.http ) = {
350+ get : "/v1/channels/closed"
351+ };
352+ }
353+
354+
318355 /**
319356 OpenChannelSync is a synchronous version of the OpenChannel RPC call. This
320357 call is meant to be consumed by clients to the REST proxy. As with all
@@ -373,6 +410,25 @@ service Lightning {
373410 };
374411 }
375412
413+ /** lncli: `sendtoroute`
414+ SendToRoute is a bi-directional streaming RPC for sending payment through
415+ the Lightning Network. This method differs from SendPayment in that it
416+ allows users to specify a full route manually. This can be used for things
417+ like rebalancing, and atomic swaps.
418+ */
419+ rpc SendToRoute (stream SendToRouteRequest ) returns (stream SendResponse );
420+
421+ /**
422+ SendToRouteSync is a synchronous version of SendToRoute. It Will block
423+ until the payment either fails or succeeds.
424+ */
425+ rpc SendToRouteSync (SendToRouteRequest ) returns (SendResponse ) {
426+ option (google.api.http ) = {
427+ post : "/v1/channels/transactions/route"
428+ body : "*"
429+ };
430+ }
431+
376432 /** lncli: `addinvoice`
377433 AddInvoice attempts to add a new invoice to the invoice database. Any
378434 duplicated invoices are rejected, therefore all invoices *must* have a
@@ -601,6 +657,16 @@ message TransactionDetails {
601657 repeated Transaction transactions = 1 [json_name = "transactions" ];
602658}
603659
660+ message FeeLimit {
661+ oneof limit {
662+ /// The fee limit expressed as a fixed amount of satoshis.
663+ int64 fixed = 1 ;
664+
665+ /// The fee limit expressed as a percentage of the payment amount.
666+ int64 percent = 2 ;
667+ }
668+ }
669+
604670message SendRequest {
605671 /// The identity pubkey of the payment recipient
606672 bytes dest = 1 ;
@@ -624,15 +690,37 @@ message SendRequest {
624690 */
625691 string payment_request = 6 ;
626692
627- /// The CLTV delta from the current height that should be used to set the timelock for the final hop.
693+ /**
694+ The CLTV delta from the current height that should be used to set the
695+ timelock for the final hop.
696+ */
628697 int32 final_cltv_delta = 7 ;
698+
699+ /**
700+ The maximum number of satoshis that will be paid as a fee of the payment.
701+ This value can be represented either as a percentage of the amount being
702+ sent, or as a fixed amount of the maximum fee the user is willing the pay to
703+ send the payment.
704+ */
705+ FeeLimit fee_limit = 8 ;
629706}
630707message SendResponse {
631708 string payment_error = 1 [json_name = "payment_error" ];
632709 bytes payment_preimage = 2 [json_name = "payment_preimage" ];
633710 Route payment_route = 3 [json_name = "payment_route" ];
634711}
635712
713+ message SendToRouteRequest {
714+ /// The payment hash to use for the HTLC.
715+ bytes payment_hash = 1 ;
716+
717+ /// An optional hex-encoded payment hash to be used for the HTLC.
718+ string payment_hash_string = 2 ;
719+
720+ /// The set of routes that should be used to attempt to complete the payment.
721+ repeated Route routes = 3 ;
722+ }
723+
636724message ChannelPoint {
637725 oneof funding_txid {
638726 /// Txid of the funding transaction
@@ -843,6 +931,7 @@ message Channel {
843931 bool private = 17 [json_name = "private" ];
844932}
845933
934+
846935message ListChannelsRequest {
847936 bool active_only = 1 ;
848937 bool inactive_only = 2 ;
@@ -854,6 +943,58 @@ message ListChannelsResponse {
854943 repeated Channel channels = 11 [json_name = "channels" ];
855944}
856945
946+ message ChannelCloseSummary {
947+ /// The outpoint (txid:index) of the funding transaction.
948+ string channel_point = 1 [json_name = "channel_point" ];
949+
950+ /// The unique channel ID for the channel.
951+ uint64 chan_id = 2 [json_name = "chan_id" ];
952+
953+ /// The hash of the genesis block that this channel resides within.
954+ string chain_hash = 3 [json_name = "chain_hash" ];
955+
956+ /// The txid of the transaction which ultimately closed this channel.
957+ string closing_tx_hash = 4 [json_name = "closing_tx_hash" ];
958+
959+ /// Public key of the remote peer that we formerly had a channel with.
960+ string remote_pubkey = 5 [json_name = "remote_pubkey" ];
961+
962+ /// Total capacity of the channel.
963+ int64 capacity = 6 [json_name = "capacity" ];
964+
965+ /// Height at which the funding transaction was spent.
966+ uint32 close_height = 7 [json_name = "close_height" ];
967+
968+ /// Settled balance at the time of channel closure
969+ int64 settled_balance = 8 [json_name = "settled_balance" ];
970+
971+ /// The sum of all the time-locked outputs at the time of channel closure
972+ int64 time_locked_balance = 9 [json_name = "time_locked_balance" ];
973+
974+ enum ClosureType {
975+ COOPERATIVE_CLOSE = 0 ;
976+ LOCAL_FORCE_CLOSE = 1 ;
977+ REMOTE_FORCE_CLOSE = 2 ;
978+ BREACH_CLOSE = 3 ;
979+ FUNDING_CANCELED = 4 ;
980+ }
981+
982+ /// Details on how the channel was closed.
983+ ClosureType close_type = 10 [json_name = "close_type" ];
984+ }
985+
986+ message ClosedChannelsRequest {
987+ bool cooperative = 1 ;
988+ bool local_force = 2 ;
989+ bool remote_force = 3 ;
990+ bool breach = 4 ;
991+ bool funding_canceled = 5 ;
992+ }
993+
994+ message ClosedChannelsResponse {
995+ repeated ChannelCloseSummary channels = 1 [json_name = "channels" ];
996+ }
997+
857998message Peer {
858999 /// The identity pubkey of the peer
8591000 string pub_key = 1 [json_name = "pub_key" ];
@@ -1171,9 +1312,20 @@ message QueryRoutesRequest {
11711312
11721313 /// The max number of routes to return.
11731314 int32 num_routes = 3 ;
1315+
1316+ /// An optional CLTV delta from the current height that should be used for the timelock of the final hop
1317+ int32 final_cltv_delta = 4 ;
1318+
1319+ /**
1320+ The maximum number of satoshis that will be paid as a fee of the payment.
1321+ This value can be represented either as a percentage of the amount being
1322+ sent, or as a fixed amount of the maximum fee the user is willing the pay to
1323+ send the payment.
1324+ */
1325+ FeeLimit fee_limit = 5 ;
11741326}
11751327message QueryRoutesResponse {
1176- repeated Route routes = 1 [ json_name = "routes" ];
1328+ repeated Route routes = 1 [json_name = "routes" ];
11771329}
11781330
11791331message Hop {
0 commit comments