Add signmessage support to btcctl
This commit is contained in:
parent
4431fd9c0d
commit
33082445c5
1 changed files with 7 additions and 0 deletions
|
@ -96,6 +96,7 @@ var commandHandlers = map[string]*handlerData{
|
||||||
"sendrawtransaction": {1, 0, displayGeneric, nil, makeSendRawTransaction, "<hextx>"},
|
"sendrawtransaction": {1, 0, displayGeneric, nil, makeSendRawTransaction, "<hextx>"},
|
||||||
"sendtoaddress": {2, 2, displayGeneric, []conversionHandler{nil, toSatoshi, nil, nil}, makeSendToAddress, "<address> <amount> [comment] [comment-to]"},
|
"sendtoaddress": {2, 2, displayGeneric, []conversionHandler{nil, toSatoshi, nil, nil}, makeSendToAddress, "<address> <amount> [comment] [comment-to]"},
|
||||||
"settxfee": {1, 0, displayGeneric, []conversionHandler{toSatoshi}, makeSetTxFee, "<amount>"},
|
"settxfee": {1, 0, displayGeneric, []conversionHandler{toSatoshi}, makeSetTxFee, "<amount>"},
|
||||||
|
"signmessage": {2, 2, displayGeneric, nil, makeSignMessage, "<address> <message>"},
|
||||||
"stop": {0, 0, displayGeneric, nil, makeStop, ""},
|
"stop": {0, 0, displayGeneric, nil, makeStop, ""},
|
||||||
"submitblock": {1, 1, displayGeneric, nil, makeSubmitBlock, "<hexdata> [jsonparametersobject]"},
|
"submitblock": {1, 1, displayGeneric, nil, makeSubmitBlock, "<hexdata> [jsonparametersobject]"},
|
||||||
"validateaddress": {1, 0, displayJSONDump, nil, makeValidateAddress, "<address>"},
|
"validateaddress": {1, 0, displayJSONDump, nil, makeValidateAddress, "<address>"},
|
||||||
|
@ -671,6 +672,12 @@ func makeSetTxFee(args []interface{}) (btcjson.Cmd, error) {
|
||||||
return btcjson.NewSetTxFeeCmd("btcctl", args[0].(int64))
|
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.
|
// makeStop generates the cmd structure for stop commands.
|
||||||
func makeStop(args []interface{}) (btcjson.Cmd, error) {
|
func makeStop(args []interface{}) (btcjson.Cmd, error) {
|
||||||
return btcjson.NewStopCmd("btcctl")
|
return btcjson.NewStopCmd("btcctl")
|
||||||
|
|
Loading…
Add table
Reference in a new issue