Add dumpprivkey to btcctl.

This commit is contained in:
Josh Rickmar 2013-11-19 22:35:52 -05:00
parent 0301690499
commit 4a290162ee

View file

@ -45,6 +45,7 @@ var (
var commandHandlers = map[string]*handlerData{
"addnode": &handlerData{2, 0, displaySpewDump, nil, makeAddNode, "<ip> <add/remove/onetry>"},
"decoderawtransaction": &handlerData{1, 0, displaySpewDump, nil, makeDecodeRawTransaction, "<txhash>"},
"dumpprivkey": &handlerData{1, 0, displayGeneric, nil, makeDumpPrivKey, "<bitcoinaddress>"},
"getbestblockhash": &handlerData{0, 0, displayGeneric, nil, makeGetBestBlockHash, ""},
"getblock": &handlerData{1, 0, displaySpewDump, nil, makeGetBlock, "<blockhash>"},
"getblockcount": &handlerData{0, 0, displayFloat64, nil, makeGetBlockCount, ""},
@ -132,6 +133,12 @@ func makeDecodeRawTransaction(args []interface{}) (btcjson.Cmd, error) {
return btcjson.NewDecodeRawTransactionCmd("btcctl", args[0].(string))
}
// makeDumpPrivKey generates the cmd structure for
// dumpprivkey commands.
func makeDumpPrivKey(args []interface{}) (btcjson.Cmd, error) {
return btcjson.NewDumpPrivKeyCmd("btcctl", args[0].(string))
}
// makeGetBestBlockHash generates the cmd structure for
// makebestblockhash comands.
func makeGetBestBlockHash(args []interface{}) (btcjson.Cmd, error) {