-
Notifications
You must be signed in to change notification settings - Fork 0
/
methods.go
89 lines (82 loc) · 3.4 KB
/
methods.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Copyright (c) 2015 The btcsuite developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
//+build !generate
package rpchelp
import "github.com/fichain/filechain/btcjson"
// 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)}
)
// Methods contains all methods and result types that help is generated for,
// for every locale.
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},
{"confirmbuy", returnsString},
{"appealtransfee", returnsString},
{"listfilehash", []interface{}{(*btcjson.ListHashResult)(nil)}},
{"getfilehashinfo", []interface{}{(*btcjson.FileHashInfoRsp)(nil)}},
{"getbuyhashinfo", []interface{}{(*btcjson.BuyHashInfoRsp)(nil)}},
{"getproof", returnsString},
{"publishhash", returnsString},
{"buyhash", returnsString},
}
// HelpDescs contains the locale-specific help strings along with the locale.
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
}