【区块链】量子链命令行qtum-cli全命令详解

标签: 量子链qtum区块链
4133人阅读 评论(1) 收藏 举报
分类:

量子链命令行qtum-cli全命令详解

== Blockchain ==

callcontract “address” “data” ( address )

调用智能合约

getaccountinfo “address”

获取账户信息

getbestblockhash

获取最长链的hash

getblock “blockhash” ( verbose )

获取块的信息

getblockchaininfo

获取区块的信息

{
  "chain": "main",
  "blocks": 23487,
  "headers": 23487,
  "bestblockhash": "f8b72395139991ea2506db7daba27bd279038c9ed4c87b7991a3315940862073",
  "difficulty": 1613437.673703998,
  "mediantime": 1507530896,
  "verificationprogress": 0.9957299862491082,
  "chainwork": "000000000000000000000000000000000000000000000003188bacd0f1a554d9",
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    }, 
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    }, 
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "active",
      "startTime": 0,
      "timeout": 999999999999,
      "since": 6048
    },
    "segwit": {
      "status": "active",
      "startTime": 0,
      "timeout": 999999999999,
      "since": 6048
    }
  }
}

getblockcount

获取总的块树

23487

getblockhash height

返回最高块链中的块的哈希值。

root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# ./src/qtum-cli getblockhash 1
0000d5dab5e76310ae640e9bcfa270c2eb23a1e5948bdf01fc7ed1f157110ab7
root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# ./src/qtum-cli getblockhash 2
00003d3a847dcf7511abb97ad28545302062c786efb0fc492bf3d5bb1e5d01ea
root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# ./src/qtum-cli getblockhash 3
000032bf123a5bf3d32be8e1e931fd6a59ae4867f343b38a8515c7e4bb191db5

getblockheader “hash” ( verbose )

If verbose is false, returns a string that is serialized, hex-encoded data for blockheader ‘hash’.
If verbose is true, returns an Object with information about blockheader .

Arguments:
1. “hash” (string, required) The block hash
2. verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data

Result (for verbose = true):
{
“hash” : “hash”, (string) the block hash (same as provided)
“confirmations” : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain
“height” : n, (numeric) The block height or index
“version” : n, (numeric) The block version
“versionHex” : “00000000”, (string) The block version formatted in hexadecimal
“merkleroot” : “xxxx”, (string) The merkle root
“time” : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)
“mediantime” : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)
“nonce” : n, (numeric) The nonce
“bits” : “1d00ffff”, (string) The bits
“difficulty” : x.xxx, (numeric) The difficulty
“chainwork” : “0000…1f3” (string) Expected number of hashes required to produce the current chain (in hex)
“previousblockhash” : “hash”, (string) The hash of the previous block
“nextblockhash” : “hash”, (string) The hash of the next block
}

Result (for verbose=false):
“data” (string) A string that is serialized, hex-encoded data for block ‘hash’.

getchaintips

返回关于块树中所有已知提示的信息,包括主链以及孤立分支。

Result:
[
{
“height”: xxxx, (numeric) height of the chain tip
“hash”: “xxxx”, (string) block hash of the tip
“branchlen”: 0 (numeric) zero for main chain
“status”: “active” (string) “active” for the main chain
},
{
“height”: xxxx,
“hash”: “xxxx”,
“branchlen”: 1 (numeric) length of branch connecting the tip to the main chain
“status”: “xxxx” (string) status of the chain (active, valid-fork, valid-headers, headers-only, invalid)
}
]
Possible values for status:
1. “invalid” 该分支包含至少一个无效块
2. “headers-only” 这个分支并不是所有的块都可用,但是头部是有效的
3. “valid-headers” 所有块都可用于此分支,但它们从未被完全验证
4. “valid-fork” 该分支不是活动链的一部分,而是完全验证
5. “active” 这是活跃主链的一角,这当然是有效的

[
  {
    "height": 23487,
    "hash": "f8b72395139991ea2506db7daba27bd279038c9ed4c87b7991a3315940862073",
    "branchlen": 0,
    "status": "active"
  }, 
  {
    "height": 23484,
    "hash": "b17835a5b4d42264c06458e8fff7505f95535241cc7a18a0020764cf7430a5cf",
    "branchlen": 1,
    "status": "valid-headers"
  }, 
  {
    "height": 23477,
    "hash": "52aef6fb7a758ac2a189eec1a231b1b0afe725aaef5394f49b801448d261451a",
    "branchlen": 1,
    "status": "valid-fork"
  }, 
  {
    "height": 23463,
    "hash": "1b7d838dbef116bd72b5c9a3650f018e31e537f21dafd6e2d545211d5e9e1352",
    "branchlen": 1,
    "status": "valid-fork"
  }, 
  {
    "height": 23414,
    "hash": "bdf363e68f966793f739edd130eb0d07f51a9e5013860084e2d8f88238147b89",
    "branchlen": 1,
    "status": "valid-headers"
  }, 
  {
    "height": 23367,
    "hash": "6e75d0371e9ec8565f7af7c4e6eaf0a8bc24812748409ce069c9f4e7ffa2bd4f",
    "branchlen": 1,
    "status": "valid-fork"
  }, 
  {
    "height": 23332,
    "hash": "8b47a040d58f2edf6c8cbcfb8addecb29f6ca7808164b5044341078c262b418f",
    "branchlen": 1,
    "status": "valid-fork"
  }, 
  {
    "height": 23305,
    "hash": "4ff4bc130e85027fc8a325247c4c973282b5659e1f456cd7e4250f6b6d28fd24",
    "branchlen": 1,
    "status": "valid-headers"
  }, 
  {
    "height": 23160,
    "hash": "cdd41ffe6a74d97b57edea63e6dbfd921e54304ffe60f7d57e356ea6c6d14060",
    "branchlen": 1,
    "status": "valid-fork"
  }, 
  {
    "height": 23154,
    "hash": "ff08f078e866c216ac01531652da1b55ff418c38f9d07aae7a3721457075c30a",
    "branchlen": 1,
    "status": "valid-headers"
  }, 
  {
    "height": 23140,
    "hash": "2198ecc82553c21cccb8d2379a5413a891519ed060e12519a6c5d22cff367a91",
    "branchlen": 1,
    "status": "valid-headers"
  }, 
  {
    "height": 23137,
    "hash": "b8af5f81b6edc35403f6a5488d45633ae55ffee7d6611b3f1572a66b82991e9d",
    "branchlen": 1,
    "status": "valid-headers"
  }
]

getdifficulty

获取区块的难度

{
  "proof-of-work": 1.52587890625e-05,
  "proof-of-stake": 1613437.673703998
}

getmempoolancestors txid (verbose)

如果txid在mempool中,则返回所有in-mempool祖先。

Arguments:
1. “txid” (string, required) The transaction id (must be in mempool)
2. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids

Result (for verbose=false):
[ (json array of strings)
“transactionid” (string) The transaction id of an in-mempool ancestor transaction
,…
]

Result (for verbose=true):
{ (json object)
“transactionid” : { (json object)
“size” : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
“fee” : n, (numeric) transaction fee in QTUM
“modifiedfee” : n, (numeric) transaction fee with fee deltas used for mining priority
“time” : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
“height” : n, (numeric) block height when transaction entered pool
“startingpriority” : n, (numeric) DEPRECATED. Priority when transaction entered pool
“currentpriority” : n, (numeric) DEPRECATED. Transaction priority now
“descendantcount” : n, (numeric) number of in-mempool descendant transactions (including this one)
“descendantsize” : n, (numeric) virtual transaction size of in-mempool descendants (including this one)
“descendantfees” : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)
“ancestorcount” : n, (numeric) number of in-mempool ancestor transactions (including this one)
“ancestorsize” : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
“ancestorfees” : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
“depends” : [ (array) unconfirmed transactions used as inputs for this transaction
“transactionid”, (string) parent transaction id
… ]
}, …
}

getmempooldescendants txid (verbose)

如果txid在mempool中,则返回所有in-mempool后代。

Arguments:
1. “txid” (string, required) The transaction id (must be in mempool)
2. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids

Result (for verbose=false):
[ (json array of strings)
“transactionid” (string) The transaction id of an in-mempool descendant transaction
,…
]

Result (for verbose=true):
{ (json object)
“transactionid” : { (json object)
“size” : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
“fee” : n, (numeric) transaction fee in QTUM
“modifiedfee” : n, (numeric) transaction fee with fee deltas used for mining priority
“time” : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
“height” : n, (numeric) block height when transaction entered pool
“startingpriority” : n, (numeric) DEPRECATED. Priority when transaction entered pool
“currentpriority” : n, (numeric) DEPRECATED. Transaction priority now
“descendantcount” : n, (numeric) number of in-mempool descendant transactions (including this one)
“descendantsize” : n, (numeric) virtual transaction size of in-mempool descendants (including this one)
“descendantfees” : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)
“ancestorcount” : n, (numeric) number of in-mempool ancestor transactions (including this one)
“ancestorsize” : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
“ancestorfees” : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
“depends” : [ (array) unconfirmed transactions used as inputs for this transaction
“transactionid”, (string) parent transaction id
… ]
}, …
}

getmempoolentry txid

返回给定事务的记忆库数据

Arguments:
1. “txid” (string, required) The transaction id (must be in mempool)

Result:
{ (json object)
“size” : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
“fee” : n, (numeric) transaction fee in QTUM
“modifiedfee” : n, (numeric) transaction fee with fee deltas used for mining priority
“time” : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
“height” : n, (numeric) block height when transaction entered pool
“startingpriority” : n, (numeric) DEPRECATED. Priority when transaction entered pool
“currentpriority” : n, (numeric) DEPRECATED. Transaction priority now
“descendantcount” : n, (numeric) number of in-mempool descendant transactions (including this one)
“descendantsize” : n, (numeric) virtual transaction size of in-mempool descendants (including this one)
“descendantfees” : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)
“ancestorcount” : n, (numeric) number of in-mempool ancestor transactions (including this one)
“ancestorsize” : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)
“ancestorfees” : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)
“depends” : [ (array) unconfirmed transactions used as inputs for this transaction
“transactionid”, (string) parent transaction id
… ]
}

getmempoolinfo

返回有关TX内存池活动状态的详细信息。

{
  "size": 51,
  "bytes": 13989,
  "usage": 64912,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00000000
}

getrawmempool ( verbose )

[
  "9cff9e5412f2e02e78269f9d8239339ce07ae45e257d35edce84d6cd51426162", 
  "0c00ce4460b8dcafc607344fff44653200e777389c1db9ad3df7018fbebc9fed", 
  "40cc2fe10c0766e8a10e30fdc753fe7d4bfa39b82ea701d6a835b18973b7710b", 
  "d3f943db6c36e5e9ed237a05ceae7df78e420585f3a7c7b9a73876b08f0bd4b3", 
  "822f71887df8026581da9814549d2ffc8bd7d2013ddabd9ddff68ade57c15955", 
  "b2e84246732f760f43ef0f5c9b6947fd6f355d72dd1e5de5adb507bd715f414d", 
  "ef7077849af0564afc10a8af57296170678305f296b0f61be0f0ce1ce4bf6717", 
  "5eff2d768d9b251f3b542b8f555b42b952cb45d72fda04593252f9a9d296238e", 
  "39bb8e5ac6be62cf22152a6f915bd2655f47bbd39434815b5ae52549dc10aa86", 
  "07538676324e38464368d32fb06e5dd4efd1980eb8016ee6c2f3f27d5e966428", 
  "cb1ac0349fc9fd1e3a90c9ebfabca1fe23085f0c711164f496f66e619f5ad955", 
  "be6d794467628800ad07083076075da1ed5f892a6cdc1b813ac9a10faa856c06", 
  "68ba274f413efe6b279ac882e1f47ce3cea04a3ac55e778b7fff5dcf662eb810", 
  "01a828ccf90a4585f3a6bf5931b575394b78ee16ee56117cecf3547f0dc30809", 
  "198228f3644eaab46786dfcfe75398688e4343ff09f4bc1a01b01fd53c4d36c6", 
  "4b099977a71f7e9afcd99e1a3c3144c55dbaae97f4490de04e308033023f991d", 
  "08536674e8f4674ae62bed92ca46e7b1b276e51319318c8a5b6538d5c92c5df5", 
  "7c8eb5acb34aafe05b9c850c72943ecf958ffcb4cfcd72d45561e7a73d2f0421", 
  "2d22959e14830f142e26df1d5395f9d2b576b659bccb92c5d6a8d549a436a086", 
  "aef6ab1b23eabe763466a276fbc4d589282c855d43fa40f77397aa3d248f6c71", 
  "5957fa95301de3dc4b82d6fb782f458f84cc63247911dcd6a65fe7131e88e7ed", 
  "cce3ec1c2977ca78fef73fb6460456c862c5292df064f924097a265d529e086f", 
  "4f4ade451a479bcacbd1b26ede3c3f48d6329654f0c6ec3570f9355917affeab", 
  "135954a8805a16a199e3404c363eaa83c537028ab8f389414882990cad38c059", 
  "906aab626d58d5e3a70685d1668e40d8ae0ec0f7f6da637bc487862f7bc9583a", 
  "6dac1f71a80af80f38e712909d2b2a4ee325aa6ecd75ef033908f9a1fe2d432e", 
  "e5a7b25a4f2a7a4bdbbdc3d18b0833988f87cfbf9501127afef28ce1325d0105", 
  "9166248625b904f17df43ba3cb8a32c61ba1f9bedda8ec9dfd207ce099eb385b", 
  "cac88d7e847741cdf8f97974d0765f5b79179dec73682f0596d1dbb1a451ba93", 
  "553923ab9f6b37de9ae93b2c8648a887ca4f8ac572a33535fedf9b91f02b52b0", 
  "d7d599750432f69b62eb5c49ed4885145783b4e5e78236c62be99247fc9c9f1b", 
  "9f2c108c78d5b4cc710ee9cbb93c83dad90113547dfd9dc3ebda5eb283bd1a2e", 
  "3f0da9e46145915f5067b6c737142d15f05b94f2cdcd48e7057d501bf24946ce", 
  "fd36f5747d07ed0d003826a93ba07d65e987163ead3fecd6957655ae48cf8691", 
  "16322ba9b332c0c5bfde93142d2248bf58de550e473aed14e037463bcd274a9e", 
  "dbc8349f03d5bbf48175fd7f409f4386d454763ecc7d10842dbf89071142dcd2", 
  "02a977eb05aa9f697a2990f3943f10f404615f8976acb37708357bdfcd1d59bc", 
  "50c8d6d347fb7efb39606efceb0964db726a80bf05430577cbcba31213863439", 
  "f77e1603940b9f4fe763eafafecda0ef17e8d92e4ea0fd02908311668ee11716", 
  "3f90fe5fcdfc9b79ee9cf6e204ba21c812c617fef6079dc439ad0e49f617ba70", 
  "40062c5bc5ea29ea78afcf42dd80387c43f955db6dbdd536546a56f316bc46d5", 
  "c985e65f389c03b0b37a68d417083bde965a59a08055126e803012467b04afd6", 
  "002b555610bb36ca60893a95a8e522a37cad450042df8925bdc71f4ea892ef0d", 
  "836522467cf19373f62fb23a87b446578337bcafc976e44dc3e6657b8f958102", 
  "ca420012fd14abe5ca04ff14aad8c8e8af6dc1edbcd8e226a7312119ced176a6", 
  "56da8e48b606616a2c4f7ca8ada686c8e7ab8f2d3fad1f7c304fff726fc505da", 
  "5d4ec305122e4ad65fabc1ef3061c04117bae06c8a881d374fafcd86738340c6", 
  "4b3c425f5122e95b81f73d0bd80d393acd7ac67c3eafcb122ebaf7abf2f419b8", 
  "8f9d69c289dd403e80deb7086a980a73cfb192af41570c150a8585e53baba905", 
  "c2e9307893a09a398bff7da42a1f5ec76ffac045d04656e3e9ccbb14675bc418", 
  "2641192860d38fc622e5603977e42a388ac7159026d5bc7c8f6d2574feec80d3", 
  "1442086ac871cc03c4fc9f680e20368814ca0876fca982069c6201e6b7f3af8d"
]

getstorage “address”

Argument:
1. “address” (string, required) The address to get the storage from
2. “blockNum” (string, optional) Number of block to get state from, “latest” keyword supported. Latest if not passed.
3. “index” (number, optional) Zero-based index position of the storage

gettransactionreceipt “hash”

获取传输回执信息

gettxout “txid” n ( include_mempool )

返回有关未用户交易输出的详细信息

Arguments:
1. “txid” (string, required) The transaction id
2. n (numeric, required) vout number
3. include_mempool (boolean, optional) Whether to include the mempool

Result:
{
“bestblock” : “hash”, (string) the block hash
“confirmations” : n, (numeric) The number of confirmations
“value” : x.xxx, (numeric) The transaction value in QTUM
“scriptPubKey” : { (json object)
“asm” : “code”, (string)
“hex” : “hex”, (string)
“reqSigs” : n, (numeric) Number of required signatures
“type” : “pubkeyhash”, (string) The type, eg pubkeyhash
“addresses” : [ (array of string) array of qtum addresses
“address” (string) qtum address
,…
]
},
“version” : n, (numeric) The version
“coinbase” : true|false (boolean) Coinbase or not
}

gettxoutproof [“txid”,…] ( blockhash )

返回一个十六进制编码证明,“txid”包含在一个块中。

默认情况下,此功能仅在有时工作。 这是在这个交易的utxo中有一个未用的输出。 为了使其始终有效,您需要使用-txindex命令行选项维护事务索引,或者手动指定事务的块(通过blockhash)。

Arguments:
1. “txids” (string) A json array of txids to filter
[
“txid” (string) A transaction hash
,…
]
2. “blockhash” (string, optional) If specified, looks for txid in the block with this hash

Result:
“data” (string) A string that is a serialized, hex-encoded data for the proof.

gettxoutsetinfo

返回关于未用空的交易输出集的统计信息。
注意:此调用可能需要一些时间。

Result:
{
“height”:n, (numeric) The current block height (index)
“bestblock”: “hex”, (string) the best block hash hex
“transactions”: n, (numeric) The number of transactions
“txouts”: n, (numeric) The number of output transactions
“hash_serialized”: “hash”, (string) The serialized hash
“disk_size”: n, (numeric) The estimated size of the chainstate on disk
“total_amount”: x.xxx (numeric) The total amount
}

{
  "height": 23508,
  "bestblock": "18fdf80187a4bf19d2f752483afe3db2cb67ff57e3316918fefb347dd2a8b9d2",
  "transactions": 40989,
  "txouts": 99579,
  "hash_serialized_2": "53b4e66f7bb350e9a07cf637e589d57ee0efa3f63a84139f53af081acaa58295",
  "disk_size": 5751746,
  "total_amount": 100074032.00000000
}

listcontracts (start maxDisplay)

列出合约

{
  "0000000000000000000000000000000000000080": 0.00000000,
  "0000000000000000000000000000000000000081": 0.00000000,
  "0000000000000000000000000000000000000083": 0.00000000,
  "277719f82ed649c5d9cdd8698b5107b827543e04": 0.00000000,
  "0000000000000000000000000000000000000084": 0.00000000,
  "0000000000000000000000000000000000000082": 0.00000000
}

preciousblock “blockhash”

pruneblockchain

Arguments:
1. “height” (numeric, required) The block height to prune up to. May be set to a discrete height, or a unix timestamp
to prune blocks whose block time is at least 2 hours older than the provided timestamp.

Result:
n (numeric) Height of the last block pruned.

searchlogs (address) (topics)

searchlogs (address) (topics)
requires -logevents to be enabled
Argument:
1. “fromBlock” (numeric, required) The number of the earliest block (latest may be given to mean the most recent block).
2. “toBlock” (string, required) The number of the latest block (-1 may be given to mean the most recent block).
3. “address” (string, optional) An address or a list of addresses to only get logs from particular account(s).
4. “topics” (string, optional) An array of values which must each appear in the log entries. The order is important, if you want to leave topics out use null, e.g. [“null”, “0x00…”].

verifychain ( checklevel nblocks )

验证区块

true

verifytxoutproof “proof”

verifytxoutproof “proof”

Verifies that a proof points to a transaction in a block, returning the transaction it commits to
and throwing an RPC error if the block is not in our best chain

Arguments:
1. “proof” (string, required) The hex-encoded proof generated by gettxoutproof

Result:
[“txid”] (array, strings) The txid(s) which the proof commits to, or empty array if the proof is invalid

== Control ==

getinfo

返回状态

Result:
{
“version”: xxxxx, (numeric) the server version
“protocolversion”: xxxxx, (numeric) the protocol version
“walletversion”: xxxxx, (numeric) the wallet version
“balance”: xxxxxxx, (numeric) the total qtum balance of the wallet
“stake”: xxxxxxx, (numeric) the total qtum stake balance of the wallet
“blocks”: xxxxxx, (numeric) the current number of blocks processed in the server
“timeoffset”: xxxxx, (numeric) the time offset
“connections”: xxxxx, (numeric) the number of connections
“proxy”: “host:port”, (string, optional) the proxy used by the server
“difficulty”: xxxxxx, (numeric) the current difficulty
“testnet”: true|false, (boolean) if the server is using testnet or not
“keypoololdest”: xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool
“keypoolsize”: xxxx, (numeric) how many new keys are pre-generated
“unlocked_until”: ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked
“paytxfee”: x.xxxx, (numeric) the transaction fee set in QTUM/kB
“relayfee”: x.xxxx, (numeric) minimum relay fee for non-free transactions in QTUM/kB
“errors”: “…” (string) any error messages
}

{
  "version": 140301,
  "protocolversion": 70016,
  "walletversion": 130000,
  "balance": 0.00000000,
  "stake": 0.00000000,
  "blocks": 23511,
  "timeoffset": 0,
  "connections": 8,
  "proxy": "",
  "difficulty": {
    "proof-of-work": 1.52587890625e-05,
    "proof-of-stake": 1462590.174274521
  },
  "testnet": false,
  "moneysupply": 100074044,
  "keypoololdest": 1507476091,
  "keypoolsize": 100,
  "paytxfee": 0.00000000,
  "relayfee": 0.00400000,
  "errors": ""
}

getmemoryinfo

返回一个包含有关内存使用信息的对象

Result:
{
“locked”: { (json object) Information about locked memory manager
“used”: xxxxx, (numeric) Number of bytes used
“free”: xxxxx, (numeric) Number of bytes available in current arenas
“total”: xxxxxxx, (numeric) Total number of bytes managed
“locked”: xxxxxx, (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk.
“chunks_used”: xxxxx, (numeric) Number allocated chunks
“chunks_free”: xxxxx, (numeric) Number unused chunks
}
}

{
  "locked": {
    "used": 3392,
    "free": 62144,
    "total": 65536,
    "locked": 65536,
    "chunks_used": 106,
    "chunks_free": 107
  }
}

help ( “command” )

展示帮助命令

stop

停止服务

== Generating 生成 ==

generate nblocks ( maxtries )

立即启动nblocks(在RPC调用返回之前)

Arguments:
1. nblocks (numeric, required) How many blocks are generated immediately.
2. maxtries (numeric, optional) How many iterations to try (default = 1000000).

Result:
[ blockhashes ] (array) hashes of blocks generated

generatetoaddress nblocks address (maxtries)

立即矿块到指定地址(RPC调用返回前)

Arguments:
1. nblocks (numeric, required) How many blocks are generated immediately.
2. address (string, required) The address to send the newly generated qtum to.
3. maxtries (numeric, optional) How many iterations to try (default = 1000000).

Result:
[ blockhashes ] (array) hashes of blocks generated

== Mining ==

getblocktemplate ( TemplateRequest )

getmininginfo

返回一个包含采矿相关信息的json对象。

Result:
{
“blocks”: nnn, (numeric) The current block
“currentblocksize”: nnn, (numeric) The last block size
“currentblockweight”: nnn, (numeric) The last block weight
“currentblocktx”: nnn, (numeric) The last block transaction
“difficulty”: xxx.xxxxx (numeric) The current difficulty
“errors”: “…” (string) Current errors
“networkhashps”: nnn, (numeric) The network hashes per second
“pooledtx”: n (numeric) The size of the mempool
“chain”: “xxxx”, (string) current network name as defined in BIP70 (main, test, regtest)
}

{
  "blocks": 23514,
  "currentblocksize": 1000,
  "currentblockweight": 4000,
  "currentblocktx": 0,
  "difficulty": {
    "proof-of-work": 1.52587890625e-05,
    "proof-of-stake": 730605.5386471873,
    "search-interval": 0
  },
  "blockvalue": 400000000,
  "netmhashps": 0,
  "netstakeweight": 466136836949064.1,
  "errors": "",
  "networkhashps": 30540875743588.24,
  "pooledtx": 3,
  "stakeweight": {
    "minimum": 0,
    "maximum": 0,
    "combined": 0
  },
  "chain": "main"
}

getnetworkhashps ( nblocks height )

根据最后的n个块返回每秒估计的网络散列。
通过[blocks]来覆盖块的数量,-1指定自最后的难度变化。
通过[height]来估计发现某个块时的网络速度。

Arguments:
1. nblocks (numeric, optional, default=120) The number of blocks, or -1 for blocks since last difficulty change.
2. height (numeric, optional, default=-1) To estimate at the time of the given height.

Result:
x (numeric) Hashes per second estimated

31133903939386.92

getstakinginfo

{
  "enabled": true,
  "staking": false,
  "errors": "",
  "currentblocksize": 1000,
  "currentblocktx": 0,
  "pooledtx": 4,
  "difficulty": 962867.7660312323,
  "search-interval": 0,
  "weight": 0,
  "netstakeweight": 458311826806143,
  "expectedtime": 0
}

getsubsidy [nTarget]

400000000

prioritisetransaction

prioritisetransaction <txid> <priority delta> <fee delta>
Accepts the transaction into mined blocks at a higher (or lower) priority

Arguments:
1. "txid"       (string, required) The transaction id.
2. priority_delta (numeric, required) The priority to add or subtract.
                  The transaction selection algorithm considers the tx as it would have a higher priority.
                  (priority of a transaction is calculated: coinage * value_in_satoshis / txsize) 
3. fee_delta      (numeric, required) The fee value (in satoshis) to add (or subtract, if negative).
                  The fee is not actually paid, only the algorithm for selecting transactions into a block
                  considers the transaction as it would have paid a higher (or lower) fee.

Result:
true              (boolean) Returns true

submitblock “hexdata” ( “jsonparametersobject” )

Attempts to submit new block to network.
The ‘jsonparametersobject’ parameter is currently ignored.
See https://en.bitcoin.it/wiki/BIP_0022 for full specification.

Arguments
1. “hexdata” (string, required) the hex-encoded block data to submit
2. “parameters” (string, optional) object of optional parameters
{
“workid” : “id” (string, optional) if the server provided a workid, it MUST be included with submissions
}

Result:

== Network ==

addnode “node” “add|remove|onetry”

尝试从addnode列表中添加或删除节点。
或尝试连接一个节点一次。

Arguments:
1. “node” (string, required) The node (see getpeerinfo for nodes)
2. “command” (string, required) ‘add’ to add a node to the list, ‘remove’ to remove a node from the list, ‘onetry’ to try a connection to the node once

clearbanned

清除所有的禁用ip

disconnectnode “node”

断开特定节点的连接

getaddednodeinfo ( “node” )

返回有关给定添加节点或所有添加节点的信息
(请注意,这里没有列出onetry addnodes)

Arguments:
1. “node” (string, optional) If provided, return information about this specific node, otherwise all nodes are returned.

Result:
[
{
“addednode” : “192.168.0.201”, (string) The node ip address or name (as provided to addnode)
“connected” : true|false, (boolean) If connected
“addresses” : [ (list of objects) Only when connected = true
{
“address” : “192.168.0.201:8333”, (string) The qtum server IP and port we’re connected to
“connected” : “outbound” (string) connection, inbound or outbound
}
]
}
,…
]

getconnectioncount

返回连接数

getnettotals

返回有关网络流量的信息,包括字节数,字节数,
和当前时间。

Result:
{
“totalbytesrecv”: n, (numeric) Total bytes received
“totalbytessent”: n, (numeric) Total bytes sent
“timemillis”: t, (numeric) Current UNIX time in milliseconds
“uploadtarget”:
{
“timeframe”: n, (numeric) Length of the measuring timeframe in seconds
“target”: n, (numeric) Target in bytes
“target_reached”: true|false, (boolean) True if target is reached
“serve_historical_blocks”: true|false, (boolean) True if serving historical blocks
“bytes_left_in_cycle”: t, (numeric) Bytes left in current time cycle
“time_left_in_cycle”: t (numeric) Seconds left in current time cycle
}
}

{
  "totalbytesrecv": 34252531,
  "totalbytessent": 2158410,
  "timemillis": 1507538774189,
  "uploadtarget": {
    "timeframe": 86400,
    "target": 0,
    "target_reached": false,
    "serve_historical_blocks": true,
    "bytes_left_in_cycle": 0,
    "time_left_in_cycle": 0
  }
}

getnetworkinfo

返回包含有关P2P网络的各种状态信息的对象。

Result:
{
“version”: xxxxx, (numeric) the server version
“subversion”: “/Satoshi:x.x.x/”, (string) the server subversion string
“protocolversion”: xxxxx, (numeric) the protocol version
“localservices”: “xxxxxxxxxxxxxxxx”, (string) the services we offer to the network
“localrelay”: true|false, (bool) true if transaction relay is requested from peers
“timeoffset”: xxxxx, (numeric) the time offset
“connections”: xxxxx, (numeric) the number of connections
“networkactive”: true|false, (bool) whether p2p networking is enabled
“networks”: [ (array) information per network
{
“name”: “xxx”, (string) network (ipv4, ipv6 or onion)
“limited”: true|false, (boolean) is the network limited using -onlynet?
“reachable”: true|false, (boolean) is the network reachable?
“proxy”: “host:port” (string) the proxy that is used for this network, or empty if none
“proxy_randomize_credentials”: true|false, (string) Whether randomized credentials are used
}
,…
],
“relayfee”: x.xxxxxxxx, (numeric) minimum relay fee for non-free transactions in QTUM/kB
“incrementalfee”: x.xxxxxxxx, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in QTUM/kB
“localaddresses”: [ (array) list of local addresses
{
“address”: “xxxx”, (string) network address
“port”: xxx, (numeric) network port
“score”: xxx (numeric) relative score
}
,…
]
“warnings”: “…” (string) any network warnings
}

{
  "version": 140301,
  "subversion": "/Satoshi:0.14.3.1/",
  "protocolversion": 70016,
  "localservices": "000000000000000d",
  "localrelay": true,
  "timeoffset": 0,
  "networkactive": true,
  "connections": 8,
  "networks": [
    {
      "name": "ipv4",
      "limited": false,
      "reachable": true,
      "proxy": "",
      "proxy_randomize_credentials": false
    }, 
    {
      "name": "ipv6",
      "limited": false,
      "reachable": true,
      "proxy": "",
      "proxy_randomize_credentials": false
    }, 
    {
      "name": "onion",
      "limited": true,
      "reachable": false,
      "proxy": "",
      "proxy_randomize_credentials": false
    }
  ],
  "relayfee": 0.00400000,
  "incrementalfee": 0.00010000,
  "localaddresses": [
  ],
  "warnings": ""
}

getpeerinfo

将每个连接的网络节点的数据作为json数组对象返回。

Result:
[
{
“id”: n, (numeric) Peer index
“addr”:”host:port”, (string) The ip address and port of the peer
“addrlocal”:”ip:port”, (string) local address
“services”:”xxxxxxxxxxxxxxxx”, (string) The services offered
“relaytxes”:true|false, (boolean) Whether peer has asked us to relay transactions to it
“lastsend”: ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send
“lastrecv”: ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive
“bytessent”: n, (numeric) The total bytes sent
“bytesrecv”: n, (numeric) The total bytes received
“conntime”: ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)
“timeoffset”: ttt, (numeric) The time offset in seconds
“pingtime”: n, (numeric) ping time (if available)
“minping”: n, (numeric) minimum observed ping time (if any at all)
“pingwait”: n, (numeric) ping wait (if non-zero)
“version”: v, (numeric) The peer version, such as 7001
“subver”: “/Satoshi:0.8.5/”, (string) The string version
“inbound”: true|false, (boolean) Inbound (true) or Outbound (false)
“addnode”: true|false, (boolean) Whether connection was due to addnode and is using an addnode slot
“startingheight”: n, (numeric) The starting height (block) of the peer
“banscore”: n, (numeric) The ban score
“synced_headers”: n, (numeric) The last header we have in common with this peer
“synced_blocks”: n, (numeric) The last block we have in common with this peer
“inflight”: [
n, (numeric) The heights of blocks we’re currently asking from this peer

],
“whitelisted”: true|false, (boolean) Whether the peer is whitelisted
“bytessent_per_msg”: {
“addr”: n, (numeric) The total bytes sent aggregated by message type

},
“bytesrecv_per_msg”: {
“addr”: n, (numeric) The total bytes received aggregated by message type

}
}
,…
]

[
  {
    "id": 0,
    "addr": "85.214.68.122:3888",
    "addrlocal": "47.74.147.151:56118",
    "services": "000000000000000d",
    "relaytxes": true,
    "lastsend": 1507540529,
    "lastrecv": 1507540529,
    "bytessent": 365052,
    "bytesrecv": 6785188,
    "conntime": 1507476236,
    "timeoffset": -1,
    "pingtime": 0.347873,
    "minping": 0.347389,
    "version": 70016,
    "subver": "/Satoshi:0.14.3/",
    "inbound": false,
    "addnode": false,
    "startingheight": 23098,
    "banscore": 0,
    "synced_headers": 23541,
    "synced_blocks": 23541,
    "inflight": [
    ],
    "whitelisted": false,
    "bytessent_per_msg": {
      "addr": 2590,
      "feefilter": 32,
      "getaddr": 24,
      "getblocktxn": 3828,
      "getdata": 191691,
      "getheaders": 893,
      "headers": 73011,
      "inv": 56668,
      "ping": 17152,
      "pong": 17152,
      "reject": 350,
      "sendcmpct": 1485,
      "sendheaders": 24,
      "verack": 24,
      "version": 128
    },
    "bytesrecv_per_msg": {
      "addr": 31402,
      "block": 6394940,
      "blocktxn": 96597,
      "cmpctblock": 71815,
      "feefilter": 32,
      "getheaders": 893,
      "headers": 53838,
      "inv": 36227,
      "notfound": 158,
      "ping": 17152,
      "pong": 17152,
      "sendcmpct": 66,
      "sendheaders": 24,
      "tx": 64742,
      "verack": 24,
      "version": 126
    }
  }, 


  ...........

listbanned

列出全部被禁用的ip和节点

ping

请求ping发送到所有其他节点,以测量ping时间。
getpeerinfo,pingtime和pingwait字段中提供的结果为十进制秒。
Ping命令与所有其他命令进行队列处理,因此它可以测量处理积压,而不仅仅是网络ping。

setban “subnet” “add|remove” (bantime) (absolute)

从禁用列表增加/删除

Arguments:
1. “subnet” (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)
2. “command” (string, required) ‘add’ to add a IP/Subnet to the list, ‘remove’ to remove a IP/Subnet from the list
3. “bantime” (numeric, optional) time in seconds how long (or until when if [absolute] is set) the ip is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)
4. “absolute” (boolean, optional) If set, the bantime must be a absolute timestamp in seconds since epoch (Jan 1 1970 GMT)

setnetworkactive true|false

设定网络的状态

== Rawtransactions ==

createrawtransaction [{“txid”:”id”,”vout”:n},…] {“address”:amount,”data”:”hex”,…} ( locktime )

创建一个交易,花费给定的投入和创造新的产出。
输出可以是地址或数据。
返回十六进制编码的原始事务。
请注意,交易的输入未签署,
它不存储在钱包中或传输到网络。

Arguments:
1. “inputs” (string, required) A json array of json objects
[
{
“txid”:”id”, (string, required) The transaction id
“vout”:n, (numeric, required) The output number
“sequence”:n (numeric, optional) The sequence number
}
,…
]
2. “outputs” (string, required) a json object with outputs
{
“address”: x.xxx, (numeric or string, required) The key is the qtum address, the numeric value (can be string) is the QTUM amount
“data”: “hex” (string, required) The key is “data”, the value is hex encoded data
,…
}
3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs

Result:
“transaction” (string) hex string of the transaction

Examples:

qtum-cli createrawtransaction “[{\”txid\”:\”myid\”,\”vout\”:0}]” “{\”address\”:0.01}”
qtum-cli createrawtransaction “[{\”txid\”:\”myid\”,\”vout\”:0}]” “{\”data\”:\”00010203\”}”
curl –user myusername –data-binary ‘{“jsonrpc”: “1.0”, “id”:”curltest”, “method”: “createrawtransaction”, “params”: [“[{\”txid\”:\”myid\”,\”vout\”:0}]”, “{\”address\”:0.01}”] }’ -H ‘content-type: text/plain;’ http://127.0.0.1:3889/
curl –user myusername –data-binary ‘{“jsonrpc”: “1.0”, “id”:”curltest”, “method”: “createrawtransaction”, “params”: [“[{\”txid\”:\”myid\”,\”vout\”:0}]”, “{\”data\”:\”00010203\”}”] }’ -H ‘content-type: text/plain;’ http://127.0.0.1:3889/

decoderawtransaction “hexstring”

返回表示序列化的十六进制编码事务的JSON对象。

Arguments:
1. “hexstring” (string, required) The transaction hex string

Result:
{
“txid” : “id”, (string) The transaction id
“hash” : “id”, (string) The transaction hash (differs from txid for witness transactions)
“size” : n, (numeric) The transaction size
“vsize” : n, (numeric) The virtual transaction size (differs from size for witness transactions)
“version” : n, (numeric) The version
“locktime” : ttt, (numeric) The lock time
“vin” : [ (array of json objects)
{
“txid”: “id”, (string) The transaction id
“vout”: n, (numeric) The output number
“scriptSig”: { (json object) The script
“asm”: “asm”, (string) asm
“hex”: “hex” (string) hex
},
“txinwitness”: [“hex”, …] (array of string) hex-encoded witness data (if any)
“sequence”: n (numeric) The script sequence number
}
,…
],
“vout” : [ (array of json objects)
{
“value” : x.xxx, (numeric) The value in QTUM
“n” : n, (numeric) index
“scriptPubKey” : { (json object)
“asm” : “asm”, (string) the asm
“hex” : “hex”, (string) the hex
“reqSigs” : n, (numeric) The required sigs
“type” : “pubkeyhash”, (string) The type, eg ‘pubkeyhash’
“addresses” : [ (json array of string)
“Q2tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc” (string) qtum address
,…
]
}
}
,…
],
}

Examples:

qtum-cli decoderawtransaction “hexstring”

decodescript “hexstring”

解码十六进制编码脚本。

Arguments:
1. “hexstring” (string) the hex encoded script

Result:
{
“asm”:”asm”, (string) Script public key
“hex”:”hex”, (string) hex encoded public key
“type”:”type”, (string) The output type
“reqSigs”: n, (numeric) The required signatures
“addresses”: [ (json array of string)
“address” (string) qtum address
,…
],
“p2sh”,”address” (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH).
}

fromhexaddress “hexaddress”

将原始十六进制地址转换为base58 pubkeyhash地址

Arguments:
1. “hexaddress” (string, required) The raw hex address

Result:
“address” (string) The base58 pubkeyhash address

fundrawtransaction “hexstring” ( options )

向事务添加输入,直到其具有足够的值才能满足其输出值。
这不会修改现有的输入,并且最多可以向输出添加一个更改输出。
除非指定了“subtractFeeFromOutputs”,否则不会修改现有的输出。
请注意,已经签署的投入可能需要在完成之后辞职,因为输入/输出已被添加。
添加的输入将不会被签名,请使用signrawtransaction。
请注意,所有现有输入必须将其先前的输出交易都存入钱包。
请注意,所选择的所有输入必须是标准形式,P2SH脚本必须是标准形式
在钱包里使用importaddress或addmultisigaddress(来计算费用)。
您可以通过检查listunspent输出中的“可解析”字段来查看是否是这种情况。
目前仅支持仅支付到pubkey,multisig和P2SH版本

Arguments:
1. “hexstring” (string, required) The hex string of the raw transaction
2. options (object, optional)
{
“changeAddress” (string, optional, default pool address) The qtum address to receive the change
“changePosition” (numeric, optional, default random) The index of the change output
“includeWatching” (boolean, optional, default false) Also select inputs which are watch only
“lockUnspents” (boolean, optional, default false) Lock selected unspent outputs
“reserveChangeKey” (boolean, optional, default true) Reserves the change output key from the keypool
“feeRate” (numeric, optional, default not set: makes wallet determine the fee) Set a specific feerate (QTUM per KB)
“subtractFeeFromOutputs” (array, optional) A json array of integers.
The fee will be equally deducted from the amount of each specified output.
The outputs are specified by their zero-based index, before any change output is added.
Those recipients will receive less qtums than you enter in their corresponding amount field.
If no outputs are specified here, the sender pays the fee.
[vout_index,…]
}
for backward compatibility: passing in a true instead of an object will result in {“includeWatching”:true}

Result:
{
“hex”: “value”, (string) The resulting raw transaction (hex-encoded string)
“fee”: n, (numeric) Fee in QTUM the resulting transaction pays
“changepos”: n (numeric) The position of the added change output, or -1
}

Examples:

Create a transaction with no inputs

qtum-cli createrawtransaction “[]” “{\”myaddress\”:0.01}”

Add sufficient unsigned inputs to meet the output value

qtum-cli fundrawtransaction “rawtransactionhex”

Sign the transaction

qtum-cli signrawtransaction “fundedtransactionhex”

Send the transaction

qtum-cli sendrawtransaction “signedtransactionhex”

gethexaddress “address”

将base58 pubkeyhash地址转换为十六进制地址以用于智能合同。

Arguments:
1. “address” (string, required) The base58 address

Result:
“hexaddress” (string) The raw hex pubkeyhash address for use in smart contracts

Examples:

qtum-cli gethexaddress “address”

getrawtransaction “txid” ( verbose )

注意:默认情况下,此功能仅适用于mempool事务。 如果-txindex选项是
启用,它也适用于块链交易。
反对:现在,它也适用于具有未用量输出的交易。

返回原始交易数据。

如果verbose为“true”,则返回一个包含“txid”信息的对象。
如果verbose为“false”或省略,则返回串行化的字符串,“txid”的十六进制编码数据。

Arguments:
1. “txid” (string, required) The transaction id
2. verbose (bool, optional, default=false) If true, return a string, other return a json object

Result (if verbose is not set or set to false):
“data” (string) The serialized, hex-encoded data for ‘txid’

Result (if verbose is set to true):
{
“hex” : “data”, (string) The serialized, hex-encoded data for ‘txid’
“txid” : “id”, (string) The transaction id (same as provided)
“hash” : “id”, (string) The transaction hash (differs from txid for witness transactions)
“size” : n, (numeric) The serialized transaction size
“vsize” : n, (numeric) The virtual transaction size (differs from size for witness transactions)
“version” : n, (numeric) The version
“locktime” : ttt, (numeric) The lock time
“vin” : [ (array of json objects)
{
“txid”: “id”, (string) The transaction id
“vout”: n, (numeric)
“scriptSig”: { (json object) The script
“asm”: “asm”, (string) asm
“hex”: “hex” (string) hex
},
“sequence”: n (numeric) The script sequence number
“txinwitness”: [“hex”, …] (array of string) hex-encoded witness data (if any)
}
,…
],
“vout” : [ (array of json objects)
{
“value” : x.xxx, (numeric) The value in QTUM
“n” : n, (numeric) index
“scriptPubKey” : { (json object)
“asm” : “asm”, (string) the asm
“hex” : “hex”, (string) the hex
“reqSigs” : n, (numeric) The required sigs
“type” : “pubkeyhash”, (string) The type, eg ‘pubkeyhash’
“addresses” : [ (json array of string)
“address” (string) qtum address
,…
]
}
}
,…
],
“blockhash” : “hash”, (string) the block hash
“confirmations” : n, (numeric) The confirmations
“time” : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT)
“blocktime” : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)
}

root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli   getrawtransaction   b8fb6587d94008d24835433ff3d3efa9ef507e724838195623ae7fa255687d5c
0200000003e819cc1d92f722041951d74fce4d3607d82a972a89d861c613c531cd855a781b000000006a473044022013c2dc70581b996a93ba1021636fc7a60566c4e7150a7001a7ae487f2a4af78b0220506ab18d4be566b4df1c66342204d5cb65c4e4e8fcb3f9b1e8e5ced7d87378fe0121037d3fd0f02df48648cd0085a107acdb0390d3b20c0f4b64f94439568d15e0b4f5feffffffab95fd2079d63c920d0a9c2b19271cb8ff745fe12667d94329a0c9078b203167010000006b483045022100bc25b49a495ff4bd4e6f02f6f21af3ab69c40563632f1b98e2a95311d2ff21db02204d2039034e4c66f019029823577f96cd0fbad839e0ed8a3a5d33bbfd842b62770121039969549c71bc825dd7c06d927e511c57bceb5d045f9c0a521d0e39b4a100df5bfeffffff5460cf471f3bfc2c379a270d9deb83652cf8a66cd22436b0244578fe2543dc9e000000006a47304402200a70c53bf44ddfc3ab6f4836ed2f80740afe9639e196028663bf8cb7d9a001d602206d0fda960625558502274c9be877bd38e8c781e39a9d406a3b583d3a1ce078080121037d3fd0f02df48648cd0085a107acdb0390d3b20c0f4b64f94439568d15e0b4f5feffffff01108f4f6a740000001976a914136846cde7f8f4e6c8ba2c4028501757042a98c888acef5a0000
root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli   getrawtransaction   b8fb6587d94008d24835433ff3d3efa9ef507e724838195623ae7fa255687d5c true
{
  "hex": "0200000003e819cc1d92f722041951d74fce4d3607d82a972a89d861c613c531cd855a781b000000006a473044022013c2dc70581b996a93ba1021636fc7a60566c4e7150a7001a7ae487f2a4af78b0220506ab18d4be566b4df1c66342204d5cb65c4e4e8fcb3f9b1e8e5ced7d87378fe0121037d3fd0f02df48648cd0085a107acdb0390d3b20c0f4b64f94439568d15e0b4f5feffffffab95fd2079d63c920d0a9c2b19271cb8ff745fe12667d94329a0c9078b203167010000006b483045022100bc25b49a495ff4bd4e6f02f6f21af3ab69c40563632f1b98e2a95311d2ff21db02204d2039034e4c66f019029823577f96cd0fbad839e0ed8a3a5d33bbfd842b62770121039969549c71bc825dd7c06d927e511c57bceb5d045f9c0a521d0e39b4a100df5bfeffffff5460cf471f3bfc2c379a270d9deb83652cf8a66cd22436b0244578fe2543dc9e000000006a47304402200a70c53bf44ddfc3ab6f4836ed2f80740afe9639e196028663bf8cb7d9a001d602206d0fda960625558502274c9be877bd38e8c781e39a9d406a3b583d3a1ce078080121037d3fd0f02df48648cd0085a107acdb0390d3b20c0f4b64f94439568d15e0b4f5feffffff01108f4f6a740000001976a914136846cde7f8f4e6c8ba2c4028501757042a98c888acef5a0000",
  "txid": "b8fb6587d94008d24835433ff3d3efa9ef507e724838195623ae7fa255687d5c",
  "hash": "b8fb6587d94008d24835433ff3d3efa9ef507e724838195623ae7fa255687d5c",
  "size": 486,
  "vsize": 486,
  "version": 2,
  "locktime": 23279,
  "vin": [
    {
      "txid": "1b785a85cd31c513c661d8892a972ad807364dce4fd751190422f7921dcc19e8",
      "vout": 0,
      "scriptSig": {
        "asm": "3044022013c2dc70581b996a93ba1021636fc7a60566c4e7150a7001a7ae487f2a4af78b0220506ab18d4be566b4df1c66342204d5cb65c4e4e8fcb3f9b1e8e5ced7d87378fe[ALL] 037d3fd0f02df48648cd0085a107acdb0390d3b20c0f4b64f94439568d15e0b4f5",
        "hex": "473044022013c2dc70581b996a93ba1021636fc7a60566c4e7150a7001a7ae487f2a4af78b0220506ab18d4be566b4df1c66342204d5cb65c4e4e8fcb3f9b1e8e5ced7d87378fe0121037d3fd0f02df48648cd0085a107acdb0390d3b20c0f4b64f94439568d15e0b4f5"
      },
      "sequence": 4294967294
    }, 
    {
      "txid": "6731208b07c9a02943d96726e15f74ffb81c27192b9c0a0d923cd67920fd95ab",
      "vout": 1,
      "scriptSig": {
        "asm": "3045022100bc25b49a495ff4bd4e6f02f6f21af3ab69c40563632f1b98e2a95311d2ff21db02204d2039034e4c66f019029823577f96cd0fbad839e0ed8a3a5d33bbfd842b6277[ALL] 039969549c71bc825dd7c06d927e511c57bceb5d045f9c0a521d0e39b4a100df5b",
        "hex": "483045022100bc25b49a495ff4bd4e6f02f6f21af3ab69c40563632f1b98e2a95311d2ff21db02204d2039034e4c66f019029823577f96cd0fbad839e0ed8a3a5d33bbfd842b62770121039969549c71bc825dd7c06d927e511c57bceb5d045f9c0a521d0e39b4a100df5b"
      },
      "sequence": 4294967294
    }, 
    {
      "txid": "9edc4325fe784524b03624d26ca6f82c6583eb9d0d279a372cfc3b1f47cf6054",
      "vout": 0,
      "scriptSig": {
        "asm": "304402200a70c53bf44ddfc3ab6f4836ed2f80740afe9639e196028663bf8cb7d9a001d602206d0fda960625558502274c9be877bd38e8c781e39a9d406a3b583d3a1ce07808[ALL] 037d3fd0f02df48648cd0085a107acdb0390d3b20c0f4b64f94439568d15e0b4f5",
        "hex": "47304402200a70c53bf44ddfc3ab6f4836ed2f80740afe9639e196028663bf8cb7d9a001d602206d0fda960625558502274c9be877bd38e8c781e39a9d406a3b583d3a1ce078080121037d3fd0f02df48648cd0085a107acdb0390d3b20c0f4b64f94439568d15e0b4f5"
      },
      "sequence": 4294967294
    }
  ],
  "vout": [
    {
      "value": 4999.99805200,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 136846cde7f8f4e6c8ba2c4028501757042a98c8 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a914136846cde7f8f4e6c8ba2c4028501757042a98c888ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "QNNbsCz1X3Hy2uh8twxvxRdUkU5EEbSagw"
        ]
      }
    }
  ],
  "blockhash": "9aa561342ee48b9217a58aa462917dc50b4b17b837eb1e7fce7623eefb10b314",
  "confirmations": 861,
  "time": 1507502608,
  "blocktime": 1507502608
}

sendrawtransaction “hexstring” ( allowhighfees )

将原始事务(序列化,十六进制编码)提交给本地节点和网络。

另请参阅createrawtransaction和signrawtransaction调用。

Arguments:
1. “hexstring” (string, required) The hex string of the raw transaction)
2. allowhighfees (boolean, optional, default=false) Allow high fees

Result:
“hex” (string) The transaction hash in hex

Examples:

Create a transaction

qtum-cli createrawtransaction “[{\”txid\” : \”mytxid\”,\”vout\”:0}]” “{\”myaddress\”:0.01}”
Sign the transaction, and get back the hex
qtum-cli signrawtransaction “myhex”

Send the transaction (signed hex)

qtum-cli sendrawtransaction “signedhex”

signrawtransaction “hexstring” ( [{“txid”:”id”,”vout”:n,”scriptPubKey”:”hex”,”redeemScript”:”hex”},…] [“privatekey1”,…] sighashtype )

为原始事务(序列化,十六进制编码)签署输入。
第二个可选参数(可能为null)是先前事务输出的数组
这个事务取决于但可能还没有在块链中。
第三个可选参数(可能为null)是一个base58编码的私有数组
如果给出的话,这些键将是用于签署交易的唯一键。

Sign inputs for raw transaction (serialized, hex-encoded).
The second optional argument (may be null) is an array of previous transaction outputs that
this transaction depends on but may not yet be in the block chain.
The third optional argument (may be null) is an array of base58-encoded private
keys that, if given, will be the only keys used to sign the transaction.

Arguments:
1. “hexstring” (string, required) The transaction hex string
2. “prevtxs” (string, optional) An json array of previous dependent transaction outputs
[ (json array of json objects, or ‘null’ if none provided)
{
“txid”:”id”, (string, required) The transaction id
“vout”:n, (numeric, required) The output number
“scriptPubKey”: “hex”, (string, required) script key
“redeemScript”: “hex”, (string, required for P2SH or P2WSH) redeem script
“amount”: value (numeric, required) The amount spent
}
,…
]
3. “privkeys” (string, optional) A json array of base58-encoded private keys for signing
[ (json array of strings, or ‘null’ if none provided)
“privatekey” (string) private key in base58-encoding
,…
]
4. “sighashtype” (string, optional, default=ALL) The signature hash type. Must be one of
“ALL”
“NONE”
“SINGLE”
“ALL|ANYONECANPAY”
“NONE|ANYONECANPAY”
“SINGLE|ANYONECANPAY”

Result:
{
“hex” : “value”, (string) The hex-encoded raw transaction with signature(s)
“complete” : true|false, (boolean) If the transaction has a complete set of signatures
“errors” : [ (json array of objects) Script verification errors (if there are any)
{
“txid” : “hash”, (string) The hash of the referenced, previous transaction
“vout” : n, (numeric) The index of the output to spent and used as input
“scriptSig” : “hex”, (string) The hex-encoded signature script
“sequence” : n, (numeric) Script sequence number
“error” : “text” (string) Verification or signing error related to the input
}
,…
]
}

Examples:

qtum-cli signrawtransaction “myhex”
curl –user myusername –data-binary ‘{“jsonrpc”: “1.0”, “id”:”curltest”, “method”: “signrawtransaction”, “params”: [“myhex”] }’ -H ‘content-type: text/plain;’ http://127.0.0.1:3889/

== Util ==

createmultisig nrequired [“key”,…]

创建一个需要m个密钥的n个签名的多签名地址。
它返回一个具有地址和redeemScript的json对象。

Arguments:
1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.
2. “keys” (string, required) A json array of keys which are qtum addresses or hex-encoded public keys
[
“key” (string) qtum address or hex-encoded public key
,…
]

Result:
{
“address”:”multisigaddress”, (string) The value of the new multisig address.
“redeemScript”:”script” (string) The string value of the hex-encoded redemption script.
}

Examples:

Create a multisig address from 2 addresses

qtum-cli createmultisig 2 “[\”QjWnDZxwLhrJDcp4Hisse8RfBo2jRDZY5Z\”,\”Q6sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\”]”

estimatefee nblocks

估计交易开始所需的大约每千字节费用
在nblocks块内确认。 使用事务的虚拟事务大小
如BIP 141(见证数据折扣)所定义。

Arguments:
1. nblocks (numeric, required)

Result:
n (numeric) estimated fee-per-kilobyte

如果没有足够的事务和块,则返回负值
已被观察到作出估计。
-1总是为nblocks == 1返回,因为它不可能计算
一个高到足以可靠地包含在下一个块中的费用。

root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli   estimatefee  5
0.00502099
root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli   estimatefee  6
0.00502099
root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli   estimatefee  1
-1
root@iZt4n8t

estimatepriority nblocks

已过时。 估计零收费交易需要在nblocks块内开始确认的大致优先级。

estimatesmartfee nblocks

警告:此接口不稳定,可能会消失或更改!

估计交易开始所需的大约每千字节费用
如果可能,在nblocks块内确认并返回块数
估计有效。 根据定义使用虚拟事务大小
在BIP 141(见证数据打折)

Arguments:
1. nblocks (numeric)

Result:
{
“feerate” : x.x, (numeric) estimate fee-per-kilobyte (in QTUM)
“blocks” : n (numeric) block number where estimate was found
}

如果没有足够的事务和块,则返回负值
已被观察到对任何数量的块进行估计。
然而,它不会返回低于记忆拒绝费用的值。

estimatesmartpriority nblocks

警告:此接口不稳定,可能会消失或更改!

估计零收费交易需要开始的大致优先级
如果可能,在nblocks块内确认并返回块数
估计有效。

Arguments:
1. nblocks (numeric, required)

Result:
{
“priority” : x.x, (numeric) estimated priority
“blocks” : n (numeric) block number where estimate was found
}

signmessagewithprivkey “privkey” “message”

使用地址的私钥签署消息

Arguments:
1. “privkey” (string, required) The private key to sign the message with.
2. “message” (string, required) The message to create a signature of.

Result:
“signature” (string) The signature of the message encoded in base 64

Examples:

Create the signature

qtum-cli signmessagewithprivkey “privkey” “my message”

Verify the signature

qtum-cli verifymessage “QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX” “signature” “my message”

validateaddress “address”

返回有关给定qtum地址的信息。

Arguments:
1. “address” (string, required) The qtum address to validate

Result:
{
“isvalid” : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.
“address” : “address”, (string) The qtum address validated
“scriptPubKey” : “hex”, (string) The hex encoded scriptPubKey generated by the address
“ismine” : true|false, (boolean) If the address is yours or not
“iswatchonly” : true|false, (boolean) If the address is watchonly
“isscript” : true|false, (boolean) If the key is a script
“pubkey” : “publickeyhex”, (string) The hex value of the raw public key
“iscompressed” : true|false, (boolean) If the address is compressed
“account” : “account” (string) DEPRECATED. The account associated with the address, “” is the default account
“timestamp” : timestamp, (number, optional) The creation time of the key if available in seconds since epoch (Jan 1 1970 GMT)
“hdkeypath” : “keypath” (string, optional) The HD keypath if the key is HD and available
“hdmasterkeyid” : “” (string, optional) The Hash160 of the HD master pubkey
}

Examples:

qtum-cli validateaddress “QPSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc”

root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli   validateaddress  QNNbsCz1X3Hy2uh8twxvxRdUkU5EEbSagw
{
  "isvalid": true,
  "address": "QNNbsCz1X3Hy2uh8twxvxRdUkU5EEbSagw",
  "scriptPubKey": "76a914136846cde7f8f4e6c8ba2c4028501757042a98c888ac",
  "ismine": false,
  "iswatchonly": true,
  "isscript": false,
  "account": "",
  "timestamp": 0
}

root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli   validateaddress  Qjpz4kqXnj1qG1Tw5FoEfYYZd5KpEXzZQ6
{
  "isvalid": true,
  "address": "Qjpz4kqXnj1qG1Tw5FoEfYYZd5KpEXzZQ6",
  "scriptPubKey": "76a914fec04391a19943648863d8a4937dd0b54b1a407188ac",
  "ismine": true,
  "iswatchonly": false,
  "isscript": false,
  "pubkey": "024e730f6ffbbb0fc4514367c6a99a9828f45d353b188a5c78c54725b37d993aef",
  "iscompressed": true,
  "account": "newaddr",
  "timestamp": 1507476091,
  "hdkeypath": "m/88'/0'/13'",
  "hdmasterkeyid": "ad01a7a2602848ccdbdcc3e8acf6fc4116322611"
}

verifymessage “address” “signature” “message”

== Wallet ==

abandontransaction “txid”

将电子钱包交易标记为已放弃
这将标记这个交易和所有的钱包子孙被遗弃,这将允许
因为他们的投入是重要的。 它可以用来替换“卡住”或被驱逐的交易。
它仅适用于未包含在块中且不在mempool中的事务。
它对已经冲突或放弃的交易没有影响。

Arguments:
1. “txid” (string, required) The transaction id

addmultisigaddress nrequired [“key”,…] ( “account” )

在电子钱包中添加必须签署的多重签名地址。
每个密钥都是一个Qtum地址或十六进制编码的公钥。
如果指定了“account”(DEPRECATED),则将该地址分配给该帐户

Arguments:
1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.
2. “keys” (string, required) A json array of qtum addresses or hex-encoded public keys
[
“address” (string) qtum address or hex-encoded public key
…,
]
3. “account” (string, optional) DEPRECATED. An account to assign the addresses to.

Result:
“address” (string) A qtum address associated with the keys.

addwitnessaddress “address”

添加脚本的证人地址(已知pubkey或redeemscript)。
它返回见证脚本。

Arguments:
1. “address” (string, required) An address known to the wallet

Result:
“witnessaddress”, (string) The value of the new address (P2SH of witness script).
}

backupwallet “destination”

将当前的钱包文件安全地拷贝到目的地,这可以是目录或文件名的路径。

bumpfee “txid” ( options )

使用加入RBF交易T的费用飙升,用新的交易B取代。
与给定txid的选择加入的RBF交易必须在钱包中。
该命令将通过减少(或删除)其变更输出来支付额外的费用。
如果变更输出不足以支付增加的费用,则该命令目前将失败
而不是添加新的输入来补偿。 (未来的实施可以改善这一点。)
如果钱包或记忆库包含花费其中一个输出的交易,该命令将失败。
默认情况下,新费用将使用estimatefee自动计算。
用户可以指定估计的确认目标。
或者,用户可以指定totalFee,或者使用RPC setpaytxfee设置更高的费率。
至少,新的费率必须足够高以支付额外的新的中继费用(增值税
由getnetworkinfo返回)进入节点的mempool。

Arguments:
1. txid                  (string, required) The txid to be bumped
2. options               (object, optional)
   {
     "confTarget"        (numeric, optional) Confirmation target (in blocks)
     "totalFee"          (numeric, optional) Total fee (NOT feerate) to pay, in satoshis.
                         In rare cases, the actual fee paid might be slightly higher than the specified
                         totalFee if the tx change output has to be removed because it is too close to
                         the dust threshold.
     "replaceable"       (boolean, optional, default true) Whether the new transaction should still be
                         marked bip-125 replaceable. If true, the sequence numbers in the transaction will
                         be left unchanged from the original. If false, any input sequence numbers in the
                         original transaction that were less than 0xfffffffe will be increased to 0xfffffffe
                         so the new transaction will not be explicitly bip-125 replaceable (though it may
                         still be replacable in practice, for example if it has unconfirmed ancestors which
                         are replaceable).
   }

Result:
{
  "txid":    "value",   (string)  The id of the new transaction
  "origfee":  n,         (numeric) Fee of the replaced transaction
  "fee":      n,         (numeric) Fee of the new transaction
  "errors":  [ str... ] (json array of strings) Errors encountered during processing (may be empty)
}

createcontract “bytecode” (gaslimit gasprice “senderaddress” broadcast)

通过bytecode创建一个合约。

Arguments:
1. “bytecode” (string, required) contract bytcode.
2. gasLimit (numeric or string, optional) gasLimit, default: 2500000, max: 40000000
3. gasPrice (numeric or string, optional) gasPrice QTUM price per gas unit, default: 0.0000004, min:0.0000004
4. “senderaddress” (string, optional) The quantum address that will be used to create the contract.
5. “broadcast” (bool, optional, default=true) Whether to broadcast the transaction or not.

Result:
[
{
“txid” : (string) The transaction id.
“sender” : (string) QTUM address of the sender.
“hash160” : (string) ripemd-160 hash of the sender.
“address” : (string) expected contract address.
}
]

dumpprivkey “address”

显示对应于“地址”的私钥。
然后可以使用importprivkey与此输出

dumpwallet “filename”

以人类可读的格式转储所有钱包钥匙。

encryptwallet “passphrase”

用“密码”加密钱包。 这是第一次加密。
之后,任何与私钥(如发送或签名)进行交互的呼叫
将要求在进行这些呼叫之前设置密码。
使用walletpassphrase调用这个,然后walletlock调用。
如果钱包已经加密,请使用walletpassphrasechange调用。
请注意,这将关闭服务器。

Arguments:
1. “passphrase” (string) The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long.

Examples:

Encrypt you wallet

qtum-cli encryptwallet “my pass phrase”

Now set the passphrase to use the wallet, such as for signing or sending qtum

qtum-cli walletpassphrase “my pass phrase”

Now we can so something like sign

qtum-cli signmessage “address” “test message”

Now lock the wallet again by removing the passphrase

qtum-cli walletlock

getaccount “address”

已过时。 返回与给定地址关联的帐户。

getaccountaddress “account”

已过时。 返回用于接收此帐户付款的当前Qtum地址。

getaddressesbyaccount “account”

已过时。 返回给定帐户的地址列表。

getbalance ( “account” minconf include_watchonly )

如果未指定帐户,则返回服务器的总可用余额。
如果指定了帐户(DEPRECATED),则返回帐户中的余额。
请注意,帐户“”与参数退出不同。
服务器总数可能与默认帐户中的余额不同。

getnewaddress ( “account” )

返回一个用于接收付款的新的Qtum地址。
如果指定了“帐户”(DEPRECATED),则将其添加到地址簿
所以收到的地址将被记入“帐户”。

getrawchangeaddress

返回一个新的Qtum地址,用于接收更改。
这是用于原始交易,不正常使用

getreceivedbyaccount “account” ( minconf )

已过时。 在至少[minconf]确认的交易中,使用返回由地址接收的总金额。

Arguments:
1. “account” (string, required) The selected account, may be the default account using “”.
2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.

Result:
amount (numeric) The total amount in QTUM received for this account.

Examples:

Amount received by the default account with at least 1 confirmation

qtum-cli getreceivedbyaccount “”

Amount received at the tabby account including unconfirmed amounts with zero confirmations

qtum-cli getreceivedbyaccount “tabby” 0

The amount with at least 6 confirmation, very safe

qtum-cli getreceivedbyaccount “tabby” 6

getreceivedbyaddress “address” ( minconf )

至少在minconf确认后,返回给定地址在交易中收到的总金额。

gettransaction “txid” ( include_watchonly )

获取有关电子钱包交易的详细信息

Arguments:
1. “txid” (string, required) The transaction id
2. “include_watchonly” (bool, optional, default=false) Whether to include watch-only addresses in balance calculation and details[]

Result:
{
“amount” : x.xxx, (numeric) The transaction amount in QTUM
“fee”: x.xxx, (numeric) The amount of the fee in QTUM. This is negative and only available for the
‘send’ category of transactions.
“confirmations” : n, (numeric) The number of confirmations
“blockhash” : “hash”, (string) The block hash
“blockindex” : xx, (numeric) The index of the transaction in the block that includes it
“blocktime” : ttt, (numeric) The time in seconds since epoch (1 Jan 1970 GMT)
“txid” : “transactionid”, (string) The transaction id.
“time” : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)
“timereceived” : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)
“bip125-replaceable”: “yes|no|unknown”, (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
may be unknown for unconfirmed transactions not in the mempool
“details” : [
{
“account” : “accountname”, (string) DEPRECATED. The account name involved in the transaction, can be “” for the default account.
“address” : “address”, (string) The qtum address involved in the transaction
“category” : “send|receive”, (string) The category, either ‘send’ or ‘receive’
“amount” : x.xxx, (numeric) The amount in QTUM
“label” : “label”, (string) A comment for the address/transaction, if any
“vout” : n, (numeric) the vout value
“fee”: x.xxx, (numeric) The amount of the fee in QTUM. This is negative and only available for the
‘send’ category of transactions.
“abandoned”: xxx (bool) ‘true’ if the transaction has been abandoned (inputs are respendable). Only available for the
‘send’ category of transactions.
}
,…
],
“hex” : “data” (string) Raw data for transaction
}

Examples:

qtum-cli gettransaction “1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d”
qtum-cli gettransaction “1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d” true

root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli  gettransaction 6731208b07c9a02943d96726e15f74ffb81c27192b9c0a0d923cd67920fd95ab
{
  "amount": 0.00000000,
  "confirmations": 1003,
  "blockhash": "6219415c608ffa7090419e490263b3f347fd69fdac5e9504667a89c47ecb2064",
  "blockindex": 5,
  "blocktime": 1507476768,
  "txid": "6731208b07c9a02943d96726e15f74ffb81c27192b9c0a0d923cd67920fd95ab",
  "walletconflicts": [
  ],
  "time": 1507476768,
  "timereceived": 1507544470,
  "bip125-replaceable": "no",
  "details": [
  ],
  "hex": "02000000021cd7108136debf4d3f8442c7f13a730bfc639865330052f5bf47e0bcc583ca4b000000006b48304502210093963d4fa7abfe0c114f3797c243cdbed11b167bad93d861973bfed2318e0b7902201e5548a576a9c9945ef3820643478d4f44bf451082bb449f0e07e4cff3bfc3880121037d3fd0f02df48648cd0085a107acdb0390d3b20c0f4b64f94439568d15e0b4f5feffffffdcf2599c69f9b0949bfa546bae30075560ba0ad25a30d57feb1a80cf2f867f55010000006a473044022076bd7400d301561a98de17796a5afc0a80c72930c9fae75b609f3dd46125b254022079d1244915424d1e5cc069001128a4fa3f8ca9c930ea5952fb904449fa67ec4b0121037d3fd0f02df48648cd0085a107acdb0390d3b20c0f4b64f94439568d15e0b4f5feffffff02c09ee605000000001976a9147d4bbcad3ac4783153f02975b9d231967402788f88ace0120843170000001976a914b7631938a7cc3ef4fad501e4935291ffec82902f88ac3b5a0000"
}

getunconfirmedbalance

返回服务器的未确认余额

0.00000000

getwalletinfo

Result:
{
“walletversion”: xxxxx, (numeric) the wallet version
“balance”: xxxxxxx, (numeric) the total confirmed balance of the wallet in QTUM
“stake”: xxxxxxx, (numeric) the total stake balance of the wallet in QTUM
“unconfirmed_balance”: xxx, (numeric) the total unconfirmed balance of the wallet in QTUM
“immature_balance”: xxxxxx, (numeric) the total immature balance of the wallet in QTUM
“txcount”: xxxxxxx, (numeric) the total number of transactions in the wallet
“keypoololdest”: xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool
“keypoolsize”: xxxx, (numeric) how many new keys are pre-generated
“unlocked_until”: ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked
“paytxfee”: x.xxxx, (numeric) the transaction fee configuration, set in QTUM/kB
“hdmasterkeyid”: “” (string) the Hash160 of the HD master pubkey
}

{
  "walletversion": 130000,
  "balance": 0.00000000,
  "stake": 0.00000000,
  "unconfirmed_balance": 0.00000000,
  "immature_balance": 0.00000000,
  "txcount": 0,
  "keypoololdest": 1507476091,
  "keypoolsize": 100,
  "paytxfee": 0.00000000,
  "hdmasterkeyid": "ad01a7a2602848ccdbdcc3e8acf6fc4116322611"
}

importaddress “address” ( “label” rescan p2sh )

添加一个脚本(十六进制)或地址,可以看起来像在你的钱包,但不能用于花费。

注意:如果重新扫描为真,此调用可能需要几分钟才能完成。
如果你有完整的公钥,你应该调用importpubkey而不是这个。

注意:如果以十六进制形式导入非标准原始脚本,则将发送发送给它的输出
作为改变,而不是出现在许多RPC中。

Arguments:
1. “script” (string, required) The hex-encoded script (or address)
2. “label” (string, optional, default=”“) An optional label
3. rescan (boolean, optional, default=true) Rescan the wallet for transactions
4. p2sh (boolean, optional, default=false) Add the P2SH version of the script as well

importmulti “requests” “options”

导入地址/脚本(使用私钥或公钥,兑换脚本(P2SH)),以一次只重新扫描所有地址(可以通过选项禁用重新扫描)。

Arguments:
1. requests (array, required) Data to be imported
[ (array of json objects)
{
“scriptPubKey”: “

importprivkey “qtum” ( “label” ) ( rescan )

添加一个私钥(由dumpprivkey返回)到您的钱包。

rguments:
1. “qtumprivkey” (string, required) The private key (see dumpprivkey)
2. “label” (string, optional, default=”“) An optional label
3. rescan (boolean, optional, default=true) Rescan the wallet for transactions

注意:如果重新扫描为真,此调用可能需要几分钟才能完成。

importprunedfunds

进口资金不再重新扫描。 以前必须将相应的地址或脚本包含在钱包中。 针对修剪的钱包。 最终用户负责导入随后花费导入输出的附加事务,或在包含该事务的块链中的点之后重新扫描。

importpubkey “pubkey” ( “label” rescan )

添加一个公共密钥(十六进制),可以看到它们在您的钱包中,但不能用于花费。

Arguments:
1. “pubkey” (string, required) The hex-encoded public key
2. “label” (string, optional, default=”“) An optional label
3. rescan (boolean, optional, default=true) Rescan the wallet for transactions

注意:如果重新扫描为真,此调用可能需要几分钟才能完成。

importwallet “filename”

从钱包转储文件导入密钥(请参阅dumpwallet)。

Arguments:
1. “filename” (string, required) The wallet file

Examples:

Dump the wallet

qtum-cli dumpwallet “test”

Import the wallet

qtum-cli importwallet “test”

keypoolrefill ( newsize )

充满keypool。

Arguments
1. newsize (numeric, optional, default=100) The new keypool size

listaccounts ( minconf include_watchonly)

已过时。 返回具有帐户名称作为键的对象,帐户余额作为值。

Arguments:
1. minconf (numeric, optional, default=1) Only include transactions with at least this many confirmations
2. include_watchonly (bool, optional, default=false) Include balances in watch-only addresses (see ‘importaddress’)

Result:
{ (json object where keys are account names, and values are numeric balances
“account”: x.xxx, (numeric) The property name is the account name, and the value is the total balance for the account.

}

listaddressgroupings

列出拥有共同所有权的地址组
通过共同使用作为投入或由此产生的变化
在过去的交易中

Result:
[
[
[
“address”, (string) The qtum address
amount, (numeric) The amount in QTUM
“account” (string, optional) DEPRECATED. The account
]
,…
]
,…
]

[
  [
    [
      "QNNbsCz1X3Hy2uh8twxvxRdUkU5EEbSagw", 
      4999.99805200, 
      ""
    ]
  ]
]

listlockunspent

返回暂时无法预料的输出列表。
查看lockunspent呼叫来锁定和解锁交易支出。

Result:
[
{
“txid” : “transactionid”, (string) The transaction id locked
“vout” : n (numeric) The vout value
}
,…
]

Examples:

List the unspent transactions

qtum-cli listunspent

Lock an unspent transaction

qtum-cli lockunspent false “[{\”txid\”:\”a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\”,\”vout\”:1}]”

List the locked transactions

qtum-cli listlockunspent

Unlock the transaction again

qtum-cli lockunspent true “[{\”txid\”:\”a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\”,\”vout\”:1}]”

listreceivedbyaccount ( minconf include_empty include_watchonly)

已过时。 按帐户列出余额。

Arguments:
1. minconf (numeric, optional, default=1) 包括在付款之前的最低确认数量。
2. include_empty (bool, optional, default=false) Whether to include accounts that haven’t received any payments.
3. include_watchonly (bool, optional, default=false) Whether to include watch-only addresses (see ‘importaddress’).

Result:
[
{
“involvesWatchonly” : true, (bool) Only returned if imported addresses were involved in transaction
“account” : “accountname”, (string) The account name of the receiving account
“amount” : x.xxx, (numeric) The total amount received by addresses with this account
“confirmations” : n, (numeric) 最近交易的确认数量包括在内
“label” : “label” (string) A comment for the address/transaction, if any
}
,…
]

root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli  listreceivedbyaccount 1 true true
[
  {
    "account": "",
    "amount": 10000.98955200,
    "confirmations": 797
  }, 
  {
    "account": "QiWqN8yUQtqcxBMLbPVFHATxSnXPcucRhs",
    "amount": 0.00000000,
    "confirmations": 0
  }, 
  {
    "account": "help",
    "amount": 0.00000000,
    "confirmations": 0
  }, 
  {
    "account": "newaddr",
    "amount": 0.00000000,
    "confirmations": 0
  }
]

listreceivedbyaddress ( minconf include_empty include_watchonly)

通过接收地址列出余额。

Arguments:
1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.
2. include_empty (bool, optional, default=false) Whether to include addresses that haven’t received any payments.
3. include_watchonly (bool, optional, default=false) Whether to include watch-only addresses (see ‘importaddress’).

Result:
[
{
“involvesWatchonly” : true, (bool) Only returned if imported addresses were involved in transaction
“address” : “receivingaddress”, (string) The receiving address
“account” : “accountname”, (string) DEPRECATED. The account of the receiving address. The default account is “”.
“amount” : x.xxx, (numeric) The total amount in QTUM received by the address
“confirmations” : n, (numeric) The number of confirmations of the most recent transaction included
“label” : “label”, (string) A comment for the address/transaction, if any
“txids”: [
n, (numeric) The ids of transactions received with the address

]
}
,…
]

root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli    listreceivedbyaddress  1  true true 
[
  {
    "involvesWatchonly": true,
    "address": "QNNbsCz1X3Hy2uh8twxvxRdUkU5EEbSagw",
    "account": "",
    "amount": 10000.98955200,
    "confirmations": 808,
    "label": "",
    "txids": [
      "4bca83c5bce047bff5520033659863fc0b733af1c742843f4dbfde368110d71c", 
      "9edc4325fe784524b03624d26ca6f82c6583eb9d0d279a372cfc3b1f47cf6054", 
      "b8fb6587d94008d24835433ff3d3efa9ef507e724838195623ae7fa255687d5c", 
      "557f862fcf801aeb7fd5305ad20aba60550730ae6b54fa9b94b0f9699c59f2dc", 
      "1b785a85cd31c513c661d8892a972ad807364dce4fd751190422f7921dcc19e8"
    ]
  }, 
  {
    "address": "QUjzLokEjdWRdCYQFEfAM39fWfAJZ3itLz",
    "account": "",
    "amount": 0.00000000,
    "confirmations": 0,
    "label": "",
    "txids": [
    ]
  }, 
  {
    "address": "QW437evYyegfY4uVXJecWwMJTUqGi9VYeX",
    "account": "",
    "amount": 0.00000000,
    "confirmations": 0,
    "label": "",
    "txids": [
    ]
  }, 
  {
    "address": "QasiVgo1astx12gki6hocbSQnyZNaqozwv",
    "account": "",
    "amount": 0.00000000,
    "confirmations": 0,
    "label": "",
    "txids": [
    ]
  }, 
  {
    "address": "Qc1ThzVYicPN68N8xpCWUGmHENy8uuEWum",
    "account": "help",
    "amount": 0.00000000,
    "confirmations": 0,
    "label": "help",
    "txids": [
    ]
  }, 
  {
    "address": "QhRPCHghxWrXZ9yqNzRN288JX9rcWWYLBs",
    "account": "QiWqN8yUQtqcxBMLbPVFHATxSnXPcucRhs",
    "amount": 0.00000000,
    "confirmations": 0,
    "label": "QiWqN8yUQtqcxBMLbPVFHATxSnXPcucRhs",
    "txids": [
    ]
  }, 
  {
    "address": "QiWqN8yUQtqcxBMLbPVFHATxSnXPcucRhs",
    "account": "",
    "amount": 0.00000000,
    "confirmations": 0,
    "label": "",
    "txids": [
    ]
  }, 
  {
    "address": "QisbjLeDmch6hyHfQHevSwaMFCVEwCDAgT",
    "account": "",
    "amount": 0.00000000,
    "confirmations": 0,
    "label": "",
    "txids": [
    ]
  }, 
  {
    "address": "Qjpz4kqXnj1qG1Tw5FoEfYYZd5KpEXzZQ6",
    "account": "newaddr",
    "amount": 0.00000000,
    "confirmations": 0,
    "label": "newaddr",
    "txids": [
    ]
  }
]

listsinceblock ( “blockhash” target_confirmations include_watchonly)

从block [blockhash]获取块中的所有事务,或者省略所有事务

Arguments:
1. “blockhash” (string, optional) The block hash to list transactions since
2. target_confirmations: (numeric, optional) The confirmations required, must be 1 or more
3. include_watchonly: (bool, optional, default=false) Include transactions to watch-only addresses (see ‘importaddress’)
Result:
{
“transactions”: [
“account”:”accountname”, (string) DEPRECATED. The account name associated with the transaction. Will be “” for the default account.
“address”:”address”, (string) The qtum address of the transaction. Not present for move transactions (category = move).
“category”:”send|receive”, (string) The transaction category. ‘send’ has negative amounts, ‘receive’ has positive amounts.
“amount”: x.xxx, (numeric) The amount in QTUM. This is negative for the ‘send’ category, and for the ‘move’ category for moves
outbound. It is positive for the ‘receive’ category, and for the ‘move’ category for inbound funds.
“vout” : n, (numeric) the vout value
“fee”: x.xxx, (numeric) The amount of the fee in QTUM. This is negative and only available for the ‘send’ category of transactions.
“confirmations”: n, (numeric) The number of confirmations for the transaction. Available for ‘send’ and ‘receive’ category of transactions.
When it’s < 0, it means the transaction conflicted that many blocks ago.
“blockhash”: “hashvalue”, (string) The block hash containing the transaction. Available for ‘send’ and ‘receive’ category of transactions.
“blockindex”: n, (numeric) The index of the transaction in the block that includes it. Available for ‘send’ and ‘receive’ category of transactions.
“blocktime”: xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).
“txid”: “transactionid”, (string) The transaction id. Available for ‘send’ and ‘receive’ category of transactions.
“time”: xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).
“timereceived”: xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for ‘send’ and ‘receive’ category of transactions.
“bip125-replaceable”: “yes|no|unknown”, (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
may be unknown for unconfirmed transactions not in the mempool
“abandoned”: xxx, (bool) ‘true’ if the transaction has been abandoned (inputs are respendable). Only available for the ‘send’ category of transactions.
“comment”: “…”, (string) If a comment is associated with the transaction.
“label” : “label” (string) A comment for the address/transaction, if any
“to”: “…”, (string) If a comment to is associated with the transaction.
],
“lastblock”: “lastblockhash” (string) The hash of the last block
}

Examples:

qtum-cli listsinceblock
qtum-cli listsinceblock “000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad” 6
curl –user myusername –data-binary ‘{“jsonrpc”: “1.0”, “id”:”curltest”, “method”: “listsinceblock”, “params”: [“000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad”, 6] }’ -H ‘content-type: text/plain;’ http://127.0.0.1:3889/

{
  "transactions": [
  ],
  "lastblock": "3bd37a5abf310c25252ee1d8516a0e1e7477bba143f416cc5dfeefddad6a3443"
}

listtransactions ( “account” count skip include_watchonly)

返回最多“最近”的交易,跳过帐户“帐户”的第一个“交易”。

Arguments:
1. “account” (string, optional) DEPRECATED. The account name. Should be “*”.
2. count (numeric, optional, default=10) The number of transactions to return
3. skip (numeric, optional, default=0) The number of transactions to skip
4. include_watchonly (bool, optional, default=false) Include transactions to watch-only addresses (see ‘importaddress’)

Result:
[
{
“account”:”accountname”, (string) DEPRECATED. The account name associated with the transaction.
It will be “” for the default account.
“address”:”address”, (string) The qtum address of the transaction. Not present for
move transactions (category = move).
“category”:”send|receive|move”, (string) The transaction category. ‘move’ is a local (off blockchain)
transaction between accounts, and not associated with an address,
transaction id or block. ‘send’ and ‘receive’ transactions are
associated with an address, transaction id and block details
“amount”: x.xxx, (numeric) The amount in QTUM. This is negative for the ‘send’ category, and for the
‘move’ category for moves outbound. It is positive for the ‘receive’ category,
and for the ‘move’ category for inbound funds.
“label”: “label”, (string) A comment for the address/transaction, if any
“vout”: n, (numeric) the vout value
“fee”: x.xxx, (numeric) The amount of the fee in QTUM. This is negative and only available for the
‘send’ category of transactions.
“confirmations”: n, (numeric) The number of confirmations for the transaction. Available for ‘send’ and
‘receive’ category of transactions. Negative confirmations indicate the
transaction conflicts with the block chain
“trusted”: xxx, (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.
“blockhash”: “hashvalue”, (string) The block hash containing the transaction. Available for ‘send’ and ‘receive’
category of transactions.
“blockindex”: n, (numeric) The index of the transaction in the block that includes it. Available for ‘send’ and ‘receive’
category of transactions.
“blocktime”: xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).
“txid”: “transactionid”, (string) The transaction id. Available for ‘send’ and ‘receive’ category of transactions.
“time”: xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).
“timereceived”: xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available
for ‘send’ and ‘receive’ category of transactions.
“comment”: “…”, (string) If a comment is associated with the transaction.
“otheraccount”: “accountname”, (string) DEPRECATED. For the ‘move’ category of transactions, the account the funds came
from (for receiving funds, positive amounts), or went to (for sending funds,
negative amounts).
“bip125-replaceable”: “yes|no|unknown”, (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);
may be unknown for unconfirmed transactions not in the mempool
“abandoned”: xxx (bool) ‘true’ if the transaction has been abandoned (inputs are respendable). Only available for the
‘send’ category of transactions.
}
]

Examples:

List the most recent 10 transactions in the systems

qtum-cli listtransactions

List transactions 100 to 120

qtum-cli listtransactions “*” 20 100

listunspent ( minconf maxconf [“addresses”,…] [include_unsafe] )

返回未用量的事务输出数组
minconf和maxconf(包括)确认之间。
可选地,过滤器只包括支付给指定地址的txouts。

Arguments:
1. minconf (numeric, optional, default=1) The minimum confirmations to filter
2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter
3. “addresses” (string) A json array of qtum addresses to filter
[
“address” (string) qtum address
,…
]
4. include_unsafe (bool, optional, default=true) Include outputs that are not safe to spend
because they come from unconfirmed untrusted transactions or unconfirmed
replacement transactions (cases where we are less sure that a conflicting
transaction won’t be mined).

Result
[ (array of json object)
{
“txid” : “txid”, (string) the transaction id
“vout” : n, (numeric) the vout value
“address” : “address”, (string) the qtum address
“account” : “account”, (string) DEPRECATED. The associated account, or “” for the default account
“scriptPubKey” : “key”, (string) the script key
“amount” : x.xxx, (numeric) the transaction output amount in QTUM
“confirmations” : n, (numeric) The number of confirmations
“redeemScript” : n (string) The redeemScript if scriptPubKey is P2SH
“spendable” : xxx, (bool) Whether we have the private keys to spend this output
“solvable” : xxx (bool) Whether we know how to spend this output, ignoring the lack of keys
}
,…
]

lockunspent unlock ([{“txid”:”txid”,”vout”:n},…])

更新暂时无法预料的输出列表。
暂时锁定(unlock = false)或解锁(unlock = true)指定的事务输出。
如果在解锁时未指定交易输出,则所有当前锁定的交易输出都被解锁。
当消费qtums时,锁定的交易输出将不会通过自动硬币选择来选择。
锁仅存储在内存中。 节点以零锁定输出和锁定输出列表开始
当节点停止或失败时,总是被清除(凭借进程退出)。
另请参阅listunspent调用

Arguments:
1. unlock (boolean, required) Whether to unlock (true) or lock (false) the specified transactions
2. “transactions” (string, optional) A json array of objects. Each object the txid (string) vout (numeric)
[ (json array of json objects)
{
“txid”:”id”, (string) The transaction id
“vout”: n (numeric) The output number
}
,…
]

Result:
true|false (boolean) Whether the command was successful or not

move “fromaccount” “toaccount” amount ( minconf “comment” )

已过时。 将指定金额从您的钱包中的一个帐户移动到另一个。

Arguments:
1. “fromaccount” (string, required) The name of the account to move funds from. May be the default account using “”.
2. “toaccount” (string, required) The name of the account to move funds to. May be the default account using “”.
3. amount (numeric) Quantity of QTUM to move between accounts.
4. (dummy) (numeric, optional) Ignored. Remains for backward compatibility.
5. “comment” (string, optional) An optional comment, stored in the wallet only.

Result:
true|false (boolean) true if successful.

removeprunedfunds “txid”

从钱包中删除指定的交易。 与修剪的钱包一起使用,并作为importprunedfunds的同伴使用。 这将影响钱包余额。

Arguments:
1. “txid” (string, required) The hex-encoded id of the transaction you are deleting

reservebalance [ [amount]]

为true或false,以打开或关闭余额储备。
是一个真实而圆润的分数。
设置未参与网络保护的备用金额。
如果没有提供参数提供当前设置

root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli   reservebalance
{
  "reserve": false,
  "amount": 0.00000000
}
root@iZt4n8tylxryxs5y113fg7Z:~/qtum/qtum# src/qtum-cli   reservebalance true 20
{
  "reserve": true,
  "amount": 20.00000000
}

sendfrom “fromaccount” “toaddress” amount ( minconf “comment” “comment_to” )

DEPRECATED(使用sendtoaddress)。 从帐户发送一个数量到qtum地址。

DEPRECATED (use sendtoaddress). Sent an amount from an account to a qtum address.

Arguments:
1. “fromaccount” (string, required) The name of the account to send funds from. May be the default account using “”.
Specifying an account does not influence coin selection, but it does associate the newly created
transaction with the account, so the account’s balance computation and transaction history can reflect
the spend.
2. “toaddress” (string, required) The qtum address to send funds to.
3. amount (numeric or string, required) The amount in QTUM (transaction fee is added on top).
4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.
5. “comment” (string, optional) A comment used to store what the transaction is for.
This is not part of the transaction, just kept in your wallet.
6. “comment_to” (string, optional) An optional comment to store the name of the person or organization
to which you’re sending the transaction. This is not part of the transaction,
it is just kept in your wallet.

Result:
“txid” (string) The transaction id.

Examples:

Send 0.01 QTUM from the default account to the address, must have at least 1 confirmation

qtum-cli sendfrom “” “QM72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd” 0.01

Send 0.01 from the tabby account to the given address, funds must have at least 6 confirmations

qtum-cli sendfrom “tabby” “QM72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd” 0.01 6 “donation” “seans outpost”

sendmany “fromaccount” {“address”:amount,…} ( minconf “comment” [“address”,…] )

多次发送 金额是双精度浮点数。

Arguments:
1. “fromaccount” (string, required) DEPRECATED. The account to send the funds from. Should be “” for the default account
2. “amounts” (string, required) A json object with addresses and amounts
{
“address”:amount (numeric or string) The qtum address is the key, the numeric amount (can be string) in QTUM is the value
,…
}
3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.
4. “comment” (string, optional) A comment
5. subtractfeefrom (array, optional) A json array with addresses.
The fee will be equally deducted from the amount of each selected address.
Those recipients will receive less qtums than you enter in their corresponding amount field.
If no addresses are specified here, the sender pays the fee.
[
“address” (string) Subtract fee from this address
,…
]

Result:
“txid” (string) The transaction id for the send. Only 1 transaction is created regardless of
the number of addresses.

Examples:

Send two amounts to two different addresses:

qtum-cli sendmany “” “{\”QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\”:0.01,\”Q353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\”:0.02}”

Send two amounts to two different addresses setting the confirmation and comment:

qtum-cli sendmany “” “{\”QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\”:0.01,\”Q353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\”:0.02}” 6 “testing”

Send two amounts to two different addresses, subtract fee from amount:

qtum-cli sendmany “” “{\”QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\”:0.01,\”Q353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\”:0.02}” 1 “” “[\”QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\”,\”Q353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\”]”

sendmanywithdupes “fromaccount” {“address”:amount,…} ( minconf “comment” [“address”,…] )

多次发送 金额是双精度浮点数。 支持重复地址

Arguments:
1. “fromaccount” (string, required) DEPRECATED. The account to send the funds from. Should be “” for the default account
2. “amounts” (string, required) A json object with addresses and amounts
{
“address”:amount (numeric or string) The qtum address is the key, the numeric amount (can be string) in QTUM is the value
,…
}
3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.
4. “comment” (string, optional) A comment
5. subtractfeefrom (array, optional) A json array with addresses.
The fee will be equally deducted from the amount of each selected address.
Those recipients will receive less qtums than you enter in their corresponding amount field.
If no addresses are specified here, the sender pays the fee.
[
“address” (string) Subtract fee from this address
,…
]

Result:
“txid” (string) The transaction id for the send. Only 1 transaction is created regardless of
the number of addresses.

Examples:

Send two amounts to two different addresses:

qtum-cli sendmanywithdupes “” “{\”QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\”:0.01,\”Q353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\”:0.02}”

Send two amounts to two different addresses setting the confirmation and comment:

qtum-cli sendmanywithdupes “” “{\”QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\”:0.01,\”Q353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\”:0.02}” 6 “testing”

Send two amounts to two different addresses, subtract fee from amount:

qtum-cli sendmanywithdupes “” “{\”QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\”:0.01,\”Q353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\”:0.02}” 1 “” “[\”QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\”,\”Q353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\”]”

sendtoaddress “address” amount ( “comment” “comment_to” subtractfeefromamount )

向给定地址发送金额。

Arguments:
1. “address” (string, required) The qtum address to send to.
2. “amount” (numeric or string, required) The amount in QTUM to send. eg 0.1
3. “comment” (string, optional) A comment used to store what the transaction is for.
This is not part of the transaction, just kept in your wallet.
4. “comment_to” (string, optional) A comment to store the name of the person or organization
to which you’re sending the transaction. This is not part of the
transaction, just kept in your wallet.
5. subtractfeefromamount (boolean, optional, default=false) 费用将从发送金额中扣除。收款人的收入比您输入的金额字段少得多。

Result:
“txid” (string) The transaction id.

Examples:

qtum-cli sendtoaddress “QM72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd” 0.1
qtum-cli sendtoaddress “QM72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd” 0.1 “donation” “seans outpost”
qtum-cli sendtoaddress “QM72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd” 0.1 “” “” true

sendtocontract “contractaddress” “data” (amount gaslimit gasprice senderaddress broadcast)

向合同发送资金和数据。

Arguments:
1. “contractaddress” (string, required) The contract address that will receive the funds and data.
2. “datahex” (string, required) data to send.
3. “amount” (numeric or string, optional) The amount in QTUM to send. eg 0.1, default: 0
4. gasLimit (numeric or string, optional) gasLimit, default: 250000, max: 40000000
5. gasPrice (numeric or string, optional) gasPrice Qtum price per gas unit, default: 0.0000004, min:0.0000004
6. “senderaddress” (string, optional) The quantum address that will be used as sender.
7. “broadcast” (bool, optional, default=true) Whether to broadcast the transaction or not.

Result:
[
{
“txid” : (string) The transaction id.
“sender” : (string) QTUM address of the sender.
“hash160” : (string) ripemd-160 hash of the sender.
}
]

Examples:

qtum-cli sendtocontract “c6ca2697719d00446d4ea51f6fac8fd1e9310214” “54f6127f”
qtum-cli sendtocontract “c6ca2697719d00446d4ea51f6fac8fd1e9310214” “54f6127f” 12.0015 6000000 0.0000004 “QM72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd”

setaccount “address” “account”

已过时。 设置与给定地址关联的帐户。

Arguments:
1. “address” (string, required) The qtum address to be associated with an account.
2. “account” (string, required) The account to assign the address to.

Examples:

qtum-cli setaccount “QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX” “tabby”

settxfee amount

设置每kB的交易费。 覆盖paytxfee参数。

Arguments:
1. amount (numeric or string, required) The transaction fee in QTUM/kB

Result
true|false (boolean) Returns true if successful

Examples:

qtum-cli settxfee 0.00001

signmessage “address” “message”

使用地址的私钥签署消息

Arguments:
1. “address” (string, required) The qtum address to use for the private key.
2. “message” (string, required) The message to create a signature of.

Result:
“signature” (string) The signature of the message encoded in base 64

Examples:

Unlock the wallet for 30 seconds

qtum-cli walletpassphrase “mypassphrase” 30

Create the signature

qtum-cli signmessage “QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX” “my message”

Verify the signature

qtum-cli verifymessage “QD1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX” “signature” “my message”

2
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:535475次
    • 积分:8000
    • 等级:
    • 排名:第2915名
    • 原创:287篇
    • 转载:13篇
    • 译文:4篇
    • 评论:70条
    博客专栏
    微信订阅号
    欢迎加入QQ群
    玩家老黄历(微信小程序)
    谢谢支持~
    最新评论