Commit Graph

143 Commits

Author SHA1 Message Date
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