Commit Graph

505 Commits

Author SHA1 Message Date
Johan T. Halseth
6794708ed5
lnrpc: expose PaymentStatus for ListPayments
Also make it optional to list non-succeeded payments.
2019-06-12 08:51:51 +02:00
Wilmer Paulino
a4675063b7
lnrpc/walletrpc: expose bumping fee of inputs/transactions over RPC
This RPC exposes the recently added BumpFee functionality to the
UtxoSweeper in order to allow users of the RPC to manually bump fees of
low fee inputs/transactions.
2019-06-11 15:06:40 -07:00
Olaoluwa Osuntokun
0db0c5be93
lnrpc: add RawTxHex field to Transaction message 2019-06-07 07:37:35 -07:00
Wilmer Paulino
d01f88ecdc
lnrpc/walletrpc: expose pending input sweeps within UtxoSweeper over RPC 2019-06-05 12:10:33 -07:00
Joost Jager
f03533c67a
routerrpc: convert sendpayment to async
Modify the routerrpc SendPayment api to asynchronous. This allows
callers to pick up a payment after the rpc connection was lost or lnd
was restarted.
2019-06-05 12:41:53 +02:00
Joost Jager
eb700d35e1
routerrpc: extend payment request parameters
Add missing parameters to routerrpc version of SendPayment.
2019-06-05 12:41:45 +02:00
Joost Jager
19d5f8f82c
routing: move default cltv assignment out of router
This commit lifts default setting up to the rpc server level, in line
with other payment defaults.
2019-06-05 12:41:43 +02:00
Joost Jager
054e42f680
routing+routerrpc: expose mission control parameters in lnd config
This commit exposes the three main parameters that influence mission
control and path finding to the user as command line or config file
flags. It allows for fine-tuning for optimal results.
2019-06-04 13:22:50 +02:00
Joost Jager
f7982f0f4c
routing+routerrpc: expose mission control state over rpc
This commit exposes mission control state for rpc for development
purposes.
2019-06-04 10:00:27 +02:00
Joost Jager
7133f37bb8
routing: global probability based mission control
Previously every payment had its own local mission control state which
was in effect only for that payment. In this commit most of the local
state is removed and payments all tap into the global mission control
probability estimator.

Furthermore the decay time of pruned edges and nodes is extended, so
that observations about the network can better benefit future payment
processes.

Last, the probability function is transformed from a binary output to a
gradual curve, allowing for a better trade off between candidate routes.
2019-06-04 10:00:25 +02:00
Joost Jager
6b70791c2d
routing: use probability source in path finding
This PR replaces the previously used edge and node ignore lists in path
finding by a probability based system. It modifies path finding so that
it not only compares routes on fee and time lock, but also takes route
success probability into account.

Allowing routes to be compared based on success probability is achieved
by introducing a 'virtual' cost of a payment attempt and using that to
translate probability into another cost factor.
2019-06-04 10:00:21 +02:00
Joost Jager
68f2a04f42
routerrpc: expose mission control reset rpc 2019-06-04 10:00:17 +02:00
Olaoluwa Osuntokun
4068e78af6
Merge pull request #2717 from cfromknecht/send-payment-payreq
lnrpc+rpcserver: display payreq via listpayments
2019-05-31 17:09:04 -07:00
Joost Jager
1b5655f7fa
Merge pull request #3113 from joostjager/sendtoroute-error-fix
routing: return structured error for send to route
2019-05-30 23:20:14 +02:00
Conner Fromknecht
db8d63801f
lnrpc: expose payreq in list payments 2019-05-29 16:30:51 -07:00
Joost Jager
1fc01370bf
routerrpc: marshall missing channel update data 2019-05-29 14:07:03 +02:00
Joost Jager
cc88bfb560
routerrpc: proto comments updated 2019-05-29 14:07:01 +02:00
Johan T. Halseth
1df148d8ef
routerrpc test: run make fmt 2019-05-27 12:33:43 +02:00
chokoboko
51dc422721 rpcserver: add channels to GetNodeInfo response 2019-05-23 16:03:39 +03:00
Xavi Soler
ee2e49141e
lnrpc: add color to GetInfoResponse and NodeUpdate 2019-05-23 10:51:59 +02:00
Joost Jager
9a4c0d5699
lnrpc: upgrade to protobuf v1.3.1
This commit upgrades the protobuf version. Compared to the previous
v1.2.0 it generates smaller diffs in generated code. This change was
introduced in:

fffb0f7828
2019-05-20 15:35:14 +02:00
Johan T. Halseth
777f1b7b23
Merge pull request #3076 from sangaman/proto-typos
lnrpc: fix typos
2019-05-20 15:00:55 +02:00
Johan T. Halseth
15bed506b1
routing/route+multi: remove redundant TotalFees field
Instead get it on demand using method TotalFees().
2019-05-16 23:58:32 +02:00
Daniel McNally
7c513f23af
lnrpc: fix typos
This fixes typos in the comments of the rpc proto definition.
2019-05-15 14:49:11 -04:00
Joost Jager
863bf2f91b
Merge pull request #1662 from joostjager/raw
lnrpc: better payment failure reporting
2019-05-15 14:38:52 +02:00
Joost Jager
c97592692c
routerrpc: add SendToRoute with structured failure message 2019-05-15 11:54:46 +02:00
Joost Jager
b2eb2619bf
routerrpc: connect UnmarshallRoute to existing config fields 2019-05-15 11:54:46 +02:00
Joost Jager
ba3fa94268
lnrpc+routing: Only accept a single route for SendToRoute 2019-05-15 11:54:46 +02:00
Johan T. Halseth
c706b9549a
Merge pull request #3019 from sangaman/subscribe-single-invoice-rhashstr
invoicesrpc: SubscribeSingleInvoice check RHashStr
2019-05-14 14:28:31 +02:00
Joost Jager
0b66d56aab
routerrpc: move UnmarshallRoute to sub server 2019-05-13 12:55:56 +02:00
Daniel McNally
c9afa6469f
invoicesrpc: SubcribeSingleInvoiceRequest fix
This fixes a bug where the RHashStr field on the PaymentHash request for
SubscribeSingleInvoice was being ignored. This replaces the PaymentHash
message for the SubscribeSingleInvoice request with a new message called
SubscribeSingleInvoiceRequest that contains only the RHash field.
2019-05-10 22:02:58 -04:00
Joost Jager
7a5bd29a69
lnrpc+routing: remove k shortest path finding 2019-05-07 19:54:06 +02:00
Conner Fromknecht
17b2140cb5
multi: fix spelling mistakes 2019-05-04 15:35:37 -07:00
Johan T. Halseth
ee257fd0eb
multi: move Route to sub-pkg routing/route 2019-04-29 14:52:33 +02:00
Olaoluwa Osuntokun
46aa8503b2
Merge pull request #2892 from wpaulino/verify-chan-backup
rpc: modify VerifyChanBackup to take either a Single or Multi
2019-04-05 14:31:37 -07:00
Wilmer Paulino
b71bb9400a
rpc: modify VerifyChanBackup to take either a Single or Multi 2019-04-05 12:51:16 -07:00
Johan T. Halseth
f1677e7199
lnrpc/routerrpc: make fmt on router backend test 2019-04-05 17:25:49 +02:00
Wilmer Paulino
ca01695330
rpc: expose peer's GossipSyncer sync type 2019-04-03 15:44:47 -07:00
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
Conner Fromknecht
e3c65e1a49
Merge pull request #2845 from joostjager/routerrpc-log
routerrpc: register router sub server logger
2019-03-27 21:04:32 -07:00
Johan T. Halseth
f96dbd2377
lnrpc: add median_channel_size to NetworkInfo 2019-03-27 15:06:30 +01:00
Joost Jager
6b6dd30aa7
routerrpc: register router sub server logger 2019-03-27 11:44:49 +01:00
Johan T. Halseth
4d8100cc9a
Merge pull request #2640 from joostjager/cltv-limit
routing: add cltv limit
2019-03-27 10:05:02 +01:00
Olaoluwa Osuntokun
6440f39120
Merge pull request #2794 from halseth/autopilot-query-heuristic-no-active-agent
autopilot: move queryHeuristic out of agent
2019-03-21 20:20:51 -07:00
Joost Jager
087de7cc4d
routerrpc: adapt to changed interfaces of routing subsystem 2019-03-21 10:25:55 +01:00
John Griffith
acb8fd4796
lnrpc: add payment cltv limit 2019-03-19 10:36:54 +01:00
Johan T. Halseth
d4813422c9
autopilot+autopilotrpc: ignore local channels if ignore_local_state set 2019-03-18 14:43:40 +01:00
Johan T. Halseth
c7ab6f3603
lnrpc/autopilotrpc: add ignore_local_state flag 2019-03-18 14:42:58 +01:00
Johan T. Halseth
1e2af38f5a
lnrpc+rpcserver: define and implement EstimateFee RPC 2019-03-15 23:47:13 +01:00
Joost Jager
f450929b65
invoicesrpc: add SettleInvoice 2019-03-15 10:09:23 +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
fcdc8f0e83
lnrpc/invoices: add hold invoice rpc 2019-03-15 10:08:58 +01:00
Joost Jager
19f79613df
channeldb: store hold invoice 2019-03-15 10:08:55 +01:00
Joost Jager
8392f6d28f
lnrpc/invoicesrpc: remove lnrpc type from add invoice 2019-03-15 10:08:52 +01:00
Joost Jager
b9cc165341
lnrpc: move add invoice logic to subserver 2019-03-15 10:08:49 +01:00
Joost Jager
c4263e7061
lntypes: return a value from constructors
Returning pointers proved inconvenient in almost all cases. This commmit
converts the constructors to returning values.
2019-03-15 10:08:38 +01:00
Joost Jager
2be1051fb6
zpay32: move HopHint and DefaultFinalCLTVDelta 2019-03-15 10:08:32 +01:00
Olaoluwa Osuntokun
a24eeb9135
lnrpc/routerrpc: style fix ups 2019-03-12 21:20:21 -07:00
Joost Jager
293971cd03
routerrpc: move query routes into sub server
This commit moves the query routes backend logic from the main
rpc server into the sub server. It is another step towards splitting up
the main rpc server code.

In addition to this, a unit test is added to verify rpc parameter
parsing.
2019-03-11 09:56:16 +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
Johan T. Halseth
f00a643ef8
Merge pull request #2634 from halseth/ottosuess-comment_typo_fix
lnrpc: fix minor comment typo
2019-02-21 16:20:33 +01:00
Olaoluwa Osuntokun
cfd6a0d860
lnrpc/routerrpc: add config, implement full RouterServer
In this commit, we implement the full RouterServer as specified by the
newly added sub-service as defined in router.proto. This new sub-server
has its own macaroon state (but overlapping permissions which can be
combined with the current admin.macaroon), and gives users a simplified
interface for a gRPC service that is able to simply send payment. Much
of the error reporting atm, is a place holder, and a follow up commit
will put up the infrastructure for a proper set of errors.
2019-02-20 16:10:39 -08:00
Olaoluwa Osuntokun
38769fb388 lnrpc/routerrpc: add protos for new Router sub-server 2019-02-20 16:10:24 -08:00
Johan T. Halseth
5dabb1ae29
autopilot+lnrpc: wire up SetNodeScores RPC to set scores of agent 2019-02-14 11:41:47 +01:00
Johan T. Halseth
83edcb7153
lnrpc: add API SetScores
Used to set the external scores for the running autopilot agent.
2019-02-14 11:41:47 +01: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
Olaoluwa Osuntokun
e5d660daf9
Merge pull request #2521 from joostjager/sendtosingleroute
lnrpc: deprecate SendToRoute with more than one route
2019-02-05 18:06:01 -08:00
Olaoluwa Osuntokun
a98d5deeb8
Merge pull request #2580 from halseth/autopilotrpc-imports-cleanup
[trivial] cleanup subserver imports
2019-02-04 12:46:53 -08:00
Joost Jager
17645fefdf
lnrpc: deprecate multiple routes sendtoroute 2019-02-04 13:07:30 +01:00
Johan T. Halseth
3daaa8cf74
lndrpc/invoicesrpc+walletrpc: clean up imports 2019-02-02 15:48:22 +01:00
Johan T. Halseth
7dab8b8f2d
lnrpc/autopilotrpc: remove unused "os" import
This would cause the build to fail since the import is not used. It was
not detected since the file is under a build flag.
2019-02-02 15:48:15 +01:00
Conner Fromknecht
c74dcbe6ff
lnrpc+rpcserver: replace ChanPoint w/ OutPoint in Utxo msg 2019-02-01 18:01:51 -08:00
Conner Fromknecht
ddfcba46e7
lnrpc/gen_protos: add missing space before escaped newline 2019-02-01 18:01:44 -08:00
Joost Jager
8996a1490d
lnrpc: reuse common FileExists function 2019-02-01 09:47:31 +01:00
Joost Jager
70c874be88
invoicesrpc: add SubscribeSingleInvoice rpc 2019-02-01 09:43:17 +01:00
Joost Jager
4c4536a488
lnrpc: move invoice marshall code to package
As a preparation for reusing the marshall code in the invoices sub
server.
2019-02-01 09:43:10 +01:00
Joost Jager
2a4c93cdc4
lnrpc: add search path to gen_protos.sh
Without this addition, sub servers cannot import google annotations
in their proto files.
2019-02-01 09:42:48 +01:00
Joost Jager
3545685177
invoicesrpc: create sub server
Sub server implementation is still empty. This is a preparatory
step for adding invoice functionality.
2019-02-01 09:42:35 +01:00
Olaoluwa Osuntokun
8b04cfbf12
Merge pull request #2531 from wpaulino/update-listinvoices-docs
lnrpc: update ListInvoices documentation
2019-01-31 17:26:06 -08:00
Joost Jager
9e012ecc93
multi: move Input interface and related code
This commit is a step to split the lnwallet package. It puts the Input
interface and implementations in a separate package along with all their
dependencies from lnwallet.
2019-01-31 13:25:33 +01:00
Alex Bosworth
d432ee6f13
trivial: typo fix
Correct log name of WalletKit
2019-01-26 16:57:09 -08:00
Johan T. Halseth
8874be764e
lnrpc/autopilotrpc: implement QueryScores RPC 2019-01-23 09:05:43 +01:00
Johan T. Halseth
a654be5884
lnrpc/autopilotrpc: add QueryScores API
Adds a new lnrpc API that lets the caller get ("dry run") the scores
that would be given to a set of node by the available autopilot
heuristics.
2019-01-23 09:05:43 +01: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
Wilmer Paulino
3d91aa2312
lnrpc/chainrpc: add ChainNotifier subserver registration driver 2019-01-21 14:01:22 -08:00
Wilmer Paulino
1f8eef2833
lnrpc/chainrpc: add ChainNotifier subserver implementation 2019-01-21 14:01:22 -08:00
Wilmer Paulino
5e98af8c99
lnrpc/chainrpc: add ChainNotifier subserver Config 2019-01-21 14:01:22 -08:00
Wilmer Paulino
d06f6c14f5
lnrpc/chainrpc: add ChainNotifier subserver protos 2019-01-21 14:01:20 -08:00
Wilmer Paulino
3420d6d917
lnrpc/signrpc/signer_server: fix incorrect lnwallet.InputScript field 2019-01-15 19:27:28 -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
Joost Jager
9e611636ee
lnrpc: update github.com/golang/protobuf to v1.2.0
Update is necessary to get protoc to generate files in the right
directory when using modules outside the gopath. The old version of this
dependency did not support paths=source_relative.

This commit also fixes a build error in lnd_test.go because of a
slight difference in generated code.
2018-12-18 14:57:24 +01:00
Joost Jager
6ca52c4ec7
lnrpc/walletrpc: remove unused gen_proto.sh script 2018-12-18 14:56:52 +01:00
Sev
bd8046ca5c lnrpc: add FeeMsat to ForwardingEvent 2018-12-17 20:13:02 -08:00
Johan T. Halseth
28a92185cc
lnrpc: add autopilotrpc driver 2018-12-13 12:33:44 +01:00
Johan T. Halseth
568c32d1fa
lnrpc/autopilotrpc: add lnrpc autopilot server 2018-12-13 12:33:44 +01:00
Johan T. Halseth
00376230ff
lnrpc+log: add autopilot rpc logger 2018-12-13 12:33:44 +01:00
Johan T. Halseth
413aad5efa
lnrpc+subserver_cfg: add configs for autopilot sub-server 2018-12-13 12:33:44 +01:00
Johan T. Halseth
db4bbe1c3a
lnrpc: add autopilotrpc subservice
This commit adds a new service lnrpc/autopilot, that is to be used to
communicate with the running autopilot. Currently a RPC for getting the
status of the agent is included, as well as enabling/disabling at
runtime.
2018-12-13 12:33:38 +01: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
Johan T. Halseth
71444e74ac
Merge pull request #2033 from gitlikeagirl/ckc-hashinsendresponse
lnrpc: Add payment hash to SendResponse
2018-12-11 09:54:52 +01:00
Olaoluwa Osuntokun
179ce8371e
Merge pull request #2299 from Bluetegu/make-make-rpc-great-again
lnrpc: update protobuf generation installation instructions.
2018-12-10 16:02:35 -08:00
Olaoluwa Osuntokun
4d647b6e5d
lnrpc/signrpc: add macaroon perms for ComputeInputScript 2018-12-09 15:10:35 -08:00
bluetegu
69bba99158 lnrpc: update protobuf generation installation instructions. 2018-12-09 10:40:34 -05:00
Olaoluwa Osuntokun
273dee607b
lnrpc: remove oneof from signrpc.KeyDescriptor 2018-12-06 16:25:38 -08:00
Olaoluwa Osuntokun
406fd2a37e
lnrpc/walletrpc: implement the WalletKitServer gRPC service
In this commit, we implement the newly defiend WalletKitServer gRPC
service. We use the same template w.r.t build tags as the existing
signrpc service.
2018-12-06 16:25:34 -08:00
Olaoluwa Osuntokun
097b6f7f6d lnrpc/walletrpc: add new sub-RPC server, the WalletKit
In this commit, we add a new sub-RPC server to the existing set of gRPC
servers. This new sub-RPC server is the WalletKit. It's a utility
toolkit that contains method which allow clients to perform common
interactions with a wallet such as getting a new address, or sending a
transaction. It also includes some supplementary actions such as fee
estimation.

One thing to note in the RPC file is that we _import_ the existing
signer.proto file in order to get at some existing proto definitions
which are useful in our use case.
2018-12-06 16:24:54 -08:00
carla
b2adfca67e lnd: Add payment hash to SendResponse 2018-12-05 08:57:44 +02:00
Olaoluwa Osuntokun
127bc71546
Merge pull request #2148 from xsb/rest-endpoints
Add missing REST endpoints for SignMessage and VerifyMessage
2018-12-03 20:14:09 -08:00
Olaoluwa Osuntokun
b0a7a57f57
lnrpc/signrpc: add ComputeInputScript implementation 2018-11-28 20:57:13 -08:00
Olaoluwa Osuntokun
6c201e435a
lnrpc/signrpc: add ComputeInputScript to the Signer sub-server
In this commit, we add the ComputeInputScript which will allow callers
to obtain witnesses for all outputs under control of the wallet. This
allows external scripting of things like coin join, etc.
2018-11-28 20:57:11 -08:00
Olaoluwa Osuntokun
35b4b35eae
lnrpc: add new recursive proto generation script
In this commit, we add a recursive proto generation script. This avoids
having to add a new script for each upcoming sub-server.
2018-11-28 20:57:08 -08:00
Olaoluwa Osuntokun
4002caec69
config+rpc: create new generalized dynamic sub rpc server config framework
In this commit, we add the glue infrastructure to make the sub RPC
server system work properly. Our high level goal is the following: using
only the lnrpc package (with no visibility into the sub RPC servers),
the RPC server is able to find, create, run, and manage the entire set
of present and future sub RPC servers. In order to achieve this, we use
the reflect package and build tags heavily to permit a loosely coupled
configuration parsing system for the sub RPC servers.

We start with a new `subRpcServerConfigs` struct which is _always_
present.  This struct has its own group, and will house a series of
sub-configs, one for each sub RPC server. Each sub-config is actually
gated behind a build flag, and can be used to allow users on the command
line or in the config to specify arguments related to the sub-server. If
the config isn't present, then we don't attempt to parse it at all, if
it is, then that means the RPC server has been registered, and we should
parse the contents of its config.

The `subRpcServerConfigs` struct has two main methods:
`PopulateDependancies` and `FetchConfig`. The `PopulateDependancies` is
used to dynamically locate and set the config fields for each new
sub-server. As the config may not actually have any fields (if the build
flag is off), we use the reflect pacakge to determine if things are
compiled in or not, then if so, we dynamically set each of the config
parameters. The `PopulateDependancies` method implements the
`lnrpc.SubServerConfigDispatcher` interface. Our goal is to allow sub
servers to look up their actual config in this main config struct. We
achieve this by using reflect to look up the target field _as if it were
a key in a map_. If the field is found, then we check if it has any
actual attributes (it won't if the build flag is off), if it is, then we
return it as we expect it to be populated already.
2018-11-28 20:57:05 -08:00
Olaoluwa Osuntokun
8971931aa3
lnrpc/signrpc: add lnrpc.SubServerDriver for signrpc
In this commit, we create a lnrpc.SubServerDriver for signrpc. Note that
this file will only have its init() method executed if the proper build
flag is on. As a result, only if the build flag is set, will the RPC
server be registered, and visible at the packge lnrpc level for the root
server to manipulate.
2018-11-28 20:57:03 -08:00
Olaoluwa Osuntokun
b7757683b2
lnrpc/signrpc: implement new SignerServer sub RPC server
In this commit, we add a full implementation of the new SignerServer sub
RPC service within the main root RPC service. This service is able to
fully manage its macaroons, and service any connected clients. Atm, this
service only has a single method: SignOutputRaw which mimics the
existing lnwallet.Signer interface within lnd itself. As the API's are
so similar, it will be possible for a client to directly use the
lnwallet.Signer interface, and have a proxy that sends the request over
RPC, and translates the proto layer on both sides. To the client, it
doesn't know that it's using a remote, or local RPC.
2018-11-28 20:57:01 -08:00
Olaoluwa Osuntokun
184f160fb9
lnrpc: add new sub RPC server registration system
In this commit, we add the scafolding for the future sub-server RPC
system. The idea is that each sub server will implement this particular
interface. From there on, a "root" RPC server is able to query this
registry, and dynamically create each  sub-sever instance without
knowing the details of each sub-server.

In the init() method of the pacakge of a sub-server, the sub-server is
to call: RegisterSubServer to claim its namespace. Afterwards, the root
RPC server can use the RegisteredSubServers() method to obtain a slice
of ALL regsitered sub-servers. Once this list is obtained, it can use
the New() method of the SubServerDriver struct to create a new
sub-server instance.

Each sub-server needs to be able to locate it's primary config using the
SubServerConfigDispatcher interface. This can be a map of maps, or a
regular config structr. The main requirement is that the sub-server be
able to find a config under the same name that it registered with. This
string of abstractions will allow the main RPC server to find, create,
and run each sub-server without knowing the details of its configuration
or its role.
2018-11-28 20:57:00 -08:00
Olaoluwa Osuntokun
9f24049bbc
lnrpc/signrpc: add new gen_protos.sh to generate minimal protos
In this commit, we add a new proto generation script to match the one in
the main lnrpc package. This script differs, as we don't need to
generate the REST proxy stuff (for now).
2018-11-28 20:56:59 -08:00
Olaoluwa Osuntokun
bbbdd7f6e9
lnrpc/signrpc: add and generate new set of protos for Signer service 2018-11-28 20:56:58 -08:00
Olaoluwa Osuntokun
a432f9a4c8 lnrpc/signrpc: create new signrpc package with build-flag guarded config
In this commit, we introduce a new sub-package within the greater RPC
package.  This new sub-package will house a new set of sub-RPC servers
to expose experimental features behind build flags for upstream
consumers. In this commit, we add the first config for the service,
which will simply expose the lnwallet.Signer interface over RPC.

In the default file, we have what the config will be if the build tag
(signerrpc) is off. In this case, the config parser won't detect any
times, and if specified will error out. In the active file, we have the
true config that the server will use. With this new set up, we'll
exploit these build flags heavily in order to create a generalized
framework for adding additional sub RPC servers.
2018-11-28 20:56:38 -08: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
Olaoluwa Osuntokun
4c0ca37174
Merge pull request #1389 from Bluetegu/noprivate-describegraph-1037
Add --noprivate flag to describegraph rpc to filter out private channels
2018-10-16 20:01:35 -07:00
Olaoluwa Osuntokun
db62508038
lnrpc: re-compile protos after updating to latest version of gRPC 2018-10-16 17:12:16 -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
915c4201b9 multi: remove internal peer_id usage 2018-02-19 17:48:39 -08:00
MeshCollider
4ed5ba0d26 multi: Remove peer_id from RPC commands 2018-02-19 17:48:39 -08:00
practicalswift
b8e1351cf3 multi: fix some recently introduced typos 2018-02-18 15:27:29 -08:00
Olaoluwa Osuntokun
eddca9bf92
lnrpc: add new num_routes param to QueryRoutes 2018-02-12 16:28:45 -08:00
Daniel McNally
8543497dcc multi: fixing it's/its typos in comments 2018-02-06 19:13:07 -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
Olaoluwa Osuntokun
859ecbd300
Merge pull request #569 from wilmerpaulino/protobuf-docs
docs: clarify how to generate protobuf definitions
2018-01-27 18:43:12 -08: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
Oliver Gugger
fc18db0130 rpc: update README according to current rpc.proto file 2018-01-27 18:35:48 -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
Timo Schmid
9ab2ab0424
rpc: remove SetAlias from the rpc docs 2018-01-13 21:29:15 +01: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
e2af9a6897
docs: clarify how to generate protobuf definitions 2018-01-07 01:54:28 -05: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
Olaoluwa Osuntokun
7caf3ceb49
lnrpc: add new color field to LightningNode 2017-12-02 18:35:55 -08:00
Olaoluwa Osuntokun
385023f0b7
cmd/lncli: add new --target_conf and --sat_per_byte args for relevant commands
In this commit, we expose the new fee control features to the relevant
commands on the command line. This will allow users to have a greater
degree of control of the fees they pay when: sending coins on chain,
opening a channel, or closing a channel.
2017-11-23 23:10:14 -06:00
Olaoluwa Osuntokun
9b1f21e283
lnrpc: now able to set confirmation target or fee to relevant RPC's
In this commit, we modify the OpenChannel, CloseChannel, SendCoins, and
SendMany RPC’s to be able to allow users to manually specify their
fees. Users can either specify a target number of confirmations, or a
target value for manual sat/byte.
2017-11-23 23:09:56 -06:00
Conner Fromknecht
1f34f117ff
lnrpc: adds PendingHTLCs to ForceClosedChannels 2017-11-15 18:04:44 -08:00
Olaoluwa Osuntokun
de7e339281
lnrpc: add cltv_expiry to Invoice and PayReq protos 2017-10-22 18:36:53 -07:00
Johan T. Halseth
1f34bd815d lnrpc: add WalletUnlocker service.
This commit adds the service WalletUnlocker, which is to be used
for creating a wallet password at first time startup, and unlocking
the wallet. The service exposes the RPC methods CreateWallet and
UnlockWallet.
2017-10-19 19:17:35 -07:00
Johan T. Halseth
9d31b6c4fd
lnrpc: add BOLT-11 fields.
This commit adds fields that are supported by the BOLT-11 invoice
format to the Invoice and PayReq protos. These fields are
timestamp, expiry, fallback address, description and
description hash.
2017-09-27 12:26:05 +02:00
Olaoluwa Osuntokun
6e6b5ac9af
lnrpc: remove the revocation_delay field from the HTLC proto
This commit removes the revocation_delay field from the HTLC proto as
we no longer need this field since the switch to 2-layer HTLC’s. The
2-layer HTLC construction no longer has the CSV delay directly in the
HTLC script itself.
2017-09-12 18:03:17 +02:00
Olaoluwa Osuntokun
129a0e10de
lnrpc: add two new RPC's, UpdateFees and FeeReport
This commit adds to new RPC’s to the Lightning service: UpdateFees and
FeeReport. Additionally, we also update to the latest version of protc,
golang protobuf, and the gRPC gateway.
2017-08-22 00:53:41 -07:00
Max Fang
b88438d708 lnrpc: Add descriptions and lncli mappings to rpc.proto 2017-08-14 17:53:19 -07:00
Olaoluwa Osuntokun
c14eaa7b6c
lnrpc: add expiry field to the Hop proto within a Route 2017-08-02 21:13:51 -07:00
Olaoluwa Osuntokun
43b40c2ba2
lnrpc: remove num_confs as a parameter within OpenChannelRequest
This commit removes the num_confs parameter within the
OpenChannelRequest struct as it’s no longer applicable with the new
funding workflow. In the new funding workflow, it’s the responder that
decides how many confirmations are required.
2017-07-30 17:51:44 -07:00
Olaoluwa Osuntokun
58d3fd9dd8
lnrpc: WalletBalance now returns satoshis instead o fBTC 2017-07-04 15:50:33 -07:00
Andrey Samokhvalov
6861df0e23 rpcserver: add additional 'error' field in payment response
In order to not close the payment stream on payment error the additional
field have been added in payment response. Now error from stream Recv()
function means that something has happend inside the client and we unable
to process any payment farther, and error inside the payment response
means, that something wrong has happend with payment itself.
2017-05-31 11:06:08 -07:00
Olaoluwa Osuntokun
4728826aa7
lnrpc: add fee, weight, and fee-per-kw for commit txns in channels 2017-05-16 19:13:31 -07:00
Philip Hayes
3b84db1f25 rpc: add signature to VerifyMessage response 2017-05-12 14:21:19 -07:00
Philip Hayes
2249215260 rpc: add SignMessage and VerifyMessage interface
This commit allows users to sign messages with their node's private key
with the SignMessage interface. The signatures are zbase32 encoded for
human readability/paste-ability.  Others users can verify that a message
was signed by another node in their channel database with the
VerifyMessage interface.
2017-05-12 14:21:19 -07:00
halseth
aa4e166539 lnrpc+rpc+lnd: add new Stop command for gracefully shutting down lnd
This commit adds simple non-blocking stop command to lncli, with an
appropriate proto update and implementation within the rpcserver.  When
invoked the interrupt handler routine in signal.go with begin the graceful
shutdown of lnd.
2017-05-11 14:55:56 -07:00
afederigo
cf4da784f0 rpc: add disconnect peer service and req/res messages
Issue: 139

This commit contains rpc service and messages for disconnecting
remote peers identified dy public key
2017-05-05 14:24:25 -07:00
Olaoluwa Osuntokun
9e4e423de1
lnrpc: augment the PendingChannels RPC to include details of closed channels
This commit adds some additional fields to the PendingChannels RPC s.t
users will be able to use the RPC to gain a complete view w.r.t where
all the funds within the daemon are, and how soon they can be
retrieved.

The following information is now returned:
   * all channels pending open
   * all channels pending cooperative close
   * all channels pending force close
2017-05-04 17:39:12 -07:00
Olaoluwa Osuntokun
71514ceb14
lnrpc: add chains field to GetInfoResponse to display active chains 2017-05-02 19:58:04 -07:00
Olaoluwa Osuntokun
2ad4fd5476
lnrpc: recompile protos to use latest gRPC annotations import path 2017-04-01 20:14:11 +02:00
bryanvu
9ffac9eae1 lnwire: update NodeAnnouncement to handle multiple addresses
This commit modifies address handling in the NodeAnnouncement struct,
switching from net.TCPAddr to []net.Addr. This enables more flexible
address handling with multiple types and multiple addresses for each
node. This commit addresses the first part of issue #131 .
2017-03-29 12:03:43 -07:00
Travis Cline
d24ca76754 lnrpc: update protoc invocation
This commit reflects an upstream change in grpc-gateway.

- regenerate proto output
- add genprotos dep, updated glide deps
2017-03-27 16:32:20 -07:00
Olaoluwa Osuntokun
6b3a258e86
multi: fix formatting issues in packge README's 2017-03-27 16:25:25 -07:00
Olaoluwa Osuntokun
04a6c2f7f6
lnrpc: convert QueryRoute to QueryRoutes
This commit converts the previous QueryRoute command to a new command:
QueryRoutes. This command is identical to QueryRoute other than the
fact that it’s able to return multiple routes rather than a single
route.
2017-03-21 12:20:47 -07:00
Olaoluwa Osuntokun
aa0fbcaefd
lnrpc: correct wrong json_name field in Payment proto 2017-03-16 19:45:56 -07:00
Thomas Preindl
862722d6fe lnrpc: switch Transaction.Amount from double (BTC) to int64 (sat) 2017-03-16 12:39:40 -07:00
Olaoluwa Osuntokun
94fa55cca3
lnrpc: add new SubscribeChannelGraph RPC call
This commit adds a new streaming RPC call the exposes the newly added
routing layer TopologyChange notifications within the gRPC service.
2017-03-14 20:07:39 -07:00
Olaoluwa Osuntokun
1dfda91415
lnrpc: add field denoting if channel peer is online in ListChannels
This commit adds a new field to the ListChannels RPC command which
indicates if the peer is currently online or not. This is useful as
UI’s will be able to use this information to communicate the
availability of each channel to an end user.
2017-03-08 14:46:24 -08:00
Olaoluwa Osuntokun
3a851d8bc6
lnrpc: re-compile protos with protoc v3.0.2 add json_name option
This commit modifies the protobuf file and most of the auto-generated
files to be generated by protoc version v3.0.2. Additionally, this
fixes a minor cosmetic regression within the `lncli` command line tool
which caused the JSON responses to be rendered in `camelCase` rather
than `snake_case`. We fix this by specifying the `json_name` for each
relevant RPC response.
2017-02-27 21:04:42 -06:00
bryanvu
508138f8c8 lnrpc: add output_index field to PendingUpdate message
Because we want to persist the state of the channel once the funding
transaction has been broadcast rather than once it has been fully
opened, we need to report the funding transaction ID to the UI or tests
when the transaction is pending, rather than after it has been
confirmed.
2017-02-24 11:37:33 -08:00
bryanvu
b21bd351e8 fundingmanager: change funding messages to use server.sendToPeer
Previously, during the channel funding process, peers sent wire
messages using peer.queueMsg. By switching to server.sendToPeer, the
fundingManager is more resilient to network connection issues or system
restarts during the funding process. With server.sendToPeer, if a peer
gets disconnected, the daemon can attempt to reconnect and continue the
process using the peer’s public key ID.
2017-02-21 19:21:19 -08:00
Olaoluwa Osuntokun
ef6ddcf788
lnrpc: include payment preimage in SendPayment response 2017-02-21 01:43:45 -08:00
Olaoluwa Osuntokun
3988473d45
lnrpc: add ping time to peer to the ListPeers response 2017-01-25 18:16:37 -08:00
Olaoluwa Osuntokun
faae0b3bf2
lnrpc: add new RPC to decode payment requests 2017-01-17 13:25:03 -08:00
Olaoluwa Osuntokun
765d9fd5e9
lnrpc: return route taken in SendPayment response 2017-01-16 20:37:15 -08:00