From 33082445c5717ae43bd74161eb6f37ca5958e96b Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Wed, 12 Feb 2014 15:30:05 +0000 Subject: [PATCH] Add signmessage support to btcctl --- util/btcctl/btcctl.go | 7 +++++++ 1 file changed, 7 insertions(+) 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")