diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index a41a35c5..55b37342 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -48,6 +48,7 @@ var commandHandlers = map[string]*handlerData{ "createrawtransaction": &handlerData{2, 0, displayGeneric, nil, makeCreateRawTransaction, "\"[{\"txid\":\"id\",\"vout\":n},...]\" \"{\"address\":amount,...}\""}, "debuglevel": &handlerData{1, 0, displayGeneric, nil, makeDebugLevel, ""}, "decoderawtransaction": &handlerData{1, 0, displayJSONDump, nil, makeDecodeRawTransaction, ""}, + "decodescript": &handlerData{1, 0, displayJSONDump, nil, makeDecodeScript, ""}, "dumpprivkey": &handlerData{1, 0, displayGeneric, nil, makeDumpPrivKey, ""}, "getaccount": &handlerData{1, 0, displayGeneric, nil, makeGetAccount, "
"}, "getaccountaddress": &handlerData{1, 0, displayGeneric, nil, makeGetAccountAddress, ""}, @@ -187,6 +188,11 @@ func makeDecodeRawTransaction(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewDecodeRawTransactionCmd("btcctl", args[0].(string)) } +// makeDecodeScript generates the cmd structure for decodescript comands. +func makeDecodeScript(args []interface{}) (btcjson.Cmd, error) { + return btcjson.NewDecodeScriptCmd("btcctl", args[0].(string)) +} + // makeDumpPrivKey generates the cmd structure for // dumpprivkey commands. func makeDumpPrivKey(args []interface{}) (btcjson.Cmd, error) {