Commit Graph

226 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
6f2087023b
lnrpc: add REST endpoints for new SCB related calls 2019-04-02 20:46:33 -07:00
Olaoluwa Osuntokun
7ab8096d4a
lnrpc: add new VerifyChanBackup command 2019-03-28 17:54:01 -07:00
Olaoluwa Osuntokun
da3625fc02
lnrpc: add series of new methods for exporting, recovering, and subscribing to SBCs 2019-03-28 17:53:22 -07:00
Johan T. Halseth
f96dbd2377
lnrpc: add median_channel_size to NetworkInfo 2019-03-27 15:06:30 +01:00
John Griffith
acb8fd4796
lnrpc: add payment cltv limit 2019-03-19 10:36:54 +01:00
Johan T. Halseth
1e2af38f5a
lnrpc+rpcserver: define and implement EstimateFee RPC 2019-03-15 23:47:13 +01:00
Joost Jager
32f2b047e8
htlcswitch: hodl invoice
This commit modifies the invoice registry to handle invoices for which
the preimage is not known yet (hodl invoices). In that case, the
resolution channel passed in from links and resolvers is stored until we
either learn the preimage or want to cancel the htlc.
2019-03-15 10:09:17 +01:00
Joost Jager
6e10c05a82
lnrpc: deprecate QueryRoutes with more than one route
Now that QueryRoutes gained the ability to route from any source node
and takes in edge and node black lists, all pieces are in place to have
users implemented their own k-shortests path algorithm. Or any other algorithm
they might wish to use and currently can't.

This commit marks the num_routes field as deprecated as a preparation
for removing k-shortest for lnd.
2019-03-06 15:31:06 +01:00
Joost Jager
c62c9d64da
routing: add source parameter to query routes
This commit allows execution of QueryRoutes from any source node.
Previously this was restricted to only the self node.
2019-03-06 15:31:03 +01:00
Joost Jager
b09adc3219
lnrpc+routing: add edges and nodes restrictions to query routes
This commit allows the execution of QueryRoutes to be controlled using
lists of black-listed edges and nodes. Any path returned will not pass
through the edges and/or nodes on the list.
2019-03-06 15:30:57 +01:00
Olaoluwa Osuntokun
7703567b0b lnrpc: add new unused address types for NewAddressRequest
In this commit, we add two new address types to `NewAddressRequest`.
These address types will allow the caller to retrieve the last _unused_
address, rather than always rotating to the next address in the
keychain.
2019-03-05 15:34:56 -08:00
Olaoluwa Osuntokun
5d1eaaffa4
lnrpc: rename MaxHtlc to MaxHtlcMsat in lnrpc.RoutingPolicy
In this commit, we rename the new `MaxHtlc` field to `MaxHtlcMsat`. We
do this in order to adhere to the new practice to suffix each amount
related field with their proper unit.
2019-02-25 12:49:47 -03:00
Valentine Wallace
e62a8f3269 lnrpc: add max_htlc to RoutingPolicy 2019-02-21 18:39:32 -08:00
Otto Suess
99fab526b0
lnrpc: fix minor comment typo 2019-02-12 13:09:57 +01:00
Conner Fromknecht
34e36e9daa
lnrpc+rpcserver: rename ScriptPubkey to PkScript on Utxo msg 2019-02-11 13:02:25 -08:00
Conner Fromknecht
cb2723236f
lnrpc: correct tab indentation to 4 space 2019-02-11 13:01:49 -08:00
Joost Jager
7c30a8c493
routing: add outgoing channel restriction 2019-02-08 23:05:56 +01:00
Joost Jager
1b87fbfab2
invoices+htlcswitch+lnrpc: cancel invoice 2019-02-06 07:29:18 +01:00
Valentine Wallace
8b388b1301 lnrpc: add SubscribeChannels RPC & relevant messages to RPC protos. 2019-02-05 18:18:06 -08:00
Joost Jager
17645fefdf
lnrpc: deprecate multiple routes sendtoroute 2019-02-04 13:07:30 +01:00
Conner Fromknecht
c74dcbe6ff
lnrpc+rpcserver: replace ChanPoint w/ OutPoint in Utxo msg 2019-02-01 18:01:51 -08:00
Wilmer Paulino
e684efa5a7
lnrpc: update ListInvoices documentation
Currently, the documentation includes details for `lncli`. This commit
modifies it to reflect the behavior of the RPC interface instead, as it
should.
2019-01-22 18:23:39 -08:00
Olaoluwa Osuntokun
5d0a371a7d lnrpc: add Initiator field to ListChannels resposne 2019-01-15 16:51:00 -08:00
Olaoluwa Osuntokun
36ff16cce4
lnrpc: add new SendAll field to SendCoinsRequest 2019-01-09 15:55:25 -08:00
Joost Jager
649408003d
lnrpc: expose network name in GetInfo
Previously only a testnet boolean was available which
made it impossible to distinguish between regtest and
mainnet.
2019-01-08 00:17:14 +01:00
Joost Jager
d151916ae1
lnrpc: deprecate invoice receipt field 2019-01-07 22:05:52 +01:00
Joost Jager
1199f17cd9
lnrpc: report invoice state
Expose the new invoice state field over rpc.
2019-01-04 07:54:14 +01:00
Joost Jager
237f2b6d4b lnrpc: remove ConfirmationUpdate message from close status updates 2019-01-03 09:06:52 +01:00
Joost Jager
78aaf8639b
lnrpc: remove reference to GOPATH
As go modules allow us to build outside of the GOPATH, we shouldn't look for .proto imports there anymore.
2018-12-18 14:57:26 +01:00
Sev
bd8046ca5c lnrpc: add FeeMsat to ForwardingEvent 2018-12-17 20:13:02 -08:00
AdamISZ
9bb2a26948
Add listunspent RPC call
Returns a brief json summary of each utxo found by calling
ListUnspentWitness in the wallet. The two arguments are the
minimum and maximum number of conrfirmations (0=include
unconfirmed)
2018-12-11 15:26:38 +01:00
carla
b2adfca67e lnd: Add payment hash to SendResponse 2018-12-05 08:57:44 +02:00
Xavi Soler
ebc34a9785 rpc: add missing rest endpoints for SignMessage and VerifyMessage 2018-11-12 18:57:29 +01:00
Wilmer Paulino
3a314ba4a7
lnrpc: modify AbandonChannel REST endpoint
In this commit, we modify the AbandonChannel REST endpoint to avoid
conflicting with the CloseChannel's. Otherwise, if a debug build of lnd
is being used, there's no way of closing channels through the REST API
as it's been overwritten by AbandonChannel.
2018-11-08 16:16:31 -08:00
Xavi Soler
5fad3d1fbe rpcserver: show inactive channels in GetInfo 2018-11-05 09:10:32 +01:00
Joost Jager
28ae028535
lnrpc: accept pubkey in hop message
By passing a pubkey into SendToRoute, it becomes unnecessary for lnd to
query the channel graph to retrieve the hop pubkey. This allows routes
over private channels that are not present in the graph.
2018-11-01 08:59:53 +01:00
Wilmer Paulino
3ac2e8486e
rpc: prevent spending unconfirmed funds within OpenChannel by default
In this commit, we address a slight regression in the defaults provided
by the OpenChannel RPC with regards to spending unconfirmed outputs to
fund funding transactions. We now add a new boolean parameter to
OpenChannelRequest: SpendUnconfirmed. If set, we'll use this to
indicate to the server that the funding transaction of the channel to be
created can spend the wallet's unconfirmed outputs to fund it. This
addition is needed because otherwise, if the caller doesn't specify a
MinConfs parameter to the request, then a default of 0 will be used,
which is not ideal.
2018-10-18 16:49:24 -07:00
bluetegu
755f7ff372 Add IncludeUnannounced property to ChannelGraphRequest rpc. 2018-10-04 13:35:30 -04:00
Wilmer Paulino
bdcc847a44
rpc: remove NewWitnessAddress RPC
In this commit, we remove the unnecessary NewWitnessAddress RPC. We do
this as, at the moment, we only expose the wallet to generate witness
addresses. Now that the RPC has been removed, its REST endpoint has been
assigned to the NewAddress RPC, which should be the de facto way of
having the wallet generate any type of supported address.

Fixes #1986.
2018-09-28 02:52:09 -07:00
Olaoluwa Osuntokun
b341dea373
Merge pull request #1108 from sangaman/sever-server
multi: fix sever/server typos
2018-09-27 22:23:45 -07:00
Olaoluwa Osuntokun
6afee3d099
Merge pull request #1856 from maurycy/typos
multi: fix various typos in comments
2018-09-27 20:38:10 -07:00
Roei Erez
c5bebb3b32 add value_sat and value_msat to the outgoing payment response 2018-09-27 08:58:18 +03:00
Joost Jager
ab67b9a4de
rpcserver+lnrpc+lncli: add AbandonChannel rpc call
Using AbandonChannel, a channel can be abandoned. This means
removing all state without any on-chain or off-chain action.
A close summary is the only thing that is stored in the db after
abandoning.

A specific close type Abandoned is added. Abandoned channels
can be retrieved via the ClosedChannels RPC.
2018-09-18 12:20:27 -07:00
Wilmer Paulino
9c92d60149 lnrpc: update ListInvoices RPC with new pagination support 2018-09-13 15:54:35 -07:00
Wilmer Paulino
8e151ffd3f
lnrpc: add fields to paginate invoices backwards 2018-09-12 22:11:58 -07:00
Johan T. Halseth
90a9f5882a
lnrpc: add field amt_paid_msat to Invoice 2018-09-07 14:13:48 +02:00
maurycy
ac24b12bf2
multi: fix various typos in comments 2018-09-07 06:51:49 +02:00
Xavi Soler
2f1b024679 lnrpc: change lightning-api repo link redirect 2018-08-28 17:11:49 -07:00
Wilmer Paulino
1c7f10a467
lnrpc: add pagination fields for ListInvoices RPC protos
Co-authored-by: Andrey Savitskiy <taketa@users.noreply.github.com>
Co-authored-by: Valentine Wallace <valentine.m.wallace@gmail.com>
2018-08-21 18:00:08 -07:00
Wilmer Paulino
85729208fb
lnrpc: add MinConfs field to OpenChannelRequest proto 2018-08-16 20:19:27 -07:00
Daniel McNally
e207f9ad71
multi: fix sever/server typos
Fixed sever/server typos and regenerated rpc.pb.go
2018-07-16 09:00:45 -04:00
Wilmer Paulino
a4dc49adc4
lnrpc: add disabled field to routing policy proto message 2018-07-11 17:06:58 -07:00
Olaoluwa Osuntokun
00de6f11b1
lnrpc: the response to AddInvoice now contains the addIndex of new invoice 2018-07-06 12:22:02 -07:00
Olaoluwa Osuntokun
edbdcddea1
lnrpc: extend invoice subscriptions to allow callers to receive backlog notifications
In this commit, we extend the current SubscribeInvoice streaming RPC
call. We add two new values to the InvoiceSubscription message:
add_index and settle_index. These fields have also been added to the
current Invoice message. Each time a new invoice is added, the add index
will be incremented. Each time a new invoice is settled the settle index
will be incremented. The new field on the InvoiceSubscription message
allow callers to specify the last add index and the last settle index
they know of. With this new addition, callers will now be able to
reliably receive notifications for new received payments.

Care has been taken to ensure that these changes are backwards
compatible. If callers don't specify either of the new fields, then they
won't receive any notification backlog at all.

Fixes #862.
2018-07-06 12:21:55 -07:00
Joost Jager
52392d836c lnrpc: add ClosedChannels call 2018-06-13 08:48:33 +02:00
Wilmer Paulino
df6d75a054
lnrpc: use a protobuf oneof for the different types of fee limits 2018-06-12 18:14:46 -07:00
Sebastian Delgado
6746609ec6
Add constant and percentage-based fee limits to payments
- Extend SendRequest and QueryRoutesRequest protos
- newRoute function takes fee limit and cuts off routes that exceed it
- queryRoutes, payInvoice and sendPayment commands take the feeLimit inputs and pass them down to newRoute
- When no feeLimit is included, don't enforce any feeLimits at all (by setting feeLimit to maxValue)
2018-06-12 18:14:43 -07:00
Olaoluwa Osuntokun
9f183dc08f
lnrpc: switch REST endpoint for SendToRoute to /v1/channels/transactions/route 2018-06-06 20:45:53 -07:00
t4sk
d6ca581cbc lnrpc: add new final_cltv_delta param to QueryRoutes 2018-06-06 20:45:01 -07:00
t4sk
dac62e812c lnrpc: add SendToRoute command 2018-06-06 20:45:00 -07:00
Wilmer Paulino
e73b457e1f
lnrpc: add new ChangePassword RPC to WalletUnlocker 2018-05-31 17:23:56 -07:00
Conner Fromknecht
0ae62c3720
lnrpc: add RecoveryWindow to InitWalletRequest 2018-04-26 16:03:27 -07:00
Johan T. Halseth
8b670d783a
lnrpc: add WaitingCloseChannel to PendingChannelResponse 2018-04-25 09:37:25 +02:00
Wilmer Paulino
1713394eb3
lnrpc: add private field to addinvoice request
In this commit, we add a `private` field to the `AddInvoice` RPC's
request to denote whether the invoice being created should include
routing hints for private channels to assist the payer in reaching the
destination.
2018-04-20 04:01:37 -04:00
Wilmer Paulino
6394c2fbb5
lnrpc: add route hints proto field to invoices 2018-04-20 04:01:35 -04:00
t4sk
31feeca51a lnrpc: extend Route to include millisatoshis 2018-04-19 09:15:21 +08:00
practicalswift
663c396235 multi: fix a-vs-an typos 2018-04-17 19:02:04 -07:00
mecampbellsoup
bd398540c1 Add version field to GetInfo RPC endpoint
This is inspired by the Bitcoin RPC `getnetworkinfo` endpoint which also
includes version information:
https://bitcoin.org/en/developer-reference#getnetworkinfo
2018-04-10 09:27:44 -04:00
Vadym Popov
66224e6bf8
lnrpc: add new pending_open_balance param to ChannelBalanceResponse
Changes in gRPC `channelbalance` service response message
of adding `pending_open_balance` parameter with sum of
channels open pending balances denominated in satoshis
2018-04-01 02:38:04 +03:00
Johan T. Halseth
00ed95b414
lnrpc: add remote_csv_delay to OpenChannelRequest 2018-03-22 14:53:41 +01:00
Olaoluwa Osuntokun
6d07b865d6
Merge pull request #847 from stevenroose/typo-funding
rpc: Fix typo in OpenChannelRequest
2018-03-20 15:55:30 -07:00
Steven Roose
9516d8da52 rpc: Fix typo in OpenChannelRequest 2018-03-19 19:11:47 +01:00
Wilmer Paulino
95997b9c6c
lnrpc: add flags to specify retrieving different channels 2018-03-19 11:19:02 -04:00
Olaoluwa Osuntokun
97b7eb226d
lnrpc: update photo comments to fix api.lightning.community tool 2018-03-08 17:06:34 -08:00
Olaoluwa Osuntokun
525cca02e2
lnrpc: remove the PUBKEY_HASH adds type, WalletBalance is segwit by default 2018-03-06 16:04:04 -05:00
Olaoluwa Osuntokun
36f214f48c
lnrpc: add ForwardingHistory for querying payment circuit time series
In this commit, we add a new method to the RPC service:
ForwardingHistory. This method will allow callers to query for the
completed payment circuits in a particular time slice, skip a series of
events, and also paginate within a time slice.
2018-03-06 13:56:12 -05:00
Olaoluwa Osuntokun
ff720e1252
lnrpc: extend the FeeReportResponse to include fee revenue sums 2018-03-06 13:56:11 -05:00
Olaoluwa Osuntokun
7f953bf0b9
lnrpc: revamp the WalletUnlocker service to have a two-stage init
In this commit, we revamp the WalletUnlocker service to now have a
two-stage init process.

The first (optional) is for the user instantiating a new lnd instance to
call the GenSeed method with an optional aezeed passphrase. The response
to this will be a freshly generated aezeed mnemonic along with the
original enciphered seed.

The second step will be the actual wallet initaliztion. By separating
this step from seed generation, UI's will be able to ensure that the
user has written down the seed, before proceeding and committing the
seed to the internal wallet. The new method InitWallet accepts a wallet
passphrase, the aezeed mnemonic, and the optional passphrase.
2018-03-05 11:07:01 -05:00
Jason Dufair
84551c616f lnwallet/lnrpc: Expose sync status to gRPC interface
This commit adds wallet_best_block_timestamp to the gRPC interface.
This is done in order to allow clients to calculate progress while
lnd syncs to the blockchain. wallet_best_block_timestamp is exposed
via the GetInfo() rpc call. Additionally, IsSynced() returns the
WalletBestBlockTimestamp as the second value in the tuple
that is returned, providing additional detail when querying about the
status of the sync. The BtcWallet interface has also been updated
accordingly.

This commit was created to support the issue to
[Add progress bar for chain sync] (lightninglabs/lightning-app#10) in
lightning-app
2018-02-20 19:00:06 -08:00
MeshCollider
4ed5ba0d26 multi: Remove peer_id from RPC commands 2018-02-19 17:48:39 -08:00
Olaoluwa Osuntokun
eddca9bf92
lnrpc: add new num_routes param to QueryRoutes 2018-02-12 16:28:45 -08:00
practicalswift
a93736d21e multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00
Wilmer Paulino
1fefae780f
lnrpc: use funding_txid_str as the main endpoint for CloseChannel 2018-01-27 22:00:31 -05:00
Wilmer Paulino
2cfd705a06
lnrpc: add oneof funding txid to ChannelPoint
This commit allows us to get/set the funding txid of a ChannelPoint
either as raw bytes or a string.
2018-01-27 21:59:54 -05:00
Andrew Naoum
0f161c5033 channeldb+lnrpc: store the payment pre-image not rhash
Fixes #481.

Prior to this commit, payments stored in the channel DB only kept a
record of the payment hash. This is a problem as the preimage is what
serves as proof of payment and a user should be able to look up this
value in the future (not just immediately after payment).

Instead of storing both the payment hash and the preimage, we store the
preimage only since the hash can be derrived from this using a SHA256.

In the RPC listpayments command, we now give the preimage in addition to
the payment hash.
2018-01-27 18:36:33 -08:00
Johan T. Halseth
08ae9fe510 lnrpc: change REST post path of PolicyUpdate from /fees to /chanpolicy 2018-01-27 14:48:28 -08:00
Wilmer Paulino
8ed52dcf64
lnrpc: avoid lookupinvoice endpoint collision
This commit changes the listinvoices and lookupinvoice endpoints to
avoid collisions when making requests.

We can still retrieve a list of pending invoices with `listinvoices` by
appending the parameter `pending_only=true` to the request URL.
2018-01-26 01:08:12 -05:00
Olaoluwa Osuntokun
5b4b6f9c0e
lnrpc: add final_cltv_delta as a SendRequest parameter 2018-01-22 19:19:41 -08:00
Johan T. Halseth
e27f524309
lnrpc: add min_htlc_msat to OpenChanneRequest 2018-01-12 22:56:35 +01:00
Johan T. Halseth
551326586c
lnrpc: rename UpdateFee -> UpdateChannelPolicy
This commit renames the UpdateFee RPC call together
with associated types to UpdateChannelPolicy. In addition
to fees, now also timelock delta can be specified using
this call.
2018-01-12 22:56:33 +01:00
Olaoluwa Osuntokun
6f408004e2
lnrpc+rpc: remove SetAlias method
In this commit we remove the SetAlias method as it’s being removed in
favor of instead using a static configuration parameter.
2018-01-10 15:16:46 -08:00
Olaoluwa Osuntokun
fa6354b223
lnrpc: remove blocks_till_open field from PendingChannelsResponse
In this commit, we remove the blocks_till_open from
PendingChannelsResponse as in its current state, the values that are
assigned to this field don’t accurately reflect the naming. This has
caused a good bit of confusion amongst users lately. As a result, we’re
temporarily removing this field until we have proper incremental
notifications within the chain notifier.
2018-01-08 19:50:17 -08:00
Wilmer Paulino
a61b6428e8
lnrpc: add protof definitions for uris to getinfo 2018-01-07 00:50:30 -05:00
Olaoluwa Osuntokun
7421584341
lnrpc: making PendingChannels req/resp naming scheme consistent
In this commit we rename the lnrpc.PendingChannelRequest and
lnrpc.PendingChannelResponse to
lnrpc.PendingChannelsRequest/lnrpc.PendingChannelsResponse. We do this
as we strive to ensure that the naming scheme across the RPC interface
is consistent.
2018-01-04 14:20:31 -06:00
Johan T. Halseth
464f57d3a5 lnrpc: update godoc for 'private' flag 2017-12-17 18:35:34 -08:00
nsa
17c98473d9 lnrpc: add --private arg to OpenChanRequest 2017-12-17 18:35:34 -08:00
Micah Lerner
9e4da6566a proto: Add destination addresses to lnrpc definitions 2017-12-08 15:11:23 -08:00
Olaoluwa Osuntokun
0ebf55a9f6 lnrpc: add local CSV value ListChannels response 2017-12-05 17:45:58 -08:00
Nalin Bhardwaj
a234e01c07
lnrpc+proto: Modify WalletBalance to include detailed balance info 2017-12-04 05:34:39 +05:30
Olaoluwa Osuntokun
81283e8b5a
lnrpc: make BlocksTillOpen an int32 2017-12-02 18:36:15 -08:00