Commit Graph

88 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
0dfe73386b
Cmd/lncli: remove num_confs as a param to the openchannel command 2017-07-30 17:51:48 -07:00
Olaoluwa Osuntokun
a824a2a855
cmd/lncli: properly display errors when sending payments 2017-07-04 15:55:34 -07:00
Philip Hayes
3b84db1f25 rpc: add signature to VerifyMessage response 2017-05-12 14:21:19 -07:00
Philip Hayes
ad5b69b798 cmd/lncli: add signmessage and verifymessage commands 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
Olaoluwa Osuntokun
ab007bb918
cmd/lncli: add key word argument support for new disconnect cmd 2017-05-05 15:54:33 -07:00
afederigo
5b7fe7de9e lncli: add disconnect peer command
Issue: 139

This commit contains lncli command  which disconnects remote peers from
console by passing one string argument: pubKey.
2017-05-05 14:24:25 -07:00
Olaoluwa Osuntokun
f0bcfd02c4
cmd/lncli: update call to updated PendingChannels RPC 2017-05-04 17:40:34 -07:00
Alex Bosworth
eafc1a851f cmd/lncli: fix typo in closechannel description 2017-04-26 21:38:53 -07:00
Olaoluwa Osuntokun
2cb6878568
cmd/lncli: make getnodeinfo accept positional arguments 2017-04-13 14:30:05 -07:00
Olaoluwa Osuntokun
4924c39042
cmd/lncli: bump version of client to 0.2 2017-04-11 22:02:12 -07:00
Olaoluwa Osuntokun
dabaf9da70
cmd/lncli: convert queryRoute to queryRoutes 2017-03-21 12:20:50 -07:00
Olaoluwa Osuntokun
c21cbc5021
cmd/lncli: append a new-line when using encoding/json to print resp
It was noticed by 21E14 on Github that when we fall back to using
golang’s encoding/json lib in special cases when printing the proto
responses in JSON form, the value printed lacked a new-line at the end.
This would cause the output to flow into bash prompts.

This issue has been fixed by simply appending a newline character to
the end of the formatted JSON output.

Fixes #160.
2017-03-16 12:06:17 -07:00
Andrey Samokhvalov
61991a1c89 lnd: fix latest goclean.sh lint warning 2017-03-13 16:30:23 -07:00
Andrey Samokhvalov
ee2379775c lnd: fix golint warning which requires to add additional comments 2017-03-13 16:30:23 -07:00
Andrey Samokhvalov
fd97a4bd19 lnd: partially fix golint warnings 2017-03-13 16:30:23 -07:00
Andrey Samokhvalov
92dec2a902 lnd: fix govet warnings 2017-03-13 16:30:23 -07:00
Andrey Samokhvalov
143a6e01bb lnd: fix unconvert warnings 2017-03-13 16:30:23 -07:00
Thomas Preindl
9665bb7e54 lncli: add listchaintxns command 2017-03-08 17:39:38 -08:00
Olaoluwa Osuntokun
8387092409
cmd/lncli: fix bug in openchannel cmd that made --push_amt mandatory
This commit fixes a minor bug that was introduced with the latest PR
that made specifying the —push_amt flag when opening a channel
mandatory. The fix is simple, turn the switch statement into an
if/else, which makes the —push_amt flag optional once again.
2017-03-05 19:01:01 -06:00
Thomas Preindl
355c88f5a4 lncli: add support for positional arguments for all commands (#120)
This commit updates the command line help for several commands within
cmd/lncli to be more uniform, and also use the proper attributes within
the urfave/cli project. Additionally, in several areas cli.Int was using
used instead of cli.Int64 when parsing satoshis. This oversight has been
rectified by modifying all incorrect occurrences.

Finally, this commit, as its central contribution, adds the ability to mix
and match positional arguments with key-word arguments for several
commands! The following commands can now be used with either only
positional arguments, only key-word arguments, or a mix of both when
applicable:
  * openchannel 
  * closechannel
  * sendpayment
  * getnodeinfo
  * getchaninfo
  * newaddress
  * sendcoins
  * sendmany
  * connect
  * addinvoice
  * lookupinvoice
  * queryroute


The set of changes outlined above should make command line tinkering with
`lnd` a bit more streamlined, yet still very flexible.
2017-03-02 16:23:16 -06:00
Olaoluwa Osuntokun
250c763c76
cmd/lncli: display payment preimage in hex in sendpayment resp 2017-02-21 01:43:51 -08:00
Olaoluwa Osuntokun
926f5c84d0
cmd/lncli: always consume first message for openchannel/closechannel
This commit modifies the behavior for the commands which open and close
channels on the command line. Previsouly a user needed to use the
`—block` flag in order to get information about any possible errors or
the full progress of a request. This commit alters the behavior
slightly to block until the _first_ message or error is returned from
the gRPC stream.

With this change, the command line usage has a better UX as users
instantly get more information without having to peer into the logs.
2017-02-07 19:36:24 -08:00
juscamarena
68c40b05ff cmd/lncli: Update command usage info to match current commands 2017-01-29 18:00:42 -08:00
Olaoluwa Osuntokun
07f8dab560
cmd/lncli: rename --draw to --render for describegraph 2017-01-29 15:38:28 -08:00
Olaoluwa Osuntokun
629d276409
cmd/lncli: use jsonpb to son pretty-printing to disable omitempty
This commit uses protobuf’s jsonpb library rather than the built-in
json/encoding library to print the JSOn representation of the responses
from gRPC. By using this library, we are now able to properly display
any values from the response which are “non-truthy” (0, false, etc).
2017-01-29 14:56:39 -08:00
Olaoluwa Osuntokun
f4f92bb8e7
cmd/lncli: ensure gRPC client is closed after request 2017-01-29 14:51:42 -08:00
Olaoluwa Osuntokun
3aaf291409
cmd/lncli: [describegraph] -- if rendering fails, display error 2017-01-25 18:29:32 -08:00
Olaoluwa Osuntokun
a5d2dbf219
cmd/lncli: remove Z prefix from vertexes in describegraph rendering
This commit removes the prior work around to display a prefix of the
node’s public key as a vertex. It turns out that if you quote the
string, the it will escape all characters enclosed. This allows us the
drop the hacky “Z” prefix that we used before.
2017-01-25 18:27:35 -08:00
Olaoluwa Osuntokun
eb52f7f695
cmd/lncli: use .svg for graph rendering add weighted edge thickness 2017-01-24 18:07:23 -08:00
Olaoluwa Osuntokun
160317c9fa
cmd/lncli: correct usage for openchannel 2017-01-24 17:50:50 -08:00
Olaoluwa Osuntokun
3ec4eeb5e2
cmd/lncli: add ability to render graph to 'describegraph'
This commit adds an ability to render the channel graph as returned by
the ‘displaygraph’ command. The rendering of the graph itself is
carried about the by the ‘dot’ command which eventually calls out to
graphviz.

Currently the graph is always saved to the same file in the local
directory, but in a later commit the location of the file will be made
configurable.

Finally, the attributes sent to the ‘dot’ command used to render the
graph are still a bit in flux. The parameters will likely be tuned once
the channel graph on testnet grows a bit more.
2017-01-23 20:32:23 -08:00
Olaoluwa Osuntokun
9662887d2f
rpcserver+cmd/lncli: implement DecodePayReq
This commit implements the newly added RPC to decode payment requests
passed over the command line or directly via gRPC.

With this tool, users can now examine payment requests they see in the
wild for diagnostic or debugging purposes.
2017-01-17 13:49:44 -08:00
Olaoluwa Osuntokun
ee96052e44
cmd/lncli: add parsing+dispatch for the debuglevel command 2017-01-14 18:20:12 -08:00
Olaoluwa Osuntokun
efa7059ac3
cmd/lncli: add support for new "Perm" field in connectpeer command 2017-01-09 19:12:42 -08:00
Olaoluwa Osuntokun
b01e7efcef
cmd/lncli: add cli support for the push-during-funding workflow 2017-01-09 19:06:15 -08:00
Olaoluwa Osuntokun
5affed38fc
multi: update btcsuite API's to latest upstream changes
This commit makes a large number of minor changes concerning API usage
within the deamon to match the latest version on the upstream btcsuite
libraries.

The major changes are the switch from wire.ShaHash to chainhash.Hash,
and that wire.NewMsgTx() now takes a paramter indicating the version of
the transaction to be created.
2017-01-05 13:56:34 -08:00
Olaoluwa Osuntokun
9b50df704c
cmd/lncli: accept zpay32 requests in sendpayment command 2017-01-02 15:46:54 -08:00
Olaoluwa Osuntokun
5a9be3f812
cmd/lncli: display zpay32 request in addinvoice response 2017-01-02 15:37:16 -08:00
Olaoluwa Osuntokun
507a4eb5cc
cmd/lncli: add support for the net channel graph related commands
This commit adds support for the newly added channel graph related
commands: describegraph, getchaninfo, getnodeinfo, queryroute, and
finally getnetworkinfo.
2016-12-27 16:45:02 -08:00
Olaoluwa Osuntokun
367be2d385
lncli: remove deprecated shell command
This commit removes the shell command as it’s now deprecated since it
was never fully implemented.
2016-12-27 16:45:00 -08:00
Olaoluwa Osuntokun
d70f03435b
cmd/lncli: implement parsing+dispatching for the new describegraph call 2016-12-27 16:44:55 -08:00
BitfuryLightning
eb4d0e035e channeldb: save outgoing payments
Add structure for outgoing payments. Saving payment in DB
after successful payment send. Add RPC call for listing
all payments.
2016-12-27 16:16:23 -08:00
BitfuryLightning
327768f4ad routing: Move tools inside lnd. Refactor and delete unneeded stuff
Use [33]byte for graph vertex representation.
Delete unneeded stuff:
1. DeepEqual for graph comparison
2. EdgePath
3. 2-thread BFS
4. Table transfer messages and neighborhood radius
5. Beacons

Refactor:
1. Change ID to Vertex
2. Test use table driven approach
3. Add comments
4. Make graph internal representation private
5. Use wire.OutPoint as  EdgeId
6. Decouple routing messages from routing implementation
7. Delete Async methods
8. Delete unneeded channels and priority buffer from manager
9. Delete unneeded interfaces in internal graph realisation
10. Renamed ID to Vertex
2016-11-23 20:37:43 -06:00
Olaoluwa Osuntokun
6d39b4be95
cmd/lncli: convert instances of lightning_id to compressed pubkey 2016-10-27 19:42:53 -07:00
Olaoluwa Osuntokun
301a9fea38
cmd/lncli: implementing parsing+display for list channels 2016-09-25 20:05:06 -07:00
Olaoluwa Osuntokun
d34b90136f
cmd/lncli: the target destination for sendpayment must now be a compressed pubkey
This commit modifies the sendpayment message slightly to indicate that
the —dest value should be a hex-encoded compressed public key. This
change is required to stream line the integration of onion routing into
the daemon.
2016-09-21 19:48:53 -07:00
Olaoluwa Osuntokun
89310c8778
cmd/lncli: add new --debug_send option to sendpayment
This commit adds a new option to the send payment command. The new
option toggles usage of the debug HTLC R-Hash when sending the
described payment. This flag should be used in conjunction with lnd
nodes that have been started with the `—debughtlc` flag in order to
allow sending payments without first registering invoices.
2016-09-21 19:48:49 -07:00
Olaoluwa Osuntokun
9bd5105ae5
cmd/lncli: avoid unnecessarily re-encoding graph vertexes in routing table 2016-09-21 19:48:42 -07:00
Olaoluwa Osuntokun
ca89ddb9ea
cmd/lncli: implement handling of new invoice RPC commands 2016-09-21 19:48:32 -07:00