Commit Graph

106 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
246ba98f47
cmd/lncli: update the sendpayment usage documentation 2018-01-22 19:19:55 -08:00
Olaoluwa Osuntokun
84c8ed6362
cmd/lncli: expose the final_cltv_delta flag in sendpayment 2018-01-22 19:19:55 -08:00
Johan T. Halseth
59b331c04d
lncli: add min_htlc_msat to openchannel 2018-01-12 22:56:36 +01:00
Johan T. Halseth
26421031e2
lncli: rename updatefees to updatechanpolicy
This commit renames the `lncli updatefees` command to
`lncli updatechanpolicy` and adds `time_lock_delta` as
one of the passed parameters.
2018-01-12 22:56:34 +01: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
Walt Seymour
0a36bfae9c fix issue with closechannel 2018-01-03 15:19:10 +01:00
Daniel Coonce
c36b1c3992 lncli: Fix "invalid handle" error
Uses syscall.Stdin rather than 0 for terminal.ReadPassword() calls.
2017-12-19 14:56:42 +01:00
Johan T. Halseth
17d1d5dc9c lncli: add 'private' flag to openchannel command
This make lncli openchannel take a --private
parameter, set to false by default.
2017-12-17 18:35:34 -08:00
Olaoluwa Osuntokun
c00a3ae03b
cmd/lncli: fix graph rendering with a single channel 2017-12-02 18:56:01 -08:00
Olaoluwa Osuntokun
9342a8d27d
cmd/lncli: add color border to graph rendering if node's color is set 2017-12-02 18:42:17 -08:00
Olaoluwa Osuntokun
0952b68e64
multi: retain original copyright on files copied/modified from btcsuite
Early in the lifetime of the project here were a few files we either
copied entirely, or used as the basis for code within lnd. Before this
PR, this was not recognized by retaining the original copyright. With
this commit, we remedy that by explicitly noting the copyright in the
relevant files.

Fixes #423.
2017-11-27 16:19:36 -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
Johan T. Halseth
d1e39e764b
lncli: Print help text in case of encrypted wallet.
This commit adds a decorator that will inspect the
error from an command action, and prints an encrypted
wallet help text if the error has status code Unimplemented.

This is done to help a user that is trying to issue
lncli commands before unlocking the wallet, since
the RPC server won't be active and every call will
return this status code.
2017-11-09 11:10:32 -08:00
rajeshnair2k
0e07699550 lncli: add a convenience command for paying an invoice
Fixes #324.
2017-10-27 15:39:54 -07:00
Johan T. Halseth
00ee3afab8 lncli: add commands "create" and "unlock"
lncli create:
This command is used to set up a wallet encryption password for
use with lnd at first time use. It will ask fot the user to
confirm the chosen password, then do a call to the lnd RPC method
CreateWallet with the chosen password.

lncli unlock:
This command is used to unlock the wallet of a running lnd instance.
It calls the RPC method UnlockWallet with the provided password.

Both methods makes use of the terminal.ReadPassword method, to
securely read a password from user input without making it
replayable in the terminal.
2017-10-19 19:17:35 -07:00
Braydon Fuller
53181f3ec3 cmd/lncli+lnwallet: specify need for witness outputs for funding channels
In this commit, we extend the help message for `newaddress` 
to indicate which address types can be used when directly 
funding channels. Additionally, we add some additional text 
to the insufficient funding error to detail that we don't have 
enough witness outputs.
2017-09-29 15:38:26 -07:00
Johan T. Halseth
ed8dd0b9e4
lncli: add new zpay32 options to command line
The new BOLT-11 compliant zpay32 package offers a few new
available options when creating invoices. This commit adds
those options to lncli, such that callers can specify these
when creating payment requests.
2017-09-27 13:17:29 +02:00
whythat
7df503575c macaroons: add error reporting for macaroon constraints 2017-09-19 16:46:20 -07:00
whythat
679e86174f macaroons: add IP lock macaroon constraint 2017-09-19 16:46:20 -07:00
whythat
a6b9155150 macaroons: use constraint layer for macaroon tweaking 2017-09-19 16:46:20 -07:00
Olaoluwa Osuntokun
48712526d6
lnd+cmd/lncli: bump to version 0.3 2017-08-23 11:57:01 -07:00
Olaoluwa Osuntokun
2790617176
cmd/lncli: add command+parsing for updatefees and feereport 2017-08-22 00:53:59 -07:00
Alex
5d971a8ea8 lncli: add support for macaroons 2017-08-17 19:20:41 -07:00
Alex
59f9065213 rpc: force TLS for both grpc endpoint and grpc gateway 2017-08-03 18:21:22 -07:00
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