diff --git a/app/lib/lnd/neutrino.js b/app/lib/lnd/neutrino.js index 20f760c5..59383c9b 100644 --- a/app/lib/lnd/neutrino.js +++ b/app/lib/lnd/neutrino.js @@ -104,10 +104,10 @@ class Neutrino extends EventEmitter { // Configure neutrino backend. if (this.lndConfig.network === 'mainnet') { neutrinoArgs.push('--neutrino.connect=mainnet1-btcd.zaphq.io') - // neutrinoArgs.push('--neutrino.connect=mainnet2-btcd.zaphq.io') + neutrinoArgs.push('--neutrino.connect=mainnet2-btcd.zaphq.io') } else { neutrinoArgs.push('--neutrino.connect=testnet1-btcd.zaphq.io') - // neutrinoArgs.push('--neutrino.connect=testnet2-btcd.zaphq.io') + neutrinoArgs.push('--neutrino.connect=testnet2-btcd.zaphq.io') } // Log the final config. diff --git a/package.json b/package.json index 4341c39b..1993af9f 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "config": { "style_paths": "app/styles/*.scss app/components/**/*.scss app/components/**/*.js", "lnd-binary": { - "binaryVersion": "0.5-beta-21-g25145acc", + "binaryVersion": "0.5-beta-247-g68d96488", "binarySite": "https://github.com/LN-Zap/lnd/releases/download" } }, diff --git a/resources/rpc.proto b/resources/rpc.proto index acd6a9e5..fd941ba3 100644 --- a/resources/rpc.proto +++ b/resources/rpc.proto @@ -1,4 +1,4 @@ -// Imported from https://github.com/lightningnetwork/lnd/blob/48d016bc78e9f338742b10d936e52e7655fd8770/lnrpc/rpc.proto +// Imported from https://github.com/lightningnetwork/lnd/blob/68d96488cc9f78e6aeb7d5c27822f384f756f335/lnrpc/rpc.proto syntax = "proto3"; // import "google/api/annotations.proto"; @@ -250,12 +250,7 @@ service Lightning { /** lncli: `newaddress` NewAddress creates a new address under control of the local wallet. */ - rpc NewAddress (NewAddressRequest) returns (NewAddressResponse); - - /** - NewWitnessAddress creates a new witness address under control of the local wallet. - */ - rpc NewWitnessAddress (NewWitnessAddressRequest) returns (NewAddressResponse) { + rpc NewAddress (NewAddressRequest) returns (NewAddressResponse) { option (google.api.http) = { get: "/v1/newaddress" }; @@ -390,6 +385,19 @@ service Lightning { }; } + /** lncli: `abandonchannel` + AbandonChannel removes all channel state from the database except for a + close summary. This method can be used to get rid of permanently unusable + channels due to bugs fixed in newer versions of lnd. Only available + when in debug builds of lnd. + */ + rpc AbandonChannel (AbandonChannelRequest) returns (AbandonChannelResponse) { + option (google.api.http) = { + delete: "/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}" + }; + } + + /** lncli: `sendpayment` SendPayment dispatches a bi-directional streaming RPC for sending payments through the Lightning Network. A single RPC invocation creates a persistent @@ -444,7 +452,14 @@ service Lightning { /** lncli: `listinvoices` ListInvoices returns a list of all the invoices currently stored within the - database. Any active debug invoices are ignored. + database. Any active debug invoices are ignored. It has full support for + paginated responses, allowing users to query for specific invoices through + their add_index. This can be done by using either the first_index_offset or + last_index_offset fields included in the response as the index_offset of the + next request. The reversed flag is set by default in order to paginate + backwards. If you wish to paginate forwards, you must explicitly set the + flag to false. If none of the parameters are specified, then the last 100 + invoices will be returned. */ rpc ListInvoices (ListInvoiceRequest) returns (ListInvoiceResponse) { option (google.api.http) = { @@ -464,7 +479,7 @@ service Lightning { } /** - SubscribeInvoices returns a uni-directional stream (sever -> client) for + SubscribeInvoices returns a uni-directional stream (server -> client) for notifying the client of newly added/settled invoices. The caller can optionally specify the add_index and/or the settle_index. If the add_index is specified, then we'll first start by sending add invoice events for all @@ -637,7 +652,7 @@ message Transaction { /// The transaction hash string tx_hash = 1 [ json_name = "tx_hash" ]; - /// The transaction ammount, denominated in satoshis + /// The transaction amount, denominated in satoshis int64 amount = 2 [ json_name = "amount" ]; /// The number of confirmations @@ -788,7 +803,6 @@ message SendCoinsResponse { - `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) */ message NewAddressRequest { enum AddressType { @@ -799,10 +813,6 @@ message NewAddressRequest { /// The address type AddressType type = 1; } - -message NewWitnessAddressRequest { -} - message NewAddressResponse { /// The newly generated wallet address string address = 1 [json_name = "address"]; @@ -985,6 +995,7 @@ message ChannelCloseSummary { REMOTE_FORCE_CLOSE = 2; BREACH_CLOSE = 3; FUNDING_CANCELED = 4; + ABANDONED = 5; } /// Details on how the channel was closed. @@ -997,6 +1008,7 @@ message ClosedChannelsRequest { bool remote_force = 3; bool breach = 4; bool funding_canceled = 5; + bool abandoned = 6; } message ClosedChannelsResponse { @@ -1159,6 +1171,9 @@ message OpenChannelRequest { /// The minimum number of confirmations each one of your outputs used for the funding transaction must satisfy. int32 min_confs = 11 [json_name = "min_confs"]; + + /// Whether unconfirmed outputs should be used as inputs for the funding transaction. + bool spend_unconfirmed = 12 [json_name = "spend_unconfirmed"]; } message OpenStatusUpdate { oneof update { @@ -1477,6 +1492,12 @@ message ChannelEdge { } message ChannelGraphRequest { + /** + Whether unannounced channels are included in the response or not. If set, + unannounced channels are included. Unannounced channels are both private + channels, and public channels that are not yet announced to the network. + */ + bool include_unannounced = 1 [json_name = "include_unannounced"]; } /// Returns a new instance of the directed channel graph. @@ -1727,14 +1748,19 @@ message ListInvoiceRequest { bool pending_only = 1 [json_name = "pending_only"]; /** - The offset in the time series to start at. As each response can only contain - 50k invoices, callers can use this to skip around within a packed time - series. + The index of an invoice that will be used as either the start or end of a + query to determine which invoices should be returned in the response. */ - uint32 index_offset = 4 [json_name = "index_offset"]; + uint64 index_offset = 4 [json_name = "index_offset"]; /// The max number of invoices to return in the response to this query. - uint32 num_max_invoices = 5 [json_name = "num_max_invoices"]; + uint64 num_max_invoices = 5 [json_name = "num_max_invoices"]; + + /** + If set, the invoices returned will result from seeking backwards from the + specified index offset. This can be used to paginate backwards. + */ + bool reversed = 6 [json_name = "reversed"]; } message ListInvoiceResponse { /** @@ -1744,10 +1770,16 @@ message ListInvoiceResponse { repeated Invoice invoices = 1 [json_name = "invoices"]; /** - The index of the last time in the set of returned invoices. Can be used to - seek further, pagination style. + The index of the last item in the set of returned invoices. This can be used + to seek further, pagination style. + */ + uint64 last_index_offset = 2 [json_name = "last_index_offset"]; + + /** + The index of the last item in the set of returned invoices. This can be used + to seek backwards, pagination style. */ - uint32 last_index_offset = 2 [json_name = "last_index_offset"]; + uint64 first_index_offset = 3 [json_name = "first_index_offset"]; } message InvoiceSubscription { @@ -1773,8 +1805,8 @@ message Payment { /// The payment hash string payment_hash = 1 [json_name = "payment_hash"]; - /// The value of the payment in satoshis - int64 value = 2 [json_name = "value"]; + /// Deprecated, use value_sat or value_msat. + int64 value = 2 [json_name = "value", deprecated = true]; /// The date of this payment int64 creation_date = 3 [json_name = "creation_date"]; @@ -1787,6 +1819,12 @@ message Payment { /// The payment preimage string payment_preimage = 6 [json_name = "payment_preimage"]; + + /// The value of the payment in satoshis + int64 value_sat = 7 [json_name = "value_sat"]; + + /// The value of the payment in milli-satoshis + int64 value_msat = 8 [json_name = "value_msat"]; } message ListPaymentsRequest { @@ -1803,6 +1841,14 @@ message DeleteAllPaymentsRequest { message DeleteAllPaymentsResponse { } +message AbandonChannelRequest { + ChannelPoint channel_point = 1; +} + +message AbandonChannelResponse { +} + + message DebugLevelRequest { bool show = 1; string level_spec = 2;