github.com/lbryio/lbcd@v0.22.119/rpcserverhelp.go (about)

     1  // Copyright (c) 2015-2017 The btcsuite developers
     2  // Copyright (c) 2015-2017 The Decred developers
     3  // Use of this source code is governed by an ISC
     4  // license that can be found in the LICENSE file.
     5  
     6  package main
     7  
     8  import (
     9  	"errors"
    10  	"sort"
    11  	"strings"
    12  	"sync"
    13  
    14  	"github.com/lbryio/lbcd/btcjson"
    15  )
    16  
    17  // helpDescsEnUS defines the English descriptions used for the help strings.
    18  var helpDescsEnUS = map[string]string{
    19  	// DebugLevelCmd help.
    20  	"debuglevel--synopsis": "Dynamically changes the debug logging level.\n" +
    21  		"The levelspec can either a debug level or of the form:\n" +
    22  		"<subsystem>=<level>,<subsystem2>=<level2>,...\n" +
    23  		"The valid debug levels are trace, debug, info, warn, error, and critical.\n" +
    24  		"The valid subsystems are AMGR, ADXR, BCDB, BMGR, MAIN, LBRY, CHAN, DISC, PEER, RPCS, SCRP, SRVR, and TXMP.\n" +
    25  		"Finally the keyword 'show' will return a list of the available subsystems.",
    26  	"debuglevel-levelspec":   "The debug level(s) to use or the keyword 'show'",
    27  	"debuglevel--condition0": "levelspec!=show",
    28  	"debuglevel--condition1": "levelspec=show",
    29  	"debuglevel--result0":    "The string 'Done.'",
    30  	"debuglevel--result1":    "The list of subsystems",
    31  
    32  	// AddNodeCmd help.
    33  	"addnode--synopsis": "Attempts to add or remove a persistent peer.",
    34  	"addnode-addr":      "IP address and port of the peer to operate on",
    35  	"addnode-subcmd":    "'add' to add a persistent peer, 'remove' to remove a persistent peer, or 'onetry' to try a single connection to a peer",
    36  
    37  	// NodeCmd help.
    38  	"node--synopsis":     "Attempts to add or remove a peer.",
    39  	"node-subcmd":        "'disconnect' to remove all matching non-persistent peers, 'remove' to remove a persistent peer, or 'connect' to connect to a peer",
    40  	"node-target":        "Either the IP address and port of the peer to operate on, or a valid peer ID.",
    41  	"node-connectsubcmd": "'perm' to make the connected peer a permanent one, 'temp' to try a single connect to a peer",
    42  
    43  	// TransactionInput help.
    44  	"transactioninput-txid": "The hash of the input transaction",
    45  	"transactioninput-vout": "The specific output of the input transaction to redeem",
    46  
    47  	// CreateRawTransactionCmd help.
    48  	"createrawtransaction--synopsis": "Returns a new transaction spending the provided inputs and sending to the provided addresses.\n" +
    49  		"The transaction inputs are not signed in the created transaction.\n" +
    50  		"The signrawtransaction RPC command provided by wallet must be used to sign the resulting transaction.",
    51  	"createrawtransaction-inputs":         "The inputs to the transaction",
    52  	"createrawtransaction-outputs":        "JSON object with the destination addresses as keys and amounts as values",
    53  	"createrawtransaction-outputs--key":   "address or \"data\"",
    54  	"createrawtransaction-outputs--value": "value in BTC as floating point number or hex-encoded data for \"data\"",
    55  	"createrawtransaction-outputs--desc":  "The destination address as the key and the amount in LBC as the value",
    56  	"createrawtransaction-locktime":       "Locktime value; a non-zero value will also locktime-activate the inputs",
    57  	"createrawtransaction--result0":       "Hex-encoded bytes of the serialized transaction",
    58  
    59  	// ClearBannedCmd help.
    60  	"clearbanned--synopsis": "Clear all banned IPs.",
    61  
    62  	// ScriptSig help.
    63  	"scriptsig-asm": "Disassembly of the script",
    64  	"scriptsig-hex": "Hex-encoded bytes of the script",
    65  
    66  	// PrevOut help.
    67  	"prevout-addresses": "previous output addresses",
    68  	"prevout-value":     "previous output value",
    69  
    70  	// VinPrevOut help.
    71  	"vinprevout-coinbase":    "The hex-encoded bytes of the signature script (coinbase txns only)",
    72  	"vinprevout-txid":        "The hash of the origin transaction (non-coinbase txns only)",
    73  	"vinprevout-vout":        "The index of the output being redeemed from the origin transaction (non-coinbase txns only)",
    74  	"vinprevout-scriptSig":   "The signature script used to redeem the origin transaction as a JSON object (non-coinbase txns only)",
    75  	"vinprevout-txinwitness": "The witness stack of the passed input, encoded as a JSON string array",
    76  	"vinprevout-prevOut":     "Data from the origin transaction output with index vout.",
    77  	"vinprevout-sequence":    "The script sequence number",
    78  
    79  	// Vin help.
    80  	"vin-coinbase":    "The hex-encoded bytes of the signature script (coinbase txns only)",
    81  	"vin-txid":        "The hash of the origin transaction (non-coinbase txns only)",
    82  	"vin-vout":        "The index of the output being redeemed from the origin transaction (non-coinbase txns only)",
    83  	"vin-scriptSig":   "The signature script used to redeem the origin transaction as a JSON object (non-coinbase txns only)",
    84  	"vin-txinwitness": "The witness used to redeem the input encoded as a string array of its items",
    85  	"vin-sequence":    "The script sequence number",
    86  
    87  	// ScriptPubKeyResult help.
    88  	"scriptpubkeyresult-asm":       "Disassembly of the script",
    89  	"scriptpubkeyresult-hex":       "Hex-encoded bytes of the script",
    90  	"scriptpubkeyresult-reqSigs":   "The number of required signatures",
    91  	"scriptpubkeyresult-type":      "The type of the script (e.g. 'pubkeyhash')",
    92  	"scriptpubkeyresult-addresses": "The bitcoin addresses associated with this script",
    93  	"scriptpubkeyresult-issupport": "Creates a support",
    94  	"scriptpubkeyresult-isclaim":   "Creates or updates a claim",
    95  
    96  	// Vout help.
    97  	"vout-value":        "The amount in LBC",
    98  	"vout-n":            "The index of this transaction output",
    99  	"vout-scriptPubKey": "The public key script used to pay coins as a JSON object",
   100  
   101  	// TxRawDecodeResult help.
   102  	"txrawdecoderesult-txid":     "The hash of the transaction",
   103  	"txrawdecoderesult-version":  "The transaction version",
   104  	"txrawdecoderesult-locktime": "The transaction lock time",
   105  	"txrawdecoderesult-vin":      "The transaction inputs as JSON objects",
   106  	"txrawdecoderesult-vout":     "The transaction outputs as JSON objects",
   107  
   108  	// DecodeRawTransactionCmd help.
   109  	"decoderawtransaction--synopsis": "Returns a JSON object representing the provided serialized, hex-encoded transaction.",
   110  	"decoderawtransaction-hextx":     "Serialized, hex-encoded transaction",
   111  
   112  	// DecodeScriptResult help.
   113  	"decodescriptresult-asm":       "Disassembly of the script",
   114  	"decodescriptresult-reqSigs":   "The number of required signatures",
   115  	"decodescriptresult-type":      "The type of the script (e.g. 'pubkeyhash')",
   116  	"decodescriptresult-addresses": "The bitcoin addresses associated with this script",
   117  	"decodescriptresult-p2sh":      "The script hash for use in pay-to-script-hash transactions (only present if the provided redeem script is not already a pay-to-script-hash script)",
   118  
   119  	// DecodeScriptCmd help.
   120  	"decodescript--synopsis": "Returns a JSON object with information about the provided hex-encoded script.",
   121  	"decodescript-hexscript": "Hex-encoded script",
   122  
   123  	// EstimateFeeCmd help.
   124  	"estimatefee--synopsis": "Estimate the fee per kilobyte in satoshis " +
   125  		"required for a transaction to be mined before a certain number of " +
   126  		"blocks have been generated.",
   127  	"estimatefee-numblocks": "The maximum number of blocks which can be " +
   128  		"generated before the transaction is mined.",
   129  	"estimatefee--result0": "Estimated fee per kilobyte in satoshis necessary for a block to " +
   130  		"be mined in the next NumBlocks blocks.",
   131  
   132  	"estimatesmartfee--synopsis": "Estimate the fee per kilobyte in satoshis " +
   133  		"required for a transaction to be mined before a certain number of " +
   134  		"blocks have been generated. Same as estimatefee presently.",
   135  	"estimatesmartfee-conftarget": "The maximum number of blocks which can be " +
   136  		"generated before the transaction is mined.",
   137  	"estimatesmartfee-estimatemode": "Unused at present.",
   138  	"estimatesmartfee--result0": "Estimated fee per kilobyte in satoshis necessary for a block to " +
   139  		"be mined in the next ConfTarget blocks.",
   140  
   141  	// GenerateCmd help
   142  	"generate--synopsis": "Generates a set number of blocks (simnet or regtest only) and returns a JSON\n" +
   143  		" array of their hashes.",
   144  	"generate-numblocks": "Number of blocks to generate",
   145  	"generate--result0":  "The hashes, in order, of blocks generated by the call",
   146  
   147  	// GetAddedNodeInfoResultAddr help.
   148  	"getaddednodeinforesultaddr-address":   "The ip address for this DNS entry",
   149  	"getaddednodeinforesultaddr-connected": "The connection 'direction' (inbound/outbound/false)",
   150  
   151  	// GetAddedNodeInfoResult help.
   152  	"getaddednodeinforesult-addednode": "The ip address or domain of the added peer",
   153  	"getaddednodeinforesult-connected": "Whether or not the peer is currently connected",
   154  	"getaddednodeinforesult-addresses": "DNS lookup and connection information about the peer",
   155  
   156  	// GetAddedNodeInfo help.
   157  	"getaddednodeinfo--synopsis":   "Returns information about manually added (persistent) peers.",
   158  	"getaddednodeinfo-dns":         "Specifies whether the returned data is a JSON object including DNS and connection information, or just a list of added peers",
   159  	"getaddednodeinfo-node":        "Only return information about this specific peer instead of all added peers",
   160  	"getaddednodeinfo--condition0": "dns=false",
   161  	"getaddednodeinfo--condition1": "dns=true",
   162  	"getaddednodeinfo--result0":    "List of added peers",
   163  
   164  	// GetBestBlockResult help.
   165  	"getbestblockresult-hash":   "Hex-encoded bytes of the best block hash",
   166  	"getbestblockresult-height": "Height of the best block",
   167  
   168  	// GetBestBlockCmd help.
   169  	"getbestblock--synopsis": "Get block height and hash of best block in the main chain.",
   170  	"getbestblock--result0":  "Get block height and hash of best block in the main chain.",
   171  
   172  	// GetBestBlockHashCmd help.
   173  	"getbestblockhash--synopsis": "Returns the hash of the of the best (most recent) block in the longest block chain.",
   174  	"getbestblockhash--result0":  "The hex-encoded block hash",
   175  
   176  	// GetBlockCmd help.
   177  	"getblock--synopsis":   "Returns information about a block given its hash.",
   178  	"getblock-hash":        "The hash of the block",
   179  	"getblock-verbosity":   "Specifies whether the block data should be returned as a hex-encoded string (0), as parsed data with a slice of TXIDs (1), or as parsed data with parsed transaction data (2) ",
   180  	"getblock--condition0": "verbosity=0",
   181  	"getblock--condition1": "verbosity=1",
   182  	"getblock--result0":    "Hex-encoded bytes of the serialized block",
   183  
   184  	// GetBlockChainInfoCmd help.
   185  	"getblockchaininfo--synopsis": "Returns information about the current blockchain state and the status of any active soft-fork deployments.",
   186  
   187  	// GetBlockChainInfoResult help.
   188  	"getblockchaininforesult-chain":                "The name of the chain the daemon is on (testnet, mainnet, etc)",
   189  	"getblockchaininforesult-blocks":               "The number of blocks in the best known chain",
   190  	"getblockchaininforesult-headers":              "The number of headers that we've gathered for in the best known chain",
   191  	"getblockchaininforesult-bestblockhash":        "The block hash for the latest block in the main chain",
   192  	"getblockchaininforesult-difficulty":           "The current chain difficulty",
   193  	"getblockchaininforesult-mediantime":           "The median time from the PoV of the best block in the chain",
   194  	"getblockchaininforesult-verificationprogress": "An estimate for how much of the best chain we've verified",
   195  	"getblockchaininforesult-pruned":               "A bool that indicates if the node is pruned or not",
   196  	"getblockchaininforesult-pruneheight":          "The lowest block retained in the current pruned chain",
   197  	"getblockchaininforesult-chainwork":            "The total cumulative work in the best chain",
   198  	"getblockchaininforesult-size_on_disk":         "The estimated size of the block and undo files on disk",
   199  	"getblockchaininforesult-initialblockdownload": "Estimate of whether this node is in Initial Block Download mode",
   200  	"getblockchaininforesult-softforks":            "The status of the super-majority soft-forks",
   201  	"getblockchaininforesult-unifiedsoftforks":     "The status of the super-majority soft-forks used by bitcoind on or after v0.19.0",
   202  
   203  	// GetBlockStatsCmd help.
   204  	"getblockstats--synopsis":    "Returns statistics about a block given its hash or height. --txindex must be enabled for fee and feerate statistics.",
   205  	"getblockstats-hashorheight": "The hash or height of the block",
   206  	"hashorheight-value":         "The hash or height of the block",
   207  	"getblockstats-stats":        "Selected statistics",
   208  
   209  	// GetBlockStatsResult help.
   210  	"getblockstatsresult-avgfee":              "The average fee in the block",
   211  	"getblockstatsresult-avgfeerate":          "The average feerate in the block (in satoshis per virtual byte)",
   212  	"getblockstatsresult-avgtxsize":           "The average transaction size in the block",
   213  	"getblockstatsresult-blockhash":           "The block hash",
   214  	"getblockstatsresult-feerate_percentiles": "Feerates at the 10th, 25th, 50th, 75th, and 90th percentile weight unit (in satoshis per virtual byte)",
   215  	"getblockstatsresult-height":              "The block height",
   216  	"getblockstatsresult-ins":                 "The number of inputs (excluding coinbase)",
   217  	"getblockstatsresult-maxfee":              "Maxium fee in the block",
   218  	"getblockstatsresult-maxfeerate":          "Maximum feerate in the block (in satoshis per virtual byte)",
   219  	"getblockstatsresult-maxtxsize":           "Maximum transaction size",
   220  	"getblockstatsresult-medianfee":           "Truncated median fee",
   221  	"getblockstatsresult-mediantime":          "The median time from the block and its previous 10 blocks (BIP113)",
   222  	"getblockstatsresult-mediantxsize":        "Truncated median transaction size",
   223  	"getblockstatsresult-minfee":              "Minimum fee in the block",
   224  	"getblockstatsresult-minfeerate":          "Minimum feerate in the block (in satoshis per virtual byte)",
   225  	"getblockstatsresult-mintxsize":           "Minimum transaction size",
   226  	"getblockstatsresult-outs":                "The number of outputs",
   227  	"getblockstatsresult-subsidy":             "The block subsidy",
   228  	"getblockstatsresult-swtotal_size":        "Total size of all segwit transactions in the block (excluding coinbase)",
   229  	"getblockstatsresult-swtotal_weight":      "Total weight of all segwit transactions in the block (excluding coinbase)",
   230  	"getblockstatsresult-swtxs":               "The number of segwit transactions in the block (excluding coinbase)",
   231  	"getblockstatsresult-time":                "The block time",
   232  	"getblockstatsresult-total_out":           "Total amount in all outputs (excluding coinbase)",
   233  	"getblockstatsresult-total_size":          "Total size of all transactions (excluding coinbase)",
   234  	"getblockstatsresult-total_weight":        "Total weight of all transactions (excluding coinbase)",
   235  	"getblockstatsresult-totalfee":            "The total of fees",
   236  	"getblockstatsresult-txs":                 "The number of transactions (excluding coinbase)",
   237  	"getblockstatsresult-utxo_increase":       "The increase/decrease in the number of unspent outputs",
   238  	"getblockstatsresult-utxo_size_inc":       "The increase/decrease in size for the utxo index",
   239  
   240  	// SoftForkDescription help.
   241  	"softforkdescription-reject":  "The current activation status of the softfork",
   242  	"softforkdescription-version": "The block version that signals enforcement of this softfork",
   243  	"softforkdescription-id":      "The string identifier for the soft fork",
   244  	"-status":                     "A bool which indicates if the soft fork is active",
   245  
   246  	// SoftForks help.
   247  	"softforks-softforks":             "The status of the super-majority soft-forks",
   248  	"softforks-bip9_softforks":        "JSON object describing active BIP0009 deployments",
   249  	"softforks-bip9_softforks--key":   "bip9_softforks",
   250  	"softforks-bip9_softforks--value": "An object describing a particular BIP009 deployment",
   251  	"softforks-bip9_softforks--desc":  "The status of any defined BIP0009 soft-fork deployments",
   252  
   253  	// UnifiedSoftForks help.
   254  	"unifiedsoftforks-softforks":        "The status of the super-majority soft-forks used by bitcoind on or after v0.19.0",
   255  	"unifiedsoftforks-softforks--key":   "softforks",
   256  	"unifiedsoftforks-softforks--value": "An object describing an active softfork deployment used by bitcoind on or after v0.19.0",
   257  	"unifiedsoftforks-softforks--desc":  "JSON object describing an active softfork deployment used by bitcoind on or after v0.19.0",
   258  
   259  	// TxRawResult help.
   260  	"txrawresult-hex":           "Hex-encoded transaction",
   261  	"txrawresult-txid":          "The hash of the transaction",
   262  	"txrawresult-version":       "The transaction version",
   263  	"txrawresult-locktime":      "The transaction lock time",
   264  	"txrawresult-vin":           "The transaction inputs as JSON objects",
   265  	"txrawresult-vout":          "The transaction outputs as JSON objects",
   266  	"txrawresult-blockhash":     "Hash of the block the transaction is part of",
   267  	"txrawresult-confirmations": "Number of confirmations of the block",
   268  	"txrawresult-time":          "Transaction time in seconds since 1 Jan 1970 GMT",
   269  	"txrawresult-blocktime":     "Block time in seconds since the 1 Jan 1970 GMT",
   270  	"txrawresult-size":          "The size of the transaction in bytes",
   271  	"txrawresult-vsize":         "The virtual size of the transaction in bytes",
   272  	"txrawresult-weight":        "The transaction's weight (between vsize*4-3 and vsize*4)",
   273  	"txrawresult-hash":          "The wtxid of the transaction",
   274  
   275  	// SearchRawTransactionsResult help.
   276  	"searchrawtransactionsresult-hex":           "Hex-encoded transaction",
   277  	"searchrawtransactionsresult-txid":          "The hash of the transaction",
   278  	"searchrawtransactionsresult-hash":          "The wxtid of the transaction",
   279  	"searchrawtransactionsresult-version":       "The transaction version",
   280  	"searchrawtransactionsresult-locktime":      "The transaction lock time",
   281  	"searchrawtransactionsresult-vin":           "The transaction inputs as JSON objects",
   282  	"searchrawtransactionsresult-vout":          "The transaction outputs as JSON objects",
   283  	"searchrawtransactionsresult-blockhash":     "Hash of the block the transaction is part of",
   284  	"searchrawtransactionsresult-confirmations": "Number of confirmations of the block",
   285  	"searchrawtransactionsresult-time":          "Transaction time in seconds since 1 Jan 1970 GMT",
   286  	"searchrawtransactionsresult-blocktime":     "Block time in seconds since the 1 Jan 1970 GMT",
   287  	"searchrawtransactionsresult-size":          "The size of the transaction in bytes",
   288  	"searchrawtransactionsresult-vsize":         "The virtual size of the transaction in bytes",
   289  	"searchrawtransactionsresult-weight":        "The transaction's weight (between vsize*4-3 and vsize*4)",
   290  
   291  	// GetBlockVerboseResult help.
   292  	"getblockverboseresult-hash":              "The hash of the block (same as provided)",
   293  	"getblockverboseresult-confirmations":     "The number of confirmations",
   294  	"getblockverboseresult-size":              "The size of the block",
   295  	"getblockverboseresult-height":            "The height of the block in the block chain",
   296  	"getblockverboseresult-version":           "The block version",
   297  	"getblockverboseresult-versionHex":        "The block version in hexadecimal",
   298  	"getblockverboseresult-merkleroot":        "Root hash of the merkle tree",
   299  	"getblockverboseresult-nameclaimroot":     "Root hash of the claim trie",
   300  	"getblockverboseresult-tx":                "The transaction hashes (only when verbosity=1)",
   301  	"getblockverboseresult-nTx":               "The number of transactions (aka, count of TX)",
   302  	"getblockverboseresult-time":              "The block time in seconds since 1 Jan 1970 GMT",
   303  	"getblockverboseresult-mediantime":        "The median block time in seconds since 1 Jan 1970 GMT",
   304  	"getblockverboseresult-nonce":             "The block nonce",
   305  	"getblockverboseresult-bits":              "The bits which represent the block difficulty",
   306  	"getblockverboseresult-difficulty":        "The proof-of-work difficulty as a multiple of the minimum difficulty",
   307  	"getblockverboseresult-chainwork":         "Expected number of hashes required to produce the chain up to this block (in hex)",
   308  	"getblockverboseresult-previousblockhash": "The hash of the previous block",
   309  	"getblockverboseresult-nextblockhash":     "The hash of the next block (only if there is one)",
   310  	"getblockverboseresult-strippedsize":      "The size of the block without witness data",
   311  	"getblockverboseresult-weight":            "The weight of the block",
   312  
   313  	// GetBlockCountCmd help.
   314  	"getblockcount--synopsis": "Returns the number of blocks in the longest block chain.",
   315  	"getblockcount--result0":  "The current block count",
   316  
   317  	// GetBlockHashCmd help.
   318  	"getblockhash--synopsis": "Returns hash of the block in best block chain at the given height.",
   319  	"getblockhash-index":     "The block height",
   320  	"getblockhash--result0":  "The block hash",
   321  
   322  	// GetBlockHeaderCmd help.
   323  	"getblockheader--synopsis":   "Returns information about a block header given its hash.",
   324  	"getblockheader-hash":        "The hash of the block",
   325  	"getblockheader-verbose":     "Specifies the block header is returned as a JSON object instead of hex-encoded string",
   326  	"getblockheader--condition0": "verbose=false",
   327  	"getblockheader--condition1": "verbose=true",
   328  	"getblockheader--result0":    "The block header hash",
   329  
   330  	// GetBlockHeaderVerboseResult help.
   331  	"getblockheaderverboseresult-hash":              "The hash of the block (same as provided)",
   332  	"getblockheaderverboseresult-confirmations":     "The number of confirmations",
   333  	"getblockheaderverboseresult-height":            "The height of the block in the block chain",
   334  	"getblockheaderverboseresult-version":           "The block version",
   335  	"getblockheaderverboseresult-versionHex":        "The block version in hexadecimal",
   336  	"getblockheaderverboseresult-merkleroot":        "Root hash of the merkle tree",
   337  	"getblockheaderverboseresult-time":              "The block time in seconds since 1 Jan 1970 GMT",
   338  	"getblockheaderverboseresult-nonce":             "The block nonce",
   339  	"getblockheaderverboseresult-bits":              "The bits which represent the block difficulty",
   340  	"getblockheaderverboseresult-difficulty":        "The proof-of-work difficulty as a multiple of the minimum difficulty",
   341  	"getblockheaderverboseresult-previousblockhash": "The hash of the previous block",
   342  	"getblockheaderverboseresult-nextblockhash":     "The hash of the next block (only if there is one)",
   343  	"getblockheaderverboseresult-nameclaimroot":     "The hash of the root of the claim trie",
   344  
   345  	// TemplateRequest help.
   346  	"templaterequest-mode":         "This is 'template', 'proposal', or omitted",
   347  	"templaterequest-capabilities": "List of capabilities",
   348  	"templaterequest-longpollid":   "The long poll ID of a job to monitor for expiration; required and valid only for long poll requests ",
   349  	"templaterequest-sigoplimit":   "Number of signature operations allowed in blocks (this parameter is ignored)",
   350  	"templaterequest-sizelimit":    "Number of bytes allowed in blocks (this parameter is ignored)",
   351  	"templaterequest-maxversion":   "Highest supported block version number (this parameter is ignored)",
   352  	"templaterequest-target":       "The desired target for the block template (this parameter is ignored)",
   353  	"templaterequest-data":         "Hex-encoded block data (only for mode=proposal)",
   354  	"templaterequest-workid":       "The server provided workid if provided in block template (not applicable)",
   355  	"templaterequest-rules":        "Specific block rules that are to be enforced e.g. '[\"segwit\"]",
   356  
   357  	// GetBlockTemplateResultTx help.
   358  	"getblocktemplateresulttx-data":    "Hex-encoded transaction data (byte-for-byte)",
   359  	"getblocktemplateresulttx-hash":    "Hex-encoded transaction hash (little endian if treated as a 256-bit number)",
   360  	"getblocktemplateresulttx-depends": "Other transactions before this one (by 1-based index in the 'transactions'  list) that must be present in the final block if this one is",
   361  	"getblocktemplateresulttx-fee":     "Difference in value between transaction inputs and outputs (in Satoshi)",
   362  	"getblocktemplateresulttx-sigops":  "Total number of signature operations as counted for purposes of block limits",
   363  	"getblocktemplateresulttx-txid":    "The transaction id, can be different from hash.",
   364  	"getblocktemplateresulttx-weight":  "The weight of the transaction",
   365  
   366  	// GetBlockTemplateResultAux help.
   367  	"getblocktemplateresultaux-flags": "Hex-encoded byte-for-byte data to include in the coinbase signature script",
   368  
   369  	// GetBlockTemplateResult help.
   370  	"getblocktemplateresult-bits":                       "Hex-encoded compressed difficulty",
   371  	"getblocktemplateresult-curtime":                    "Current time as seen by the server (recommended for block time); must fall within mintime/maxtime rules",
   372  	"getblocktemplateresult-height":                     "Height of the block to be solved",
   373  	"getblocktemplateresult-previousblockhash":          "Hex-encoded big-endian hash of the previous block",
   374  	"getblocktemplateresult-sigoplimit":                 "Number of sigops allowed in blocks ",
   375  	"getblocktemplateresult-sizelimit":                  "Number of bytes allowed in blocks",
   376  	"getblocktemplateresult-transactions":               "Array of transactions as JSON objects",
   377  	"getblocktemplateresult-version":                    "The block version",
   378  	"getblocktemplateresult-coinbaseaux":                "Data that should be included in the coinbase signature script",
   379  	"getblocktemplateresult-coinbasetxn":                "Information about the coinbase transaction",
   380  	"getblocktemplateresult-coinbasevalue":              "Total amount available for the coinbase in Satoshi",
   381  	"getblocktemplateresult-workid":                     "This value must be returned with result if provided (not provided)",
   382  	"getblocktemplateresult-longpollid":                 "Identifier for long poll request which allows monitoring for expiration",
   383  	"getblocktemplateresult-longpolluri":                "An alternate URI to use for long poll requests if provided (not provided)",
   384  	"getblocktemplateresult-submitold":                  "Not applicable",
   385  	"getblocktemplateresult-target":                     "Hex-encoded big-endian number which valid results must be less than",
   386  	"getblocktemplateresult-expires":                    "Maximum number of seconds (starting from when the server sent the response) this work is valid for",
   387  	"getblocktemplateresult-maxtime":                    "Maximum allowed time",
   388  	"getblocktemplateresult-mintime":                    "Minimum allowed time",
   389  	"getblocktemplateresult-mutable":                    "List of mutations the server explicitly allows",
   390  	"getblocktemplateresult-noncerange":                 "Two concatenated hex-encoded big-endian 32-bit integers which represent the valid ranges of nonces the miner may scan",
   391  	"getblocktemplateresult-capabilities":               "List of server capabilities including 'proposal' to indicate support for block proposals",
   392  	"getblocktemplateresult-reject-reason":              "Reason the proposal was invalid as-is (only applies to proposal responses)",
   393  	"getblocktemplateresult-default_witness_commitment": "The witness commitment itself. Will be populated if the block has witness data",
   394  	"getblocktemplateresult-weightlimit":                "The current limit on the max allowed weight of a block",
   395  	"getblocktemplateresult-rules":                      "Rules that are required to process the output",
   396  	"getblocktemplateresult-claimtrie":                  "The hash of the root of the claim trie - a necessary block header",
   397  
   398  	// GetBlockTemplateCmd help.
   399  	"getblocktemplate--synopsis": "Returns a JSON object with information necessary to construct a block to mine or accepts a proposal to validate.\n" +
   400  		"See BIP0022 and BIP0023 for the full specification.",
   401  	"getblocktemplate-request":     "Request object which controls the mode and several parameters",
   402  	"getblocktemplate--condition0": "mode=template",
   403  	"getblocktemplate--condition1": "mode=proposal, rejected",
   404  	"getblocktemplate--condition2": "mode=proposal, accepted",
   405  	"getblocktemplate--result1":    "An error string which represents why the proposal was rejected or nothing if accepted",
   406  
   407  	// GetChainTips help.
   408  	"getchaintips--synopsis": "Returns information about all known chain tips the in the block tree.\n\n" +
   409  		"The statuses in the result have the following meanings:\n" +
   410  		"active: The current best chain tip.\n" +
   411  		"invalid: The block or one of its ancestors is invalid.\n" +
   412  		"headers-only: The block or one of its ancestors does not have the full block data available which also means the block can't be validated or connected.\n" +
   413  		"valid-fork: The block is fully validated which implies it was probably part of the main chain at one point and was reorganized.\n" +
   414  		"valid-headers: The full block data is available and the header is valid, but the block was never validated which implies it was probably never part of the main chain.",
   415  
   416  	// GetChainTipsResult help.
   417  	"getchaintipsresult-height":    "The height of the chain tip",
   418  	"getchaintipsresult-hash":      "The block hash of the chain tip",
   419  	"getchaintipsresult-branchlen": "The length of the branch that connects the tip to the main chain (0 for the main chain tip)",
   420  	"getchaintipsresult-status":    "The status of the chain (active, invalid, headers-only, valid-fork, valid-headers)",
   421  	"getchaintipsresults--result0": "test",
   422  
   423  	// GetCFilterCmd help.
   424  	"getcfilter--synopsis":  "Returns a block's committed filter given its hash.",
   425  	"getcfilter-filtertype": "The type of filter to return (0=regular)",
   426  	"getcfilter-hash":       "The hash of the block",
   427  	"getcfilter--result0":   "The block's committed filter",
   428  
   429  	// GetCFilterHeaderCmd help.
   430  	"getcfilterheader--synopsis":  "Returns a block's compact filter header given its hash.",
   431  	"getcfilterheader-filtertype": "The type of filter header to return (0=regular)",
   432  	"getcfilterheader-hash":       "The hash of the block",
   433  	"getcfilterheader--result0":   "The block's gcs filter header",
   434  
   435  	// GetConnectionCountCmd help.
   436  	"getconnectioncount--synopsis": "Returns the number of active connections to other peers.",
   437  	"getconnectioncount--result0":  "The number of connections",
   438  
   439  	// GetCurrentNetCmd help.
   440  	"getcurrentnet--synopsis": "Get bitcoin network the server is running on.",
   441  	"getcurrentnet--result0":  "The network identifer",
   442  
   443  	// GetDifficultyCmd help.
   444  	"getdifficulty--synopsis": "Returns the proof-of-work difficulty as a multiple of the minimum difficulty.",
   445  	"getdifficulty--result0":  "The difficulty",
   446  
   447  	// GetGenerateCmd help.
   448  	"getgenerate--synopsis": "Returns if the server is set to generate coins (mine) or not.",
   449  	"getgenerate--result0":  "True if mining, false if not",
   450  
   451  	// GetHashesPerSecCmd help.
   452  	"gethashespersec--synopsis": "Returns a recent hashes per second performance measurement while generating coins (mining).",
   453  	"gethashespersec--result0":  "The number of hashes per second",
   454  
   455  	// InfoChainResult help.
   456  	"infochainresult-version":         "The version of the server",
   457  	"infochainresult-protocolversion": "The latest supported protocol version",
   458  	"infochainresult-blocks":          "The number of blocks processed",
   459  	"infochainresult-timeoffset":      "The time offset",
   460  	"infochainresult-connections":     "The number of connected peers",
   461  	"infochainresult-proxy":           "The proxy used by the server",
   462  	"infochainresult-difficulty":      "The current target difficulty",
   463  	"infochainresult-testnet":         "Whether or not server is using testnet",
   464  	"infochainresult-relayfee":        "The minimum relay fee for non-free transactions in LBC/KB",
   465  	"infochainresult-errors":          "Any current errors",
   466  
   467  	// InfoWalletResult help.
   468  	"infowalletresult-version":         "The version of the server",
   469  	"infowalletresult-protocolversion": "The latest supported protocol version",
   470  	"infowalletresult-walletversion":   "The version of the wallet server",
   471  	"infowalletresult-balance":         "The total bitcoin balance of the wallet",
   472  	"infowalletresult-blocks":          "The number of blocks processed",
   473  	"infowalletresult-timeoffset":      "The time offset",
   474  	"infowalletresult-connections":     "The number of connected peers",
   475  	"infowalletresult-proxy":           "The proxy used by the server",
   476  	"infowalletresult-difficulty":      "The current target difficulty",
   477  	"infowalletresult-testnet":         "Whether or not server is using testnet",
   478  	"infowalletresult-keypoololdest":   "Seconds since 1 Jan 1970 GMT of the oldest pre-generated key in the key pool",
   479  	"infowalletresult-keypoolsize":     "The number of new keys that are pre-generated",
   480  	"infowalletresult-unlocked_until":  "The timestamp in seconds since 1 Jan 1970 GMT that the wallet is unlocked for transfers, or 0 if the wallet is locked",
   481  	"infowalletresult-paytxfee":        "The transaction fee set in LBC/KB",
   482  	"infowalletresult-relayfee":        "The minimum relay fee for non-free transactions in LBC/KB",
   483  	"infowalletresult-errors":          "Any current errors",
   484  
   485  	// GetHeadersCmd help.
   486  	"getheaders--synopsis":     "Returns block headers starting with the first known block hash from the request",
   487  	"getheaders-blocklocators": "JSON array of hex-encoded hashes of blocks.  Headers are returned starting from the first known hash in this list",
   488  	"getheaders-hashstop":      "Block hash to stop including block headers for; if not found, all headers to the latest known block are returned.",
   489  	"getheaders--result0":      "Serialized block headers of all located blocks, limited to some arbitrary maximum number of hashes (currently 2000, which matches the wire protocol headers message, but this is not guaranteed)",
   490  
   491  	// GetInfoCmd help.
   492  	"getinfo--synopsis": "Returns a JSON object containing various state info.",
   493  
   494  	// GetMempoolInfoCmd help.
   495  	"getmempoolinfo--synopsis": "Returns memory pool information",
   496  
   497  	// GetMempoolInfoResult help.
   498  	"getmempoolinforesult-bytes":            "Size in bytes of the mempool",
   499  	"getmempoolinforesult-size":             "Number of transactions in the mempool",
   500  	"getmempoolinforesult-usage":            "Total memory usage for the mempool",
   501  	"getmempoolinforesult-total_fee":        "Total fees for the mempool in LBC, ignoring modified fees through prioritizetransaction",
   502  	"getmempoolinforesult-mempoolminfee":    "Minimum fee rate in LBC/kvB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee",
   503  	"getmempoolinforesult-minrelaytxfee":    "Current minimum relay fee for transactions",
   504  	"getmempoolinforesult-unbroadcastcount": "Current number of transactions that haven't passed initial broadcast yet",
   505  
   506  	// GetMiningInfoResult help.
   507  	"getmininginforesult-blocks":             "Height of the latest best block",
   508  	"getmininginforesult-currentblocksize":   "Size of the latest best block",
   509  	"getmininginforesult-currentblockweight": "Weight of the latest best block",
   510  	"getmininginforesult-currentblocktx":     "Number of transactions in the latest best block",
   511  	"getmininginforesult-difficulty":         "Current target difficulty",
   512  	"getmininginforesult-errors":             "Any current errors",
   513  	"getmininginforesult-generate":           "Whether or not server is set to generate coins",
   514  	"getmininginforesult-genproclimit":       "Number of processors to use for coin generation (-1 when disabled)",
   515  	"getmininginforesult-hashespersec":       "Recent hashes per second performance measurement while generating coins",
   516  	"getmininginforesult-networkhashps":      "Estimated network hashes per second for the most recent blocks",
   517  	"getmininginforesult-pooledtx":           "Number of transactions in the memory pool",
   518  	"getmininginforesult-testnet":            "Whether or not server is using testnet",
   519  
   520  	"mempoolfees-base":       "Transaction fee in LBC",
   521  	"mempoolfees-modified":   "Transaction fee with fee deltas used for mining priority in LBC",
   522  	"mempoolfees-ancestor":   "Modified fees (see above) of in-mempool ancestors (including this one) in LBC",
   523  	"mempoolfees-descendant": "modified fees (see above) of in-mempool descendants (including this one) in LBC",
   524  
   525  	// GetMempoolEntryCmd help.
   526  	"getmempoolentry--synopsis": "Returns mempool data for given transaction.",
   527  	"getmempoolentry-txid":      "The hash of the transaction",
   528  
   529  	// GetMempoolEntryResult help.
   530  	"getmempoolentryresult-vsize":           "Virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.",
   531  	"getmempoolentryresult-size":            "(DEPRECATED) same as vsize. ",
   532  	"getmempoolentryresult-weight":          "Transaction weight as defined in BIP 141.",
   533  	"getmempoolentryresult-fee":             "(DEPRECATED)Transaction fee in LBC",
   534  	"getmempoolentryresult-modifiedfee":     "(DEPRECATED)Transaction fee with fee deltas used for mining priority",
   535  	"getmempoolentryresult-time":            "Local time transaction entered pool in seconds since 1 Jan 1970 GMT",
   536  	"getmempoolentryresult-height":          "Block height when transaction entered pool",
   537  	"getmempoolentryresult-descendantcount": "Number of in-mempool descendant transactions (including this one)",
   538  	"getmempoolentryresult-descendantsize":  "Virtual transaction size of in-mempool descendants (including this one)",
   539  	"getmempoolentryresult-descendantfees":  "(DEPRECATED)Modified fees (see above) of in-mempool descendants (including this one)",
   540  	"getmempoolentryresult-ancestorcount":   "Number of in-mempool ancestor transactions (including this one)",
   541  	"getmempoolentryresult-ancestorsize":    "Virtual transaction size of in-mempool ancestors (including this one)",
   542  	"getmempoolentryresult-ancestorfees":    "(DEPRECATED)Modified fees (see above) of in-mempool ancestors (including this one)",
   543  	"getmempoolentryresult-wtxid":           "hash of serialized transaction, including witness data",
   544  	"getmempoolentryresult-fees":            "(json object)",
   545  	"getmempoolentryresult-depends":         "Unconfirmed transactions used as inputs for this transaction",
   546  	"getmempoolentryresult-spentby":         "Unconfirmed transactions spending outputs from this transaction",
   547  
   548  	// GetMiningInfoCmd help.
   549  	"getmininginfo--synopsis": "Returns a JSON object containing mining-related information.",
   550  
   551  	// GetNetworkHashPSCmd help.
   552  	"getnetworkhashps--synopsis": "Returns the estimated network hashes per second for the block heights provided by the parameters.",
   553  	"getnetworkhashps-blocks":    "The number of blocks, or -1 for blocks since last difficulty change",
   554  	"getnetworkhashps-height":    "Perform estimate ending with this height or -1 for current best chain block height",
   555  	"getnetworkhashps--result0":  "Estimated hashes per second",
   556  
   557  	// GetNetworkInfo help.
   558  	"getnetworkinfo--synopsis":       "Returns an object containing various state info regarding P2P networking.",
   559  	"getnetworkinfo--result0--desc":  "GetNetworkInfo object",
   560  	"getnetworkinfo--result0--key":   "Field name",
   561  	"getnetworkinfo--result0--value": "Object containing the network info",
   562  
   563  	// GetNetworkInfoResult help.
   564  	"getnetworkinforesult-version":         "The server version",
   565  	"getnetworkinforesult-subversion":      "The server subversion string",
   566  	"getnetworkinforesult-protocolversion": "The protocol version",
   567  	"getnetworkinforesult-localservices":   "The services we offer to the network",
   568  	"getnetworkinforesult-localrelay":      "True if transaction relay is requested from peers",
   569  	"getnetworkinforesult-timeoffset":      "The time offset",
   570  	"getnetworkinforesult-connections":     "The number of connections",
   571  	"getnetworkinforesult-networkactive":   "Whether p2p networking is enabled",
   572  	"getnetworkinforesult-networks":        "Information per network",
   573  	"getnetworkinforesult-relayfee":        "Minimum relay fee for transactions in BTC/kB",
   574  	"getnetworkinforesult-incrementalfee":  "Minimum fee increment for mempool limiting or BIP 125 replacement in BTC/kB",
   575  	"getnetworkinforesult-localaddresses":  "List of local addresses",
   576  	"getnetworkinforesult-warnings":        "Any network and blockchain warnings",
   577  
   578  	// GetNetTotalsCmd help.
   579  	"getnettotals--synopsis": "Returns a JSON object containing network traffic statistics.",
   580  
   581  	// GetNetTotalsResult help.
   582  	"getnettotalsresult-totalbytesrecv": "Total bytes received",
   583  	"getnettotalsresult-totalbytessent": "Total bytes sent",
   584  	"getnettotalsresult-timemillis":     "Number of milliseconds since 1 Jan 1970 GMT",
   585  
   586  	// GetNodeAddressesResult help.
   587  	"getnodeaddressesresult-time":     "Timestamp in seconds since epoch (Jan 1 1970 GMT) keeping track of when the node was last seen",
   588  	"getnodeaddressesresult-services": "The services offered",
   589  	"getnodeaddressesresult-address":  "The address of the node",
   590  	"getnodeaddressesresult-port":     "The port of the node",
   591  
   592  	// GetNodeAddressesCmd help.
   593  	"getnodeaddresses--synopsis": "Return known addresses which can potentially be used to find new nodes in the network",
   594  	"getnodeaddresses-count":     "How many addresses to return. Limited to the smaller of 2500 or 23% of all known addresses",
   595  	"getnodeaddresses--result0":  "List of node addresses",
   596  
   597  	// GetPeerInfoResult help.
   598  	"getpeerinforesult-id":             "A unique node ID",
   599  	"getpeerinforesult-addr":           "The ip address and port of the peer",
   600  	"getpeerinforesult-addrlocal":      "Local address",
   601  	"getpeerinforesult-services":       "Services bitmask which represents the services supported by the peer",
   602  	"getpeerinforesult-relaytxes":      "Peer has requested transactions be relayed to it",
   603  	"getpeerinforesult-lastsend":       "Time the last message was received in seconds since 1 Jan 1970 GMT",
   604  	"getpeerinforesult-lastrecv":       "Time the last message was sent in seconds since 1 Jan 1970 GMT",
   605  	"getpeerinforesult-bytessent":      "Total bytes sent",
   606  	"getpeerinforesult-bytesrecv":      "Total bytes received",
   607  	"getpeerinforesult-conntime":       "Time the connection was made in seconds since 1 Jan 1970 GMT",
   608  	"getpeerinforesult-timeoffset":     "The time offset of the peer",
   609  	"getpeerinforesult-pingtime":       "Number of microseconds the last ping took",
   610  	"getpeerinforesult-pingwait":       "Number of microseconds a queued ping has been waiting for a response",
   611  	"getpeerinforesult-version":        "The protocol version of the peer",
   612  	"getpeerinforesult-subver":         "The user agent of the peer",
   613  	"getpeerinforesult-inbound":        "Whether or not the peer is an inbound connection",
   614  	"getpeerinforesult-startingheight": "The latest block height the peer knew about when the connection was established",
   615  	"getpeerinforesult-currentheight":  "The current height of the peer",
   616  	"getpeerinforesult-banscore":       "The ban score",
   617  	"getpeerinforesult-feefilter":      "The requested minimum fee a transaction must have to be announced to the peer",
   618  	"getpeerinforesult-syncnode":       "Whether or not the peer is the sync peer",
   619  
   620  	// GetPeerInfoCmd help.
   621  	"getpeerinfo--synopsis": "Returns data about each connected network peer as an array of json objects.",
   622  
   623  	// GetRawMempoolVerboseResult help.
   624  	"getrawmempoolverboseresult-size":             "Transaction size in bytes",
   625  	"getrawmempoolverboseresult-fee":              "Transaction fee in bitcoins",
   626  	"getrawmempoolverboseresult-time":             "Local time transaction entered pool in seconds since 1 Jan 1970 GMT",
   627  	"getrawmempoolverboseresult-height":           "Block height when transaction entered the pool",
   628  	"getrawmempoolverboseresult-startingpriority": "Priority when transaction entered the pool",
   629  	"getrawmempoolverboseresult-currentpriority":  "Current priority",
   630  	"getrawmempoolverboseresult-depends":          "Unconfirmed transactions used as inputs for this transaction",
   631  	"getrawmempoolverboseresult-vsize":            "The virtual size of a transaction",
   632  	"getrawmempoolverboseresult-weight":           "The transaction's weight (between vsize*4-3 and vsize*4)",
   633  
   634  	// GetRawMempoolCmd help.
   635  	"getrawmempool--synopsis":   "Returns information about all of the transactions currently in the memory pool.",
   636  	"getrawmempool-verbose":     "Returns JSON object when true or an array of transaction hashes when false",
   637  	"getrawmempool--condition0": "verbose=false",
   638  	"getrawmempool--condition1": "verbose=true",
   639  	"getrawmempool--result0":    "Array of transaction hashes",
   640  
   641  	// GetRawTransactionCmd help.
   642  	"getrawtransaction--synopsis":   "Returns information about a transaction given its hash.",
   643  	"getrawtransaction-txid":        "The hash of the transaction",
   644  	"getrawtransaction-verbose":     "Specifies the transaction is returned as a JSON object instead of a hex-encoded string",
   645  	"getrawtransaction--condition0": "verbose=false",
   646  	"getrawtransaction--condition1": "verbose=true",
   647  	"getrawtransaction--result0":    "Hex-encoded bytes of the serialized transaction",
   648  
   649  	// GetTxOutResult help.
   650  	"gettxoutresult-bestblock":     "The block hash that contains the transaction output",
   651  	"gettxoutresult-confirmations": "The number of confirmations",
   652  	"gettxoutresult-value":         "The transaction amount in LBC",
   653  	"gettxoutresult-scriptPubKey":  "The public key script used to pay coins as a JSON object",
   654  	"gettxoutresult-version":       "The transaction version",
   655  	"gettxoutresult-coinbase":      "Whether or not the transaction is a coinbase",
   656  
   657  	// GetTxOutCmd help.
   658  	"gettxout--synopsis":      "Returns information about an unspent transaction output.",
   659  	"gettxout-txid":           "The hash of the transaction",
   660  	"gettxout-vout":           "The index of the output",
   661  	"gettxout-includemempool": "Include the mempool when true",
   662  
   663  	// HelpCmd help.
   664  	"help--synopsis":   "Returns a list of all commands or help for a specified command.",
   665  	"help-command":     "The command to retrieve help for",
   666  	"help--condition0": "no command provided",
   667  	"help--condition1": "command specified",
   668  	"help--result0":    "List of commands",
   669  	"help--result1":    "Help for specified command",
   670  
   671  	// InvalidateBlockCmd
   672  	"invalidateblock--synopsis": "Invalidate a block.",
   673  	"invalidateblock-blockhash": "Hash of the block you want to invalidate",
   674  
   675  	// PingCmd help.
   676  	"ping--synopsis": "Queues a ping to be sent to each connected peer.\n" +
   677  		"Ping times are provided by getpeerinfo via the pingtime and pingwait fields.",
   678  
   679  	// ListBannedCmd help.
   680  	"listbanned--synopsis": "List all banned IPs.",
   681  
   682  	// ListBannedResult help.
   683  	"listbannedresult-address":        "The IP of the banned node.",
   684  	"listbannedresult-ban_created":    "The UNIX epoch time the ban was created.",
   685  	"listbannedresult-banned_until":   "The UNIX epoch time the ban expires.",
   686  	"listbannedresult-ban_duration":   "The duration of the ban, in seconds.",
   687  	"listbannedresult-time_remaining": "The time remaining on the ban, in seconds",
   688  
   689  	// ReconsiderBlockCmd
   690  	"reconsiderblock--synopsis": "Reconsider a block for validation.",
   691  	"reconsiderblock-blockhash": "Hash of the block you want to reconsider",
   692  
   693  	// SearchRawTransactionsCmd help.
   694  	"searchrawtransactions--synopsis": "Returns raw data for transactions involving the passed address.\n" +
   695  		"Returned transactions are pulled from both the database, and transactions currently in the mempool.\n" +
   696  		"Transactions pulled from the mempool will have the 'confirmations' field set to 0.\n" +
   697  		"Usage of this RPC requires the optional --addrindex flag to be activated, otherwise all responses will simply return with an error stating the address index has not yet been built.\n" +
   698  		"Similarly, until the address index has caught up with the current best height, all requests will return an error response in order to avoid serving stale data.",
   699  	"searchrawtransactions-address":     "The Bitcoin address to search for",
   700  	"searchrawtransactions-verbose":     "Specifies the transaction is returned as a JSON object instead of hex-encoded string",
   701  	"searchrawtransactions--condition0": "verbose=0",
   702  	"searchrawtransactions--condition1": "verbose=1",
   703  	"searchrawtransactions-skip":        "The number of leading transactions to leave out of the final response",
   704  	"searchrawtransactions-count":       "The maximum number of transactions to return",
   705  	"searchrawtransactions-vinextra":    "Specify that extra data from previous output will be returned in vin",
   706  	"searchrawtransactions-reverse":     "Specifies that the transactions should be returned in reverse chronological order",
   707  	"searchrawtransactions-filteraddrs": "Address list.  Only inputs or outputs with matching address will be returned",
   708  	"searchrawtransactions--result0":    "Hex-encoded serialized transaction",
   709  
   710  	// SendRawTransactionCmd help.
   711  	"sendrawtransaction--synopsis":    "Submits the serialized, hex-encoded transaction to the local peer and relays it to the network.",
   712  	"sendrawtransaction-hextx":        "Serialized, hex-encoded signed transaction",
   713  	"sendrawtransaction-feesetting":   "Whether or not to allow insanely high fees in bitcoind < v0.19.0 or the max fee rate for bitcoind v0.19.0 and later (lbcd does not yet implement this parameter, so it has no effect)",
   714  	"sendrawtransaction--result0":     "The hash of the transaction",
   715  	"allowhighfeesormaxfeerate-value": "Either the boolean value for the allowhighfees parameter in bitcoind < v0.19.0 or the numerical value for the maxfeerate field in bitcoind v0.19.0 and later",
   716  
   717  	// SetBanCmd help.
   718  	"setban--synopsis": "Add or remove an IP from the banned list. (Currently, subnet is not supported.)",
   719  	"setban-addr":      "The IP to ban. (Currently, subnet is not supported.)",
   720  	"setban-subcmd":    "'add' to add an IP to the list, 'remove' to remove an IP from the list",
   721  	"setban-bantime":   "Time in seconds the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)",
   722  	"setban-absolute":  "If set, the bantime must be an absolute timestamp expressed in UNIX epoch time; default to false.",
   723  
   724  	// SetGenerateCmd help.
   725  	"setgenerate--synopsis":    "Set the server to generate coins (mine) or not.",
   726  	"setgenerate-generate":     "Use true to enable generation, false to disable it",
   727  	"setgenerate-genproclimit": "The number of processors (cores) to limit generation to or -1 for default",
   728  
   729  	// SignMessageWithPrivKeyCmd help.
   730  	"signmessagewithprivkey--synopsis": "Sign a message with the private key of an address",
   731  	"signmessagewithprivkey-privkey":   "The private key to sign the message with",
   732  	"signmessagewithprivkey-message":   "The message to create a signature of",
   733  	"signmessagewithprivkey--result0":  "The signature of the message encoded in base 64",
   734  
   735  	// StopCmd help.
   736  	"stop--synopsis": "Shutdown lbcd.",
   737  	"stop--result0":  "The string 'lbcd stopping.'",
   738  
   739  	// SubmitBlockOptions help.
   740  	"submitblockoptions-workid": "This parameter is currently ignored",
   741  
   742  	// SubmitBlockCmd help.
   743  	"submitblock--synopsis":   "Attempts to submit a new serialized, hex-encoded block to the network.",
   744  	"submitblock-hexblock":    "Serialized, hex-encoded block",
   745  	"submitblock-options":     "This parameter is currently ignored",
   746  	"submitblock--condition0": "Block successfully submitted",
   747  	"submitblock--condition1": "Block rejected",
   748  	"submitblock--result1":    "The reason the block was rejected",
   749  
   750  	// ValidateAddressResult help.
   751  	"validateaddresschainresult-isvalid":         "Whether or not the address is valid",
   752  	"validateaddresschainresult-address":         "The bitcoin address (only when isvalid is true)",
   753  	"validateaddresschainresult-isscript":        "If the key is a script",
   754  	"validateaddresschainresult-iswitness":       "If the address is a witness address",
   755  	"validateaddresschainresult-witness_version": "The version number of the witness program",
   756  	"validateaddresschainresult-witness_program": "The hex value of the witness program",
   757  
   758  	// ValidateAddressCmd help.
   759  	"validateaddress--synopsis": "Verify an address is valid.",
   760  	"validateaddress-address":   "Bitcoin address to validate",
   761  
   762  	// VerifyChainCmd help.
   763  	"verifychain--synopsis": "Verifies the block chain database.\n" +
   764  		"The actual checks performed by the checklevel parameter are implementation specific.\n" +
   765  		"For lbcd this is:\n" +
   766  		"checklevel=0 - Look up each block and ensure it can be loaded from the database.\n" +
   767  		"checklevel=1 - Perform basic context-free sanity checks on each block.",
   768  	"verifychain-checklevel": "How thorough the block verification is",
   769  	"verifychain-checkdepth": "The number of blocks to check",
   770  	"verifychain--result0":   "Whether or not the chain verified",
   771  
   772  	// VerifyMessageCmd help.
   773  	"verifymessage--synopsis": "Verify a signed message.",
   774  	"verifymessage-address":   "The bitcoin address to use for the signature",
   775  	"verifymessage-signature": "The base-64 encoded signature provided by the signer",
   776  	"verifymessage-message":   "The signed message",
   777  	"verifymessage--result0":  "Whether or not the signature verified",
   778  
   779  	// -------- Websocket-specific help --------
   780  
   781  	// Session help.
   782  	"session--synopsis":       "Return details regarding a websocket client's current connection session.",
   783  	"sessionresult-sessionid": "The unique session ID for a client's websocket connection.",
   784  
   785  	// NotifyBlocksCmd help.
   786  	"notifyblocks--synopsis": "Request notifications for whenever a block is connected or disconnected from the main (best) chain.",
   787  
   788  	// StopNotifyBlocksCmd help.
   789  	"stopnotifyblocks--synopsis": "Cancel registered notifications for whenever a block is connected or disconnected from the main (best) chain.",
   790  
   791  	// NotifyNewTransactionsCmd help.
   792  	"notifynewtransactions--synopsis": "Send either a txaccepted or a txacceptedverbose notification when a new transaction is accepted into the mempool.",
   793  	"notifynewtransactions-verbose":   "Specifies which type of notification to receive. If verbose is true, then the caller receives txacceptedverbose, otherwise the caller receives txaccepted",
   794  
   795  	// StopNotifyNewTransactionsCmd help.
   796  	"stopnotifynewtransactions--synopsis": "Stop sending either a txaccepted or a txacceptedverbose notification when a new transaction is accepted into the mempool.",
   797  
   798  	// NotifyReceivedCmd help.
   799  	"notifyreceived--synopsis": "Send a recvtx notification when a transaction added to mempool or appears in a newly-attached block contains a txout pkScript sending to any of the passed addresses.\n" +
   800  		"Matching outpoints are automatically registered for redeemingtx notifications.",
   801  	"notifyreceived-addresses": "List of address to receive notifications about",
   802  
   803  	// StopNotifyReceivedCmd help.
   804  	"stopnotifyreceived--synopsis": "Cancel registered receive notifications for each passed address.",
   805  	"stopnotifyreceived-addresses": "List of address to cancel receive notifications for",
   806  
   807  	// OutPoint help.
   808  	"outpoint-hash":  "The hex-encoded bytes of the outpoint hash",
   809  	"outpoint-index": "The index of the outpoint",
   810  
   811  	// NotifySpentCmd help.
   812  	"notifyspent--synopsis": "Send a redeemingtx notification when a transaction spending an outpoint appears in mempool (if relayed to this lbcd instance) and when such a transaction first appears in a newly-attached block.",
   813  	"notifyspent-outpoints": "List of transaction outpoints to monitor.",
   814  
   815  	// StopNotifySpentCmd help.
   816  	"stopnotifyspent--synopsis": "Cancel registered spending notifications for each passed outpoint.",
   817  	"stopnotifyspent-outpoints": "List of transaction outpoints to stop monitoring.",
   818  
   819  	// LoadTxFilterCmd help.
   820  	"loadtxfilter--synopsis": "Load, add to, or reload a websocket client's transaction filter for mempool transactions, new blocks and rescanblocks.",
   821  	"loadtxfilter-reload":    "Load a new filter instead of adding data to an existing one",
   822  	"loadtxfilter-addresses": "Array of addresses to add to the transaction filter",
   823  	"loadtxfilter-outpoints": "Array of outpoints to add to the transaction filter",
   824  
   825  	// Rescan help.
   826  	"rescan--synopsis": "Rescan block chain for transactions to addresses.\n" +
   827  		"When the endblock parameter is omitted, the rescan continues through the best block in the main chain.\n" +
   828  		"Rescan results are sent as recvtx and redeemingtx notifications.\n" +
   829  		"This call returns once the rescan completes.",
   830  	"rescan-beginblock": "Hash of the first block to begin rescanning",
   831  	"rescan-addresses":  "List of addresses to include in the rescan",
   832  	"rescan-outpoints":  "List of transaction outpoints to include in the rescan",
   833  	"rescan-endblock":   "Hash of final block to rescan",
   834  
   835  	// RescanBlocks help.
   836  	"rescanblocks--synopsis":   "Rescan blocks for transactions matching the loaded transaction filter.",
   837  	"rescanblocks-blockhashes": "List of hashes to rescan.  Each next block must be a child of the previous.",
   838  	"rescanblocks--result0":    "List of matching blocks.",
   839  
   840  	// RescannedBlock help.
   841  	"rescannedblock-hash":         "Hash of the matching block.",
   842  	"rescannedblock-transactions": "List of matching transactions, serialized and hex-encoded.",
   843  
   844  	// Uptime help.
   845  	"uptime--synopsis": "Returns the total uptime of the server.",
   846  	"uptime--result0":  "The number of seconds that the server has been running",
   847  
   848  	// Version help.
   849  	"version--synopsis":       "Returns the JSON-RPC API version (semver)",
   850  	"version--result0--desc":  "Version objects keyed by the program or API name",
   851  	"version--result0--key":   "Program or API name",
   852  	"version--result0--value": "Object containing the semantic version",
   853  
   854  	// VersionResult help.
   855  	"versionresult-versionstring": "The JSON-RPC API version (semver)",
   856  	"versionresult-major":         "The major component of the JSON-RPC API version",
   857  	"versionresult-minor":         "The minor component of the JSON-RPC API version",
   858  	"versionresult-patch":         "The patch component of the JSON-RPC API version",
   859  	"versionresult-prerelease":    "Prerelease info about the current build",
   860  	"versionresult-buildmetadata": "Metadata about the current build",
   861  
   862  	"getclaimsforname--synopsis":      "Look up claims for the given name as they stand at a give block",
   863  	"getclaimsfornamebyid--synopsis":  "Look up claims for the given name as they stand at a give block",
   864  	"getclaimsfornamebybid--synopsis": "Look up claims for the given name as they stand at a give block",
   865  	"getclaimsfornamebyseq--synopsis": "Look up claims for the given name as they stand at a give block",
   866  
   867  	"getclaimsforname-hashorheight":      "Requested block hash or height; default to tip",
   868  	"getclaimsfornamebyid-hashorheight":  "Requested block hash or height; default to tip",
   869  	"getclaimsfornamebybid-hashorheight": "Requested block hash or height; default to tip",
   870  	"getclaimsfornamebyseq-hashorheight": "Requested block hash or height; default to tip",
   871  
   872  	"getclaimsforname-name":      "Requested name for lookup",
   873  	"getclaimsfornamebyid-name":  "Requested name for lookup",
   874  	"getclaimsfornamebybid-name": "Requested name for lookup",
   875  	"getclaimsfornamebyseq-name": "Requested name for lookup",
   876  
   877  	"getclaimsfornamebyid-partialclaimids": "Limit the returned claims to those with matching (partial) claimIDs in this list",
   878  	"getclaimsfornamebybid-bids":           "Limit the returned claims to those with bids to this list",
   879  	"getclaimsfornamebyseq-sequences":      "Limit the returned claims to those with bids to this list",
   880  
   881  	"getclaimsforname-includevalues":      "Return the metadata and address",
   882  	"getclaimsfornamebyseq-includevalues": "Return the metadata and address",
   883  	"getclaimsfornamebybid-includevalues": "Return the metadata and address",
   884  	"getclaimsfornamebyid-includevalues":  "Return the metadata and address",
   885  
   886  	"getclaimsfornameresult-claims":             "All the active claims on the given name",
   887  	"getclaimsfornameresult-normalizedname":     "Lower-case version of the passed-in name",
   888  	"getclaimsfornameresult-height":             "Height of the requested block",
   889  	"getclaimsfornameresult-lasttakeoverheight": "Height of the most recent name takeover",
   890  	"getclaimsfornameresult-hash":               "Hash of the requested block",
   891  
   892  	"getchangesinblock--synopsis":    "Returns a list of names affected by a given block",
   893  	"getchangesinblockresult-names":  "Names that changed (or were at least checked for change) on the given height",
   894  	"getchangesinblockresult-height": "Height that was requested",
   895  	"getchangesinblockresult-hash":   "Hash of the block at the height requested",
   896  
   897  	"scriptpubkeyresult-subtype": "Claims return Non-standard address types, but they use standard address types internally exposed here",
   898  
   899  	"supportresult-value":         "This is the metadata given as part of the support",
   900  	"supportresult-txid":          "The hash of the transaction",
   901  	"supportresult-n":             "The output (TXO) index",
   902  	"supportresult-address":       "The destination address for the support",
   903  	"supportresult-amount":        "LBC staked",
   904  	"supportresult-height":        "The height when the stake was created or updated",
   905  	"supportresult-validatheight": "The height when the stake becomes valid",
   906  	"claimresult-value":           "This is the metadata given as part of the claim",
   907  	"claimresult-txid":            "The hash of the transaction",
   908  	"claimresult-n":               "The output (TXO) index",
   909  	"claimresult-address":         "The destination address for the claim",
   910  	"claimresult-supports":        "The list of supports active on the claim",
   911  	"claimresult-validatheight":   "The height when the stake becomes valid",
   912  	"claimresult-height":          "The height when the stake was created or updated",
   913  	"claimresult-amount":          "The stake amount in sats",
   914  	"claimresult-effectiveamount": "The stake amount plus the active supports' amounts",
   915  	"claimresult-sequence":        "The order this claim was created compared to other claims on this name",
   916  	"claimresult-bid":             "Bid of 0 means that this claim currently owns the name",
   917  	"claimresult-claimid":         "20-byte hash of TXID:N, often used in indexes for the claims",
   918  
   919  	"generatetoaddress--synopsis":    "Mine blocks and send their reward to a given address",
   920  	"generatetoaddress--result0":     "The list of generated blocks' hashes",
   921  	"generatetoaddress-maxtries":     "The maximum number of hashes to attempt",
   922  	"generatetoaddress-address":      "The destination -- the place where the LBC will be sent",
   923  	"generatetoaddress-numblocks":    "The number of blocks to mine",
   924  	"getchangesinblock-hashorheight": "The requested height or block hash whose changes are of interest",
   925  
   926  	"normalize--synopsis": "Used to show how lbcd will normalize a string",
   927  	"normalize--result0":  "The normalized name",
   928  	"normalize-name":      "The string to be normalized",
   929  
   930  	"getblockverboseresult-getblockverboseresultbase": "",
   931  	"prevout-issupport": "Previous output created a support",
   932  	"prevout-isclaim":   "Previous output created or updated a claim",
   933  }
   934  
   935  // rpcResultTypes specifies the result types that each RPC command can return.
   936  // This information is used to generate the help.  Each result type must be a
   937  // pointer to the type (or nil to indicate no return value).
   938  var rpcResultTypes = map[string][]interface{}{
   939  	"addnode":                nil,
   940  	"clearbanned":            nil,
   941  	"createrawtransaction":   {(*string)(nil)},
   942  	"debuglevel":             {(*string)(nil), (*string)(nil)},
   943  	"decoderawtransaction":   {(*btcjson.TxRawDecodeResult)(nil)},
   944  	"decodescript":           {(*btcjson.DecodeScriptResult)(nil)},
   945  	"estimatefee":            {(*float64)(nil)},
   946  	"estimatesmartfee":       {(*float64)(nil)},
   947  	"generate":               {(*[]string)(nil)},
   948  	"generatetoaddress":      {(*[]string)(nil)},
   949  	"getaddednodeinfo":       {(*[]string)(nil), (*[]btcjson.GetAddedNodeInfoResult)(nil)},
   950  	"getbestblock":           {(*btcjson.GetBestBlockResult)(nil)},
   951  	"getbestblockhash":       {(*string)(nil)},
   952  	"getblock":               {(*string)(nil), (*btcjson.GetBlockVerboseResult)(nil)},
   953  	"getblockchaininfo":      {(*btcjson.GetBlockChainInfoResult)(nil)},
   954  	"getblockcount":          {(*int64)(nil)},
   955  	"getblockhash":           {(*string)(nil)},
   956  	"getblockheader":         {(*string)(nil), (*btcjson.GetBlockHeaderVerboseResult)(nil)},
   957  	"getblockstats":          {(*btcjson.GetBlockStatsResult)(nil)},
   958  	"getblocktemplate":       {(*btcjson.GetBlockTemplateResult)(nil), (*string)(nil), nil},
   959  	"getcfilter":             {(*string)(nil)},
   960  	"getcfilterheader":       {(*string)(nil)},
   961  	"getchaintips":           {(*[]btcjson.GetChainTipsResult)(nil)},
   962  	"getconnectioncount":     {(*int32)(nil)},
   963  	"getcurrentnet":          {(*uint32)(nil)},
   964  	"getdifficulty":          {(*float64)(nil)},
   965  	"getgenerate":            {(*bool)(nil)},
   966  	"gethashespersec":        {(*float64)(nil)},
   967  	"getheaders":             {(*[]string)(nil)},
   968  	"getinfo":                {(*btcjson.InfoChainResult)(nil)},
   969  	"getmempoolentry":        {(*btcjson.GetMempoolEntryResult)(nil)},
   970  	"getmempoolinfo":         {(*btcjson.GetMempoolInfoResult)(nil)},
   971  	"getmininginfo":          {(*btcjson.GetMiningInfoResult)(nil)},
   972  	"getnettotals":           {(*btcjson.GetNetTotalsResult)(nil)},
   973  	"getnetworkhashps":       {(*int64)(nil)},
   974  	"getnetworkinfo":         {(*map[string]btcjson.GetNetworkInfoResult)(nil)},
   975  	"getnodeaddresses":       {(*[]btcjson.GetNodeAddressesResult)(nil)},
   976  	"getpeerinfo":            {(*[]btcjson.GetPeerInfoResult)(nil)},
   977  	"getrawmempool":          {(*[]string)(nil), (*btcjson.GetRawMempoolVerboseResult)(nil)},
   978  	"getrawtransaction":      {(*string)(nil), (*btcjson.TxRawResult)(nil)},
   979  	"gettxout":               {(*btcjson.GetTxOutResult)(nil)},
   980  	"help":                   {(*string)(nil), (*string)(nil)},
   981  	"invalidateblock":        nil,
   982  	"listbanned":             {(*[]btcjson.ListBannedResult)(nil)},
   983  	"node":                   nil,
   984  	"ping":                   nil,
   985  	"reconsiderblock":        nil,
   986  	"searchrawtransactions":  {(*string)(nil), (*[]btcjson.SearchRawTransactionsResult)(nil)},
   987  	"sendrawtransaction":     {(*string)(nil)},
   988  	"setban":                 nil,
   989  	"setgenerate":            nil,
   990  	"signmessagewithprivkey": {(*string)(nil)},
   991  	"stop":                   {(*string)(nil)},
   992  	"submitblock":            {nil, (*string)(nil)},
   993  	"uptime":                 {(*int64)(nil)},
   994  	"validateaddress":        {(*btcjson.ValidateAddressChainResult)(nil)},
   995  	"verifychain":            {(*bool)(nil)},
   996  	"verifymessage":          {(*bool)(nil)},
   997  	"version":                {(*map[string]btcjson.VersionResult)(nil)},
   998  
   999  	// Websocket commands.
  1000  	"loadtxfilter":              nil,
  1001  	"session":                   {(*btcjson.SessionResult)(nil)},
  1002  	"notifyblocks":              nil,
  1003  	"stopnotifyblocks":          nil,
  1004  	"notifynewtransactions":     nil,
  1005  	"stopnotifynewtransactions": nil,
  1006  	"notifyreceived":            nil,
  1007  	"stopnotifyreceived":        nil,
  1008  	"notifyspent":               nil,
  1009  	"stopnotifyspent":           nil,
  1010  	"rescan":                    nil,
  1011  	"rescanblocks":              {(*[]btcjson.RescannedBlock)(nil)},
  1012  
  1013  	// ClaimTrie
  1014  	"getclaimsforname":      {(*btcjson.GetClaimsForNameResult)(nil)},
  1015  	"getclaimsfornamebyid":  {(*btcjson.GetClaimsForNameResult)(nil)},
  1016  	"getclaimsfornamebybid": {(*btcjson.GetClaimsForNameResult)(nil)},
  1017  	"getclaimsfornamebyseq": {(*btcjson.GetClaimsForNameResult)(nil)},
  1018  	"normalize":             {(*string)(nil)},
  1019  	"getchangesinblock":     {(*btcjson.GetChangesInBlockResult)(nil)},
  1020  }
  1021  
  1022  // helpCacher provides a concurrent safe type that provides help and usage for
  1023  // the RPC server commands and caches the results for future calls.
  1024  type helpCacher struct {
  1025  	sync.Mutex
  1026  	usage      string
  1027  	methodHelp map[string]string
  1028  }
  1029  
  1030  // rpcMethodHelp returns an RPC help string for the provided method.
  1031  //
  1032  // This function is safe for concurrent access.
  1033  func (c *helpCacher) rpcMethodHelp(method string) (string, error) {
  1034  	c.Lock()
  1035  	defer c.Unlock()
  1036  
  1037  	// Return the cached method help if it exists.
  1038  	if help, exists := c.methodHelp[method]; exists {
  1039  		return help, nil
  1040  	}
  1041  
  1042  	// Look up the result types for the method.
  1043  	resultTypes, ok := rpcResultTypes[method]
  1044  	if !ok {
  1045  		return "", errors.New("no result types specified for method " +
  1046  			method)
  1047  	}
  1048  
  1049  	// Generate, cache, and return the help.
  1050  	help, err := btcjson.GenerateHelp(method, helpDescsEnUS, resultTypes...)
  1051  	if err != nil {
  1052  		return "", err
  1053  	}
  1054  	c.methodHelp[method] = help
  1055  	return help, nil
  1056  }
  1057  
  1058  // rpcUsage returns one-line usage for all support RPC commands.
  1059  //
  1060  // This function is safe for concurrent access.
  1061  func (c *helpCacher) rpcUsage(includeWebsockets bool) (string, error) {
  1062  	c.Lock()
  1063  	defer c.Unlock()
  1064  
  1065  	// Return the cached usage if it is available.
  1066  	if c.usage != "" {
  1067  		return c.usage, nil
  1068  	}
  1069  
  1070  	// Generate a list of one-line usage for every command.
  1071  	usageTexts := make([]string, 0, len(rpcHandlers))
  1072  	for k := range rpcHandlers {
  1073  		usage, err := btcjson.MethodUsageText(k)
  1074  		if err != nil {
  1075  			return "", err
  1076  		}
  1077  		usageTexts = append(usageTexts, usage)
  1078  	}
  1079  
  1080  	// Include websockets commands if requested.
  1081  	if includeWebsockets {
  1082  		for k := range wsHandlers {
  1083  			usage, err := btcjson.MethodUsageText(k)
  1084  			if err != nil {
  1085  				return "", err
  1086  			}
  1087  			usageTexts = append(usageTexts, usage)
  1088  		}
  1089  	}
  1090  
  1091  	sort.Strings(usageTexts)
  1092  	c.usage = strings.Join(usageTexts, "\n")
  1093  	return c.usage, nil
  1094  }
  1095  
  1096  // newHelpCacher returns a new instance of a help cacher which provides help and
  1097  // usage for the RPC server commands and caches the results for future calls.
  1098  func newHelpCacher() *helpCacher {
  1099  	return &helpCacher{
  1100  		methodHelp: make(map[string]string),
  1101  	}
  1102  }