diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index a8f1b133..c63efbd4 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -96,6 +96,7 @@ var commandHandlers = map[string]*handlerData{ "sendrawtransaction": {1, 0, displayGeneric, nil, makeSendRawTransaction, ""}, "sendtoaddress": {2, 2, displayGeneric, []conversionHandler{nil, toSatoshi, nil, nil}, makeSendToAddress, "
[comment] [comment-to]"}, "settxfee": {1, 0, displayGeneric, []conversionHandler{toSatoshi}, makeSetTxFee, ""}, + "signmessage": {2, 2, displayGeneric, nil, makeSignMessage, "
"}, "stop": {0, 0, displayGeneric, nil, makeStop, ""}, "submitblock": {1, 1, displayGeneric, nil, makeSubmitBlock, " [jsonparametersobject]"}, "validateaddress": {1, 0, displayJSONDump, nil, makeValidateAddress, "
"}, @@ -671,6 +672,12 @@ func makeSetTxFee(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewSetTxFeeCmd("btcctl", args[0].(int64)) } +// makeSignMessage generates the cmd structure for signmessage commands. +func makeSignMessage(args []interface{}) (btcjson.Cmd, error) { + return btcjson.NewSignMessageCmd("btcctl", args[0].(string), + args[1].(string)) +} + // makeStop generates the cmd structure for stop commands. func makeStop(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewStopCmd("btcctl")