1 // Copyright (c) 2014-2017 The btcsuite developers
2 // Use of this source code is governed by an ISC
3 // license that can be found in the LICENSE file.
5 // NOTE: This file is intended to house the RPC commands that are supported by
15 // AddNodeSubCmd defines the type used in the addnode JSON-RPC command for the
17 type AddNodeSubCmd string
20 // ANAdd indicates the specified host should be added as a persistent
22 ANAdd AddNodeSubCmd = "add"
24 // ANRemove indicates the specified peer should be removed.
25 ANRemove AddNodeSubCmd = "remove"
27 // ANOneTry indicates the specified host should try to connect once,
28 // but it should not be made persistent.
29 ANOneTry AddNodeSubCmd = "onetry"
32 // AddNodeCmd defines the addnode JSON-RPC command.
33 type AddNodeCmd struct {
35 SubCmd AddNodeSubCmd `jsonrpcusage:"\"add|remove|onetry\""`
38 // NewAddNodeCmd returns a new instance which can be used to issue an addnode
40 func NewAddNodeCmd(addr string, subCmd AddNodeSubCmd) *AddNodeCmd {
47 // TransactionInput represents the inputs to a transaction. Specifically a
48 // transaction hash and output number pair.
49 type TransactionInput struct {
50 Txid string `json:"txid"`
51 Vout uint32 `json:"vout"`
54 // CreateRawTransactionCmd defines the createrawtransaction JSON-RPC command.
55 type CreateRawTransactionCmd struct {
56 Inputs []TransactionInput
57 Amounts map[string]float64 `jsonrpcusage:"{\"address\":amount,...}"` // In BTC
61 // NewCreateRawTransactionCmd returns a new instance which can be used to issue
62 // a createrawtransaction JSON-RPC command.
64 // Amounts are in BTC.
65 func NewCreateRawTransactionCmd(inputs []TransactionInput, amounts map[string]float64,
66 lockTime *int64) *CreateRawTransactionCmd {
68 return &CreateRawTransactionCmd{
75 // DecodeRawTransactionCmd defines the decoderawtransaction JSON-RPC command.
76 type DecodeRawTransactionCmd struct {
80 // NewDecodeRawTransactionCmd returns a new instance which can be used to issue
81 // a decoderawtransaction JSON-RPC command.
82 func NewDecodeRawTransactionCmd(hexTx string) *DecodeRawTransactionCmd {
83 return &DecodeRawTransactionCmd{
88 // DecodeScriptCmd defines the decodescript JSON-RPC command.
89 type DecodeScriptCmd struct {
93 // NewDecodeScriptCmd returns a new instance which can be used to issue a
94 // decodescript JSON-RPC command.
95 func NewDecodeScriptCmd(hexScript string) *DecodeScriptCmd {
96 return &DecodeScriptCmd{
101 // GetAddedNodeInfoCmd defines the getaddednodeinfo JSON-RPC command.
102 type GetAddedNodeInfoCmd struct {
107 // NewGetAddedNodeInfoCmd returns a new instance which can be used to issue a
108 // getaddednodeinfo JSON-RPC command.
110 // The parameters which are pointers indicate they are optional. Passing nil
111 // for optional parameters will use the default value.
112 func NewGetAddedNodeInfoCmd(dns bool, node *string) *GetAddedNodeInfoCmd {
113 return &GetAddedNodeInfoCmd{
119 // GetBestBlockHashCmd defines the getbestblockhash JSON-RPC command.
120 type GetBestBlockHashCmd struct{}
122 // NewGetBestBlockHashCmd returns a new instance which can be used to issue a
123 // getbestblockhash JSON-RPC command.
124 func NewGetBestBlockHashCmd() *GetBestBlockHashCmd {
125 return &GetBestBlockHashCmd{}
128 // GetBlockCmd defines the getblock JSON-RPC command.
129 type GetBlockCmd struct {
131 Verbose *bool `jsonrpcdefault:"true"`
132 VerboseTx *bool `jsonrpcdefault:"false"`
135 // NewGetBlockCmd returns a new instance which can be used to issue a getblock
138 // The parameters which are pointers indicate they are optional. Passing nil
139 // for optional parameters will use the default value.
140 func NewGetBlockCmd(hash string, verbose, verboseTx *bool) *GetBlockCmd {
144 VerboseTx: verboseTx,
148 // GetBlockChainInfoCmd defines the getblockchaininfo JSON-RPC command.
149 type GetBlockChainInfoCmd struct{}
151 // NewGetBlockChainInfoCmd returns a new instance which can be used to issue a
152 // getblockchaininfo JSON-RPC command.
153 func NewGetBlockChainInfoCmd() *GetBlockChainInfoCmd {
154 return &GetBlockChainInfoCmd{}
157 // GetBlockCountCmd defines the getblockcount JSON-RPC command.
158 type GetBlockCountCmd struct{}
160 // NewGetBlockCountCmd returns a new instance which can be used to issue a
161 // getblockcount JSON-RPC command.
162 func NewGetBlockCountCmd() *GetBlockCountCmd {
163 return &GetBlockCountCmd{}
166 // GetBlockHashCmd defines the getblockhash JSON-RPC command.
167 type GetBlockHashCmd struct {
171 // NewGetBlockHashCmd returns a new instance which can be used to issue a
172 // getblockhash JSON-RPC command.
173 func NewGetBlockHashCmd(index int64) *GetBlockHashCmd {
174 return &GetBlockHashCmd{
179 // GetBlockHeaderCmd defines the getblockheader JSON-RPC command.
180 type GetBlockHeaderCmd struct {
182 Verbose *bool `jsonrpcdefault:"true"`
185 // NewGetBlockHeaderCmd returns a new instance which can be used to issue a
186 // getblockheader JSON-RPC command.
187 func NewGetBlockHeaderCmd(hash string, verbose *bool) *GetBlockHeaderCmd {
188 return &GetBlockHeaderCmd{
194 // TemplateRequest is a request object as defined in BIP22
195 // (https://en.bitcoin.it/wiki/BIP_0022), it is optionally provided as an
196 // pointer argument to GetBlockTemplateCmd.
197 type TemplateRequest struct {
198 Mode string `json:"mode,omitempty"`
199 Capabilities []string `json:"capabilities,omitempty"`
201 // Optional long polling.
202 LongPollID string `json:"longpollid,omitempty"`
204 // Optional template tweaking. SigOpLimit and SizeLimit can be int64
206 SigOpLimit interface{} `json:"sigoplimit,omitempty"`
207 SizeLimit interface{} `json:"sizelimit,omitempty"`
208 MaxVersion uint32 `json:"maxversion,omitempty"`
210 // Basic pool extension from BIP 0023.
211 Target string `json:"target,omitempty"`
213 // Block proposal from BIP 0023. Data is only provided when Mode is
215 Data string `json:"data,omitempty"`
216 WorkID string `json:"workid,omitempty"`
219 // convertTemplateRequestField potentially converts the provided value as
221 func convertTemplateRequestField(fieldName string, iface interface{}) (interface{}, error) {
222 switch val := iface.(type) {
228 if val == float64(int64(val)) {
229 return int64(val), nil
233 str := fmt.Sprintf("the %s field must be unspecified, a boolean, or "+
234 "a 64-bit integer", fieldName)
235 return nil, makeError(ErrInvalidType, str)
238 // UnmarshalJSON provides a custom Unmarshal method for TemplateRequest. This
239 // is necessary because the SigOpLimit and SizeLimit fields can only be specific
241 func (t *TemplateRequest) UnmarshalJSON(data []byte) error {
242 type templateRequest TemplateRequest
244 request := (*templateRequest)(t)
245 if err := json.Unmarshal(data, &request); err != nil {
249 // The SigOpLimit field can only be nil, bool, or int64.
250 val, err := convertTemplateRequestField("sigoplimit", request.SigOpLimit)
254 request.SigOpLimit = val
256 // The SizeLimit field can only be nil, bool, or int64.
257 val, err = convertTemplateRequestField("sizelimit", request.SizeLimit)
261 request.SizeLimit = val
266 // GetBlockTemplateCmd defines the getblocktemplate JSON-RPC command.
267 type GetBlockTemplateCmd struct {
268 Request *TemplateRequest
271 // NewGetBlockTemplateCmd returns a new instance which can be used to issue a
272 // getblocktemplate JSON-RPC command.
274 // The parameters which are pointers indicate they are optional. Passing nil
275 // for optional parameters will use the default value.
276 func NewGetBlockTemplateCmd(request *TemplateRequest) *GetBlockTemplateCmd {
277 return &GetBlockTemplateCmd{
282 // GetChainTipsCmd defines the getchaintips JSON-RPC command.
283 type GetChainTipsCmd struct{}
285 // NewGetChainTipsCmd returns a new instance which can be used to issue a
286 // getchaintips JSON-RPC command.
287 func NewGetChainTipsCmd() *GetChainTipsCmd {
288 return &GetChainTipsCmd{}
291 // GetConnectionCountCmd defines the getconnectioncount JSON-RPC command.
292 type GetConnectionCountCmd struct{}
294 // NewGetConnectionCountCmd returns a new instance which can be used to issue a
295 // getconnectioncount JSON-RPC command.
296 func NewGetConnectionCountCmd() *GetConnectionCountCmd {
297 return &GetConnectionCountCmd{}
300 // GetDifficultyCmd defines the getdifficulty JSON-RPC command.
301 type GetDifficultyCmd struct{}
303 // NewGetDifficultyCmd returns a new instance which can be used to issue a
304 // getdifficulty JSON-RPC command.
305 func NewGetDifficultyCmd() *GetDifficultyCmd {
306 return &GetDifficultyCmd{}
309 // GetGenerateCmd defines the getgenerate JSON-RPC command.
310 type GetGenerateCmd struct{}
312 // NewGetGenerateCmd returns a new instance which can be used to issue a
313 // getgenerate JSON-RPC command.
314 func NewGetGenerateCmd() *GetGenerateCmd {
315 return &GetGenerateCmd{}
318 // GetHashesPerSecCmd defines the gethashespersec JSON-RPC command.
319 type GetHashesPerSecCmd struct{}
321 // NewGetHashesPerSecCmd returns a new instance which can be used to issue a
322 // gethashespersec JSON-RPC command.
323 func NewGetHashesPerSecCmd() *GetHashesPerSecCmd {
324 return &GetHashesPerSecCmd{}
327 // GetInfoCmd defines the getinfo JSON-RPC command.
328 type GetInfoCmd struct{}
330 // NewGetInfoCmd returns a new instance which can be used to issue a
331 // getinfo JSON-RPC command.
332 func NewGetInfoCmd() *GetInfoCmd {
336 // GetMempoolEntryCmd defines the getmempoolentry JSON-RPC command.
337 type GetMempoolEntryCmd struct {
341 // NewGetMempoolEntryCmd returns a new instance which can be used to issue a
342 // getmempoolentry JSON-RPC command.
343 func NewGetMempoolEntryCmd(txHash string) *GetMempoolEntryCmd {
344 return &GetMempoolEntryCmd{
349 // GetMempoolInfoCmd defines the getmempoolinfo JSON-RPC command.
350 type GetMempoolInfoCmd struct{}
352 // NewGetMempoolInfoCmd returns a new instance which can be used to issue a
353 // getmempool JSON-RPC command.
354 func NewGetMempoolInfoCmd() *GetMempoolInfoCmd {
355 return &GetMempoolInfoCmd{}
358 // GetMiningInfoCmd defines the getmininginfo JSON-RPC command.
359 type GetMiningInfoCmd struct{}
361 // NewGetMiningInfoCmd returns a new instance which can be used to issue a
362 // getmininginfo JSON-RPC command.
363 func NewGetMiningInfoCmd() *GetMiningInfoCmd {
364 return &GetMiningInfoCmd{}
367 // GetNetworkInfoCmd defines the getnetworkinfo JSON-RPC command.
368 type GetNetworkInfoCmd struct{}
370 // NewGetNetworkInfoCmd returns a new instance which can be used to issue a
371 // getnetworkinfo JSON-RPC command.
372 func NewGetNetworkInfoCmd() *GetNetworkInfoCmd {
373 return &GetNetworkInfoCmd{}
376 // GetNetTotalsCmd defines the getnettotals JSON-RPC command.
377 type GetNetTotalsCmd struct{}
379 // NewGetNetTotalsCmd returns a new instance which can be used to issue a
380 // getnettotals JSON-RPC command.
381 func NewGetNetTotalsCmd() *GetNetTotalsCmd {
382 return &GetNetTotalsCmd{}
385 // GetNetworkHashPSCmd defines the getnetworkhashps JSON-RPC command.
386 type GetNetworkHashPSCmd struct {
387 Blocks *int `jsonrpcdefault:"120"`
388 Height *int `jsonrpcdefault:"-1"`
391 // NewGetNetworkHashPSCmd returns a new instance which can be used to issue a
392 // getnetworkhashps JSON-RPC command.
394 // The parameters which are pointers indicate they are optional. Passing nil
395 // for optional parameters will use the default value.
396 func NewGetNetworkHashPSCmd(numBlocks, height *int) *GetNetworkHashPSCmd {
397 return &GetNetworkHashPSCmd{
403 // GetPeerInfoCmd defines the getpeerinfo JSON-RPC command.
404 type GetPeerInfoCmd struct{}
406 // NewGetPeerInfoCmd returns a new instance which can be used to issue a getpeer
408 func NewGetPeerInfoCmd() *GetPeerInfoCmd {
409 return &GetPeerInfoCmd{}
412 // GetRawMempoolCmd defines the getmempool JSON-RPC command.
413 type GetRawMempoolCmd struct {
414 Verbose *bool `jsonrpcdefault:"false"`
417 // NewGetRawMempoolCmd returns a new instance which can be used to issue a
418 // getrawmempool JSON-RPC command.
420 // The parameters which are pointers indicate they are optional. Passing nil
421 // for optional parameters will use the default value.
422 func NewGetRawMempoolCmd(verbose *bool) *GetRawMempoolCmd {
423 return &GetRawMempoolCmd{
428 // GetRawTransactionCmd defines the getrawtransaction JSON-RPC command.
430 // NOTE: This field is an int versus a bool to remain compatible with Bitcoin
431 // Core even though it really should be a bool.
432 type GetRawTransactionCmd struct {
434 Verbose *int `jsonrpcdefault:"0"`
437 // NewGetRawTransactionCmd returns a new instance which can be used to issue a
438 // getrawtransaction JSON-RPC command.
440 // The parameters which are pointers indicate they are optional. Passing nil
441 // for optional parameters will use the default value.
442 func NewGetRawTransactionCmd(txHash string, verbose *int) *GetRawTransactionCmd {
443 return &GetRawTransactionCmd{
449 // GetTxOutCmd defines the gettxout JSON-RPC command.
450 type GetTxOutCmd struct {
453 IncludeMempool *bool `jsonrpcdefault:"true"`
456 // NewGetTxOutCmd returns a new instance which can be used to issue a gettxout
459 // The parameters which are pointers indicate they are optional. Passing nil
460 // for optional parameters will use the default value.
461 func NewGetTxOutCmd(txHash string, vout uint32, includeMempool *bool) *GetTxOutCmd {
465 IncludeMempool: includeMempool,
469 // GetTxOutProofCmd defines the gettxoutproof JSON-RPC command.
470 type GetTxOutProofCmd struct {
475 // NewGetTxOutProofCmd returns a new instance which can be used to issue a
476 // gettxoutproof JSON-RPC command.
478 // The parameters which are pointers indicate they are optional. Passing nil
479 // for optional parameters will use the default value.
480 func NewGetTxOutProofCmd(txIDs []string, blockHash *string) *GetTxOutProofCmd {
481 return &GetTxOutProofCmd{
483 BlockHash: blockHash,
487 // GetTxOutSetInfoCmd defines the gettxoutsetinfo JSON-RPC command.
488 type GetTxOutSetInfoCmd struct{}
490 // NewGetTxOutSetInfoCmd returns a new instance which can be used to issue a
491 // gettxoutsetinfo JSON-RPC command.
492 func NewGetTxOutSetInfoCmd() *GetTxOutSetInfoCmd {
493 return &GetTxOutSetInfoCmd{}
496 // GetWorkCmd defines the getwork JSON-RPC command.
497 type GetWorkCmd struct {
501 // NewGetWorkCmd returns a new instance which can be used to issue a getwork
504 // The parameters which are pointers indicate they are optional. Passing nil
505 // for optional parameters will use the default value.
506 func NewGetWorkCmd(data *string) *GetWorkCmd {
512 // HelpCmd defines the help JSON-RPC command.
513 type HelpCmd struct {
517 // NewHelpCmd returns a new instance which can be used to issue a help JSON-RPC
520 // The parameters which are pointers indicate they are optional. Passing nil
521 // for optional parameters will use the default value.
522 func NewHelpCmd(command *string) *HelpCmd {
528 // InvalidateBlockCmd defines the invalidateblock JSON-RPC command.
529 type InvalidateBlockCmd struct {
533 // NewInvalidateBlockCmd returns a new instance which can be used to issue a
534 // invalidateblock JSON-RPC command.
535 func NewInvalidateBlockCmd(blockHash string) *InvalidateBlockCmd {
536 return &InvalidateBlockCmd{
537 BlockHash: blockHash,
541 // PingCmd defines the ping JSON-RPC command.
542 type PingCmd struct{}
544 // NewPingCmd returns a new instance which can be used to issue a ping JSON-RPC
546 func NewPingCmd() *PingCmd {
550 // PreciousBlockCmd defines the preciousblock JSON-RPC command.
551 type PreciousBlockCmd struct {
555 // NewPreciousBlockCmd returns a new instance which can be used to issue a
556 // preciousblock JSON-RPC command.
557 func NewPreciousBlockCmd(blockHash string) *PreciousBlockCmd {
558 return &PreciousBlockCmd{
559 BlockHash: blockHash,
563 // ReconsiderBlockCmd defines the reconsiderblock JSON-RPC command.
564 type ReconsiderBlockCmd struct {
568 // NewReconsiderBlockCmd returns a new instance which can be used to issue a
569 // reconsiderblock JSON-RPC command.
570 func NewReconsiderBlockCmd(blockHash string) *ReconsiderBlockCmd {
571 return &ReconsiderBlockCmd{
572 BlockHash: blockHash,
576 // SearchRawTransactionsCmd defines the searchrawtransactions JSON-RPC command.
577 type SearchRawTransactionsCmd struct {
579 Verbose *int `jsonrpcdefault:"1"`
580 Skip *int `jsonrpcdefault:"0"`
581 Count *int `jsonrpcdefault:"100"`
582 VinExtra *int `jsonrpcdefault:"0"`
583 Reverse *bool `jsonrpcdefault:"false"`
584 FilterAddrs *[]string
587 // NewSearchRawTransactionsCmd returns a new instance which can be used to issue a
588 // sendrawtransaction JSON-RPC command.
590 // The parameters which are pointers indicate they are optional. Passing nil
591 // for optional parameters will use the default value.
592 func NewSearchRawTransactionsCmd(address string, verbose, skip, count *int, vinExtra *int, reverse *bool, filterAddrs *[]string) *SearchRawTransactionsCmd {
593 return &SearchRawTransactionsCmd{
600 FilterAddrs: filterAddrs,
604 // SendRawTransactionCmd defines the sendrawtransaction JSON-RPC command.
605 type SendRawTransactionCmd struct {
607 AllowHighFees *bool `jsonrpcdefault:"false"`
610 // NewSendRawTransactionCmd returns a new instance which can be used to issue a
611 // sendrawtransaction JSON-RPC command.
613 // The parameters which are pointers indicate they are optional. Passing nil
614 // for optional parameters will use the default value.
615 func NewSendRawTransactionCmd(hexTx string, allowHighFees *bool) *SendRawTransactionCmd {
616 return &SendRawTransactionCmd{
618 AllowHighFees: allowHighFees,
622 // SetGenerateCmd defines the setgenerate JSON-RPC command.
623 type SetGenerateCmd struct {
625 GenProcLimit *int `jsonrpcdefault:"-1"`
628 // NewSetGenerateCmd returns a new instance which can be used to issue a
629 // setgenerate JSON-RPC command.
631 // The parameters which are pointers indicate they are optional. Passing nil
632 // for optional parameters will use the default value.
633 func NewSetGenerateCmd(generate bool, genProcLimit *int) *SetGenerateCmd {
634 return &SetGenerateCmd{
636 GenProcLimit: genProcLimit,
640 // StopCmd defines the stop JSON-RPC command.
641 type StopCmd struct{}
643 // NewStopCmd returns a new instance which can be used to issue a stop JSON-RPC
645 func NewStopCmd() *StopCmd {
649 // SubmitBlockOptions represents the optional options struct provided with a
650 // SubmitBlockCmd command.
651 type SubmitBlockOptions struct {
652 // must be provided if server provided a workid with template.
653 WorkID string `json:"workid,omitempty"`
656 // SubmitBlockCmd defines the submitblock JSON-RPC command.
657 type SubmitBlockCmd struct {
659 Options *SubmitBlockOptions
662 // NewSubmitBlockCmd returns a new instance which can be used to issue a
663 // submitblock JSON-RPC command.
665 // The parameters which are pointers indicate they are optional. Passing nil
666 // for optional parameters will use the default value.
667 func NewSubmitBlockCmd(hexBlock string, options *SubmitBlockOptions) *SubmitBlockCmd {
668 return &SubmitBlockCmd{
674 // UptimeCmd defines the uptime JSON-RPC command.
675 type UptimeCmd struct{}
677 // NewUptimeCmd returns a new instance which can be used to issue an uptime JSON-RPC command.
678 func NewUptimeCmd() *UptimeCmd {
682 // ValidateAddressCmd defines the validateaddress JSON-RPC command.
683 type ValidateAddressCmd struct {
687 // NewValidateAddressCmd returns a new instance which can be used to issue a
688 // validateaddress JSON-RPC command.
689 func NewValidateAddressCmd(address string) *ValidateAddressCmd {
690 return &ValidateAddressCmd{
695 // VerifyChainCmd defines the verifychain JSON-RPC command.
696 type VerifyChainCmd struct {
697 CheckLevel *int32 `jsonrpcdefault:"3"`
698 CheckDepth *int32 `jsonrpcdefault:"288"` // 0 = all
701 // NewVerifyChainCmd returns a new instance which can be used to issue a
702 // verifychain JSON-RPC command.
704 // The parameters which are pointers indicate they are optional. Passing nil
705 // for optional parameters will use the default value.
706 func NewVerifyChainCmd(checkLevel, checkDepth *int32) *VerifyChainCmd {
707 return &VerifyChainCmd{
708 CheckLevel: checkLevel,
709 CheckDepth: checkDepth,
713 // VerifyMessageCmd defines the verifymessage JSON-RPC command.
714 type VerifyMessageCmd struct {
720 // NewVerifyMessageCmd returns a new instance which can be used to issue a
721 // verifymessage JSON-RPC command.
722 func NewVerifyMessageCmd(address, signature, message string) *VerifyMessageCmd {
723 return &VerifyMessageCmd{
725 Signature: signature,
730 // VerifyTxOutProofCmd defines the verifytxoutproof JSON-RPC command.
731 type VerifyTxOutProofCmd struct {
735 // NewVerifyTxOutProofCmd returns a new instance which can be used to issue a
736 // verifytxoutproof JSON-RPC command.
737 func NewVerifyTxOutProofCmd(proof string) *VerifyTxOutProofCmd {
738 return &VerifyTxOutProofCmd{
744 // No special flags for commands in this file.
745 flags := UsageFlag(0)
747 MustRegisterCmd("addnode", (*AddNodeCmd)(nil), flags)
748 MustRegisterCmd("createrawtransaction", (*CreateRawTransactionCmd)(nil), flags)
749 MustRegisterCmd("decoderawtransaction", (*DecodeRawTransactionCmd)(nil), flags)
750 MustRegisterCmd("decodescript", (*DecodeScriptCmd)(nil), flags)
751 MustRegisterCmd("getaddednodeinfo", (*GetAddedNodeInfoCmd)(nil), flags)
752 MustRegisterCmd("getbestblockhash", (*GetBestBlockHashCmd)(nil), flags)
753 MustRegisterCmd("getblock", (*GetBlockCmd)(nil), flags)
754 MustRegisterCmd("getblockchaininfo", (*GetBlockChainInfoCmd)(nil), flags)
755 MustRegisterCmd("getblockcount", (*GetBlockCountCmd)(nil), flags)
756 MustRegisterCmd("getblockhash", (*GetBlockHashCmd)(nil), flags)
757 MustRegisterCmd("getblockheader", (*GetBlockHeaderCmd)(nil), flags)
758 MustRegisterCmd("getblocktemplate", (*GetBlockTemplateCmd)(nil), flags)
759 MustRegisterCmd("getchaintips", (*GetChainTipsCmd)(nil), flags)
760 MustRegisterCmd("getconnectioncount", (*GetConnectionCountCmd)(nil), flags)
761 MustRegisterCmd("getdifficulty", (*GetDifficultyCmd)(nil), flags)
762 MustRegisterCmd("getgenerate", (*GetGenerateCmd)(nil), flags)
763 MustRegisterCmd("gethashespersec", (*GetHashesPerSecCmd)(nil), flags)
764 MustRegisterCmd("getinfo", (*GetInfoCmd)(nil), flags)
765 MustRegisterCmd("getmempoolentry", (*GetMempoolEntryCmd)(nil), flags)
766 MustRegisterCmd("getmempoolinfo", (*GetMempoolInfoCmd)(nil), flags)
767 MustRegisterCmd("getmininginfo", (*GetMiningInfoCmd)(nil), flags)
768 MustRegisterCmd("getnetworkinfo", (*GetNetworkInfoCmd)(nil), flags)
769 MustRegisterCmd("getnettotals", (*GetNetTotalsCmd)(nil), flags)
770 MustRegisterCmd("getnetworkhashps", (*GetNetworkHashPSCmd)(nil), flags)
771 MustRegisterCmd("getpeerinfo", (*GetPeerInfoCmd)(nil), flags)
772 MustRegisterCmd("getrawmempool", (*GetRawMempoolCmd)(nil), flags)
773 MustRegisterCmd("getrawtransaction", (*GetRawTransactionCmd)(nil), flags)
774 MustRegisterCmd("gettxout", (*GetTxOutCmd)(nil), flags)
775 MustRegisterCmd("gettxoutproof", (*GetTxOutProofCmd)(nil), flags)
776 MustRegisterCmd("gettxoutsetinfo", (*GetTxOutSetInfoCmd)(nil), flags)
777 MustRegisterCmd("getwork", (*GetWorkCmd)(nil), flags)
778 MustRegisterCmd("help", (*HelpCmd)(nil), flags)
779 MustRegisterCmd("invalidateblock", (*InvalidateBlockCmd)(nil), flags)
780 MustRegisterCmd("ping", (*PingCmd)(nil), flags)
781 MustRegisterCmd("preciousblock", (*PreciousBlockCmd)(nil), flags)
782 MustRegisterCmd("reconsiderblock", (*ReconsiderBlockCmd)(nil), flags)
783 MustRegisterCmd("searchrawtransactions", (*SearchRawTransactionsCmd)(nil), flags)
784 MustRegisterCmd("sendrawtransaction", (*SendRawTransactionCmd)(nil), flags)
785 MustRegisterCmd("setgenerate", (*SetGenerateCmd)(nil), flags)
786 MustRegisterCmd("stop", (*StopCmd)(nil), flags)
787 MustRegisterCmd("submitblock", (*SubmitBlockCmd)(nil), flags)
788 MustRegisterCmd("uptime", (*UptimeCmd)(nil), flags)
789 MustRegisterCmd("validateaddress", (*ValidateAddressCmd)(nil), flags)
790 MustRegisterCmd("verifychain", (*VerifyChainCmd)(nil), flags)
791 MustRegisterCmd("verifymessage", (*VerifyMessageCmd)(nil), flags)
792 MustRegisterCmd("verifytxoutproof", (*VerifyTxOutProofCmd)(nil), flags)