Add getaccount support to btcctl.
This commit is contained in:
parent
d17a97b485
commit
13868e76ec
1 changed files with 7 additions and 0 deletions
|
@ -48,6 +48,7 @@ var commandHandlers = map[string]*handlerData{
|
|||
"debuglevel": &handlerData{1, 0, displayGeneric, nil, makeDebugLevel, "<levelspec>"},
|
||||
"decoderawtransaction": &handlerData{1, 0, displayJSONDump, nil, makeDecodeRawTransaction, "<txhash>"},
|
||||
"dumpprivkey": &handlerData{1, 0, displayGeneric, nil, makeDumpPrivKey, "<bitcoinaddress>"},
|
||||
"getaccount": &handlerData{1, 0, displayGeneric, nil, makeGetAccount, "<address>"},
|
||||
"getbalance": &handlerData{0, 2, displayGeneric, []conversionHandler{nil, toInt}, makeGetBalance, "[account] [minconf=1]"},
|
||||
"getbestblockhash": &handlerData{0, 0, displayGeneric, nil, makeGetBestBlockHash, ""},
|
||||
"getblock": &handlerData{1, 2, displayJSONDump, []conversionHandler{nil, toBool, toBool}, makeGetBlock, "<blockhash>"},
|
||||
|
@ -166,6 +167,12 @@ func makeDumpPrivKey(args []interface{}) (btcjson.Cmd, error) {
|
|||
return btcjson.NewDumpPrivKeyCmd("btcctl", args[0].(string))
|
||||
}
|
||||
|
||||
// makeGetAccount generates the cmd structure for
|
||||
// getaddress commands.
|
||||
func makeGetAccount(args []interface{}) (btcjson.Cmd, error) {
|
||||
return btcjson.NewGetAccountCmd("btcctl", args[0].(string))
|
||||
}
|
||||
|
||||
// makeGetBalance generates the cmd structure for
|
||||
// getbalance commands.
|
||||
func makeGetBalance(args []interface{}) (btcjson.Cmd, error) {
|
||||
|
|
Loading…
Reference in a new issue