23个版本
0.1.20 | 2024年3月25日 |
---|---|
0.1.15 | 2023年10月4日 |
0.1.10 | 2023年3月23日 |
0.1.1 | 2022年12月1日 |
0.0.2 | 2021年12月30日 |
#1753 in 魔法豆
89KB
2K SLoC
客户端实现
向Verus守护进程发送RPC请求的客户端。
此crate处理由Verus守护进程定义的远程过程调用。它试图成为RPCs的无状态包装器。
备注
- Verus不支持账户,此处不会实现。
地址索引
- getaddressbalance
- getaddressdeltas
- getaddressmempool
- getaddresstxids
- getaddressutxos
- getsnapshot
区块链
- coinsupply < height >
- getbestblockhash
- getblock "hash|height" ( verbosity )
- getblockchaininfo
- getblockcount
- getblockdeltas "blockhash"
- getblockhash index
- getblockhashes timestamp
- getblockheader "hash" ( verbose )
- getchaintips
- getchaintxstats
- getdifficulty
- getmempoolinfo
- getrawmempool ( verbose )
- getspentinfo
- gettxout "txid" n ( includemempool )
- gettxoutproof [ "txid",... ] ( blockhash )
- gettxoutsetinfo
-
kvsearch key -
kvupdate key "value" days passphrase - minerids height
- notaries height timestamp
- verifychain ( checklevel numblocks )
- verifytxoutproof "proof"
- z_gettreestate "hash|height"
控制
- getinfo
- help ( "command" )
- stop
跨链
- MoMoMdata symbol kmdheight ccid
- assetchainproof needs a txid
- calc_MoM height MoMdepth
- getNotarisationsForBlock blockHash
- height_MoM height
- migrate_completeimporttransaction importTx
- migrate_converttoexport rawTx dest_symbol export_amount
- migrate_createimporttransaction burnTx payouts
- scanNotarisationsDB blockHeight symbol [ blocksLimit=1440 ]
披露
z_getpaymentdisclosure "txid" "js_index" "output_index" ("message") z_validatepaymentdisclosure "paymentdisclosure"
生成中
- 生成n个区块
- 获取生成
- 设置生成 generate ( genproclimit )
身份
- 获取身份 "name@ || iid" (height) (txproof) (txproofheight)
- 列出身份 (includecansign) (includewatchonly)
- 恢复身份 "jsonidentity" (returntx)
- 注册身份 "jsonidregistration" (returntx) feeoffer
- 注册名字承诺 "name" "controladdress" ("referralidentity")
- 撤销身份 "nameorID" (returntx)
- 设置身份时间锁 "id@" '{"unlockatblock":absoluteblockheight || "setunlockdelay":numberofblocksdelayafterunlock}' (returntx)
- 签名文件 "address or identity" "filepath/filename" "curentsig"
- 签名信息 "address or identity" "message" "currentsig"
- 更新身份 "jsonidentity" (returntx)
- 验证文件 "address or identity" "signature" "filepath/filename" "checklatest"
- 验证哈希 "address or identity" "signature" "hexhash" "checklatest"
- 验证信息 "address or identity" "signature" "message" "checklatest"
市场
- 关闭报价 ('["offer1_txid", "offer2_txid", ...]') (transparentorprivatefundsdestination) (privatefundsdestination)
- 获取报价 "currencyorid" (iscurrency) (withtx)
- 列出开放报价 (unexpired) (expired)'
- 创建报价 fromaddress '{"changeaddress":"transparentoriaddress", "expiryheight":blockheight, "offer":{"currency":"anycurrency", "amount":...} | {"identity":"idnameoriaddress",...}', "for":{"address":..., "currency":"anycurrency", "amount":...} | {"name":"identityforswap","parent":"parentid","primaryaddresses":["R-address(s)"],"minimumsignatures":1,...}}' (returntx) (feeamount)
- 接受报价 fromaddress '{"txid":"txid" | "tx":"hextx", "changeaddress":"transparentoriaddress", "deliver":"fullidnameoriaddresstodeliver" | {"currency":"currencynameorid","amount":n}, "accept":{"address":"addressorid","currency":"currencynameorid","amount"} | {identitydefinition}}' (returntx) (feeamount)
采矿
- 获取区块补贴 height
- 获取区块模板 ( "jsonrequestobject" )
- 获取本地solps
- 获取采矿信息
- 获取网络hashps ( blocks height )
- 获取网络solps ( blocks height )
- 优先处理交易
- 提交区块 "hexdata" ( "jsonparametersobject" )
网络
- 添加节点 "node" "add|remove|onetry"
- 清除禁止
- 断开节点 "node"
- 获取添加的节点信息 dns ( "node" )
- 获取连接数
- 获取弃用信息
- 获取网络总计
- 获取网络信息
- 获取节点信息
- 列出禁止
- ping
- 设置禁止 "ip(/netmask)" "add|remove" (bantime) (absolute)
原始交易
- 创建原始交易 [{"txid":"id","vout":n},...] {"address":amount,...} ( locktime ) ( expiryheight )
- 解码原始交易 "hexstring"
- 解码脚本 "hex"
- 资助原始交易 "hexstring"
- 获取原始交易 "txid" ( verbose )
- 发送原始交易 "hexstring" ( allowhighfees )
- 签名原始交易 "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )
工具
- 创建多重签名 nrequired ["key",...]
- 估计费用 nblocks
- 估计优先级 nblocks
- 使区块无效 "hash"
- jumblr_deposit "depositaddress"
- jumblr_pause
- jumblr_resume
- jumblr_secret "secretaddress"
- 重新考虑区块 "hash"
- 验证地址 "komodoaddress"
- z_validateaddress "zaddr"
VDXF
- 获取vdxfid "vdxfuri"
钱包
- 添加多重签名地址 nrequired ["key",...] ( "account" )
- 备份钱包 "destination"
- 转换密码 "agamapassphrase"
- 导出私钥 "t-addr"
- 导出钱包 "filename"
- 加密钱包 "passphrase"
-
获取账户 "VRSC_address" -
获取账户地址 "account" -
按账户获取地址 "account" - 获取余额 (
"account"minconf includeWatchonly ) - 获取货币余额 "address" ( minconf friendlynames)
- 获取新地址
( "account" ) - 获取原始更改地址
-
按账户获取收入 "account" ( minconf ) - 按地址获取收入 "VRSC_address" ( minconf )
- 获取交易 "txid" ( includeWatchonly )
- 获取未确认余额
- 获取钱包信息
- 导入地址 "address" ( "label" rescan )
- 导入私钥 "komodoprivkey" ( "label" rescan height secret_key)
- 导入钱包 "filename"
- 密钥池刷新 ( newsize )
-
列出账户 ( minconf includeWatchonly) -
列出地址分组 - 列出锁定未使用
-
按账户列出收入 ( minconf includeempty includeWatchonly) - 按地址列出收入 ( minconf includeempty includeWatchonly)
- listsinceblock ( "区块哈希" 目标确认数 includeWatchonly)
- listtransactions ( "账户" 数量 从 includeWatchonly)
- listunspent ( 最小确认数 最大确认数 ["地址",...] )
- lockunspent 解锁 [{"txid":"txid","vout":n},...]
-
move "来源账户" "目标账户" 金额 ( 最小确认数 "备注" )
- resendwallettransactions
-
sendfrom "来源账户" "目标KMD地址" 金额 ( 最小确认数 "备注" "备注-to" ) - sendmany
"来源账户"{"地址":金额,...} ( 最小确认数 "备注" ["地址",...] ) - sendtoaddress "KMD地址" 金额 ( "备注" "备注-to" 从金额中减去手续费 )
-
setaccount "KMD地址" "账户" - settxfee 金额
- z_exportkey "z地址"
- z_exportviewingkey "z地址"
- z_exportwallet "文件名"
- z_getbalance "地址" ( 最小确认数 )
- z_getnewaddress ( 类型 )
- z_getoperationresult (["操作ID", ... ])
- z_getoperationstatus (["操作ID", ... ])
- z_gettotalbalance ( 最小确认数 includeWatchonly )
- z_importkey "z密钥" ( 重新扫描 开始高度 )
- z_importviewingkey "查看密钥" ( 重新扫描 开始高度 )
- z_importwallet "文件名"
- z_listaddresses ( includeWatchonly )
- z_listoperationids
- z_listreceivedbyaddress "地址" ( 最小确认数 )
- z_listunspent ( 最小确认数 最大确认数 includeWatchonly ["z地址",...] )
- z_mergetoaddress ["来源地址", ... ] "目标地址" ( 手续费 ) ( 透明限制 ) ( 隐藏限制 ) ( 备注 )
- z_sendmany "来源地址" [{"地址":... ,"金额":...},...] ( 最小确认数 ) ( 手续费 )
- z_shieldcoinbase "来源地址" "目标z地址" ( 手续费 ) ( 限制 )
- z_viewtransaction "交易ID"
- zcbenchmark 基准类型 样本数量
- zcrawjoinsplit 原始交易 输入 输出 vpub_old vpub_new
- zcrawkeygen
- zcrawreceive zcsecretkey 加密笔记
- zcsamplejoinsplit
依赖
~9–17MB
~182K SLoC