Commit graph

31 commits

Author SHA1 Message Date
David Hill
295cc873f4 add getbalance 2013-11-26 17:05:33 -05:00
Josh Rickmar
de9176b94f Fix listtransactions optarg indexes. 2013-11-26 16:21:19 -05:00
Josh Rickmar
6f2b96b7e2 Fix help message for listtransactions. 2013-11-22 15:18:23 -05:00
Josh Rickmar
d00ca48475 Print listtransactions replies with go-spew. 2013-11-22 14:20:31 -05:00
Josh Rickmar
ef47455b05 Add listtransactions support to btcctl.
This is currently using the generic reply formater, and will likely be
switched out for a custom one later.
2013-11-22 13:13:39 -05:00
Dave Collins
daa5310e2f Add support for debuglevel RPC command.
Also include the supported subsystems in the error message if an invalid
subsystem is specified.

Closes #15.
2013-11-22 10:47:29 -06:00
Josh Rickmar
0bee8478a9 Fix optional arg handling for importprivkey. 2013-11-20 11:12:00 -05:00
Josh Rickmar
4a290162ee Add dumpprivkey to btcctl. 2013-11-19 22:36:25 -05:00
Dave Collins
9643cb6d23 Make golint happy with btcctl. 2013-11-19 20:35:49 -06:00
Dave Collins
c2bec24f51 Improve btcctl config.
This commit improves the configuration for btcctl in several ways:

- Add the ability to specify a config file
- Add a default entry to the rpc cert to point to the location
  it will likely be in the btcd home directory
- Move the config bits into a separate file for easier maintenance
2013-11-19 14:53:22 -06:00
Dave Collins
04a2f66d64 Allow go-flags to generate help entry in btcctl. 2013-11-19 13:44:52 -06:00
Owain G. Ainsworth
75e577c82e RPC TLS Support.
All rpc sockets now listen using TLS by default, and this can not be
turned off. The keys (defauling to the datadirectory) may be provided by
--rpccert and --rpckey. If the keys do not exist we will generate a new
self-signed keypair with some sane defaults (hostname and all current
interface addresses).

Additionally add tls capability to btcctl so that it can still be used.
The certificate to use for verify can be provided on the commandline or
verification can be turned off (this leaves you susceptible to MITM
attacks)

Initial code from dhill (rpc tls support) and jrick (key generation),
cleanup, debugging and polishing from me.
2013-11-19 14:50:31 +00:00
Josh Rickmar
5ec4aaff09 Add importprivkey support to btcctl. 2013-11-18 14:51:31 -05:00
Dave Collins
e3eca752da Allow verbose param on btcctl getrawtransaction. 2013-11-14 12:19:20 -06:00
Owain G. Ainsworth
bb276b53aa Add support for the verifychain command.
So far we only do level 0 and level 1 checks (precense and basic
sanity). The checks done at higher levels in bitcoind are closely
coupled with their database layout.

arguably Closes #13
2013-11-12 22:57:26 +00:00
Dave Collins
af311078b4 Correct btcctl getblockhash.
Also run gofmt while here.
2013-11-07 17:07:26 -06:00
John C. Vernaleo
b72f0c6474 Make peerinfo output match bitcoind a bit better.
Add long option for username in btcctl.
2013-11-04 16:25:13 -05:00
Owain G. Ainsworth
9f96e59392 Rough and ready cut over of btcctl to use the btcjson command api. 2013-10-29 16:42:11 +00:00
Dave Collins
9ded3fa2cf Generate usage from handler data in btcctl.
Rather than having to keep the usage in sync with the supported commands,
simply include the usage as a field in the command handlers map and
dynamically generate the usage from there.
2013-10-22 10:56:56 -05:00
Dave Collins
d4f980c71f Show usage on no params to btcctl. 2013-10-22 10:15:46 -05:00
Dave Collins
c55152ef7e Always return non-zero code from btcctl on error. 2013-10-22 10:01:13 -05:00
Dave Collins
629168b7ae Perform display handler check before issues RPC.
This commit modifies the command handler in btcctl to check the existence
of a display handler before issues an RPC command.  This prevents a round
trip to the server if there is no display handler.

Also, fix a couple of comments while here.
2013-10-22 00:40:17 -05:00
Dave Collins
4e5cd1a326 Allow nil conversion handlers in btcctl. 2013-10-21 23:03:11 -05:00
Dave Collins
2ea4239f5e Improve btcctl.
This commit significantly reworks btcctl to use a map based approach to
command handling.  This reduces the number of lines of code needed,
simplifies adding new commands, improves the error handling, and removes
several cases where unexpected data was not handled properly (it could
panic).

This commit also adds the ability to specify the optional parameter on
getrawtransaction.

Discussed with dhill@.
2013-10-21 22:58:47 -05:00
David Hill
27abb0eb3e add "addnode" to btcctl 2013-10-21 14:09:05 -04:00
David Hill
e1a02d71b3 add getpeerinfo to btcctl 2013-10-21 13:26:40 -04:00
David Hill
3130659cdf add getconnectioncount to btcctl 2013-10-21 12:59:07 -04:00
David Hill
ff20c420a2 add decoderawtransaction, getbestblockhash, getdifficulty, and
getrawmempool to btcctl.
2013-10-17 12:35:27 -04:00
David Hill
90fbae1781 give btcctl some options instead of using hardcoded values 2013-10-16 19:19:26 -04:00
Dave Collins
ae5810bc50 Change default RPC port to 8334 (18334 testnet).
This change paves the way for running btcwallet on the same system without
having to change any settings.  The well-known ports used by the
reference implementation (8332 mainnet, 18332 testnet) will be exposed by
the separate wallet process, which will in turn forward unknown requests
to btcd via websockets (on 8334/18334).  This allows the wallet process to
ultimately provide a unified interface that exposes the same RPC-JSON API
as the reference implementation will maintaining wallet and chain
separation.
2013-10-16 15:01:43 -05:00
David Hill
e8d73d83ef Add btcctl; currently a barebones utility to send commands
to btcd.
2013-10-08 21:18:49 -04:00