2015-05-01 19:10:23 +02:00
|
|
|
// Copyright (c) 2015 The btcsuite developers
|
2015-12-01 19:44:58 +01:00
|
|
|
// Use of this source code is governed by an ISC
|
|
|
|
// license that can be found in the LICENSE file.
|
2015-04-17 22:05:38 +02:00
|
|
|
|
|
|
|
//+build !generate
|
|
|
|
|
|
|
|
package rpchelp
|
|
|
|
|
2017-04-28 01:31:27 +02:00
|
|
|
import "github.com/btcsuite/btcd/btcjson"
|
2015-04-17 22:05:38 +02:00
|
|
|
|
|
|
|
// Common return types.
|
|
|
|
var (
|
|
|
|
returnsBool = []interface{}{(*bool)(nil)}
|
|
|
|
returnsNumber = []interface{}{(*float64)(nil)}
|
|
|
|
returnsString = []interface{}{(*string)(nil)}
|
|
|
|
returnsStringArray = []interface{}{(*[]string)(nil)}
|
|
|
|
returnsLTRArray = []interface{}{(*[]btcjson.ListTransactionsResult)(nil)}
|
|
|
|
)
|
|
|
|
|
2016-03-25 20:11:25 +01:00
|
|
|
// Methods contains all methods and result types that help is generated for,
|
|
|
|
// for every locale.
|
2015-04-17 22:05:38 +02:00
|
|
|
var Methods = []struct {
|
|
|
|
Method string
|
|
|
|
ResultTypes []interface{}
|
|
|
|
}{
|
|
|
|
{"addmultisigaddress", returnsString},
|
|
|
|
{"createmultisig", []interface{}{(*btcjson.CreateMultiSigResult)(nil)}},
|
|
|
|
{"dumpprivkey", returnsString},
|
|
|
|
{"getaccount", returnsString},
|
|
|
|
{"getaccountaddress", returnsString},
|
|
|
|
{"getaddressesbyaccount", returnsStringArray},
|
|
|
|
{"getbalance", append(returnsNumber, returnsNumber[0])},
|
|
|
|
{"getbestblockhash", returnsString},
|
|
|
|
{"getblockcount", returnsNumber},
|
|
|
|
{"getinfo", []interface{}{(*btcjson.InfoWalletResult)(nil)}},
|
|
|
|
{"getnewaddress", returnsString},
|
|
|
|
{"getrawchangeaddress", returnsString},
|
|
|
|
{"getreceivedbyaccount", returnsNumber},
|
|
|
|
{"getreceivedbyaddress", returnsNumber},
|
|
|
|
{"gettransaction", []interface{}{(*btcjson.GetTransactionResult)(nil)}},
|
|
|
|
{"help", append(returnsString, returnsString[0])},
|
|
|
|
{"importprivkey", nil},
|
|
|
|
{"keypoolrefill", nil},
|
|
|
|
{"listaccounts", []interface{}{(*map[string]float64)(nil)}},
|
|
|
|
{"listlockunspent", []interface{}{(*[]btcjson.TransactionInput)(nil)}},
|
|
|
|
{"listreceivedbyaccount", []interface{}{(*[]btcjson.ListReceivedByAccountResult)(nil)}},
|
|
|
|
{"listreceivedbyaddress", []interface{}{(*[]btcjson.ListReceivedByAddressResult)(nil)}},
|
|
|
|
{"listsinceblock", []interface{}{(*btcjson.ListSinceBlockResult)(nil)}},
|
|
|
|
{"listtransactions", returnsLTRArray},
|
|
|
|
{"listunspent", []interface{}{(*btcjson.ListUnspentResult)(nil)}},
|
|
|
|
{"lockunspent", returnsBool},
|
|
|
|
{"sendfrom", returnsString},
|
|
|
|
{"sendmany", returnsString},
|
|
|
|
{"sendtoaddress", returnsString},
|
|
|
|
{"settxfee", returnsBool},
|
|
|
|
{"signmessage", returnsString},
|
|
|
|
{"signrawtransaction", []interface{}{(*btcjson.SignRawTransactionResult)(nil)}},
|
|
|
|
{"validateaddress", []interface{}{(*btcjson.ValidateAddressWalletResult)(nil)}},
|
|
|
|
{"verifymessage", returnsBool},
|
|
|
|
{"walletlock", nil},
|
|
|
|
{"walletpassphrase", nil},
|
|
|
|
{"walletpassphrasechange", nil},
|
|
|
|
{"createnewaccount", nil},
|
|
|
|
{"exportwatchingwallet", returnsString},
|
|
|
|
{"getbestblock", []interface{}{(*btcjson.GetBestBlockResult)(nil)}},
|
|
|
|
{"getunconfirmedbalance", returnsNumber},
|
|
|
|
{"listaddresstransactions", returnsLTRArray},
|
|
|
|
{"listalltransactions", returnsLTRArray},
|
|
|
|
{"renameaccount", nil},
|
|
|
|
{"walletislocked", returnsBool},
|
|
|
|
}
|
|
|
|
|
2016-03-25 20:11:25 +01:00
|
|
|
// HelpDescs contains the locale-specific help strings along with the locale.
|
2015-04-17 22:05:38 +02:00
|
|
|
var HelpDescs = []struct {
|
|
|
|
Locale string // Actual locale, e.g. en_US
|
|
|
|
GoLocale string // Locale used in Go names, e.g. EnUS
|
|
|
|
Descs map[string]string
|
|
|
|
}{
|
|
|
|
{"en_US", "EnUS", helpDescsEnUS}, // helpdescs_en_US.go
|
|
|
|
}
|