OmniCore RPC API文档

交易创建API
omni_send omni_senddexsell omni_senddexaccept omni_sendissuancecrowdsale omni_sendissuancefixed omni_sendissuancemanaged omni_sendsto omni_sendgrant omni_sendrevoke omni_sendclosecrowdsale omni_sendtrade omni_sendcanceltradesbyprice omni_sendcanceltradesbypair omni_sendcancelalltrades omni_sendchangeissuer omni_sendall omni_sendenablefreezing omni_senddisablefreezing omni_sendfreeze omni_sendunfreeze omni_sendrawtx omni_funded_send omni_funded_sendall
数据查询API
omni_getinfo omni_getbalance omni_getallbalancesforid omni_getallbalancesforaddress omni_getwalletbalances omni_getwalletaddressbalances omni_gettransaction omni_listtransactions omni_listblocktransactions omni_listpendingtransactions omni_getactivedexsells omni_listproperties omni_getproperty omni_getactivecrowdsales omni_getcrowdsale omni_getgrants omni_getsto omni_gettrade omni_getorderbook omni_gettradehistoryforpair omni_gettradehistoryforaddress omni_getactivations omni_getpayload omni_getseedblocks omni_getcurrentconsensushash
裸交易API
omni_decodetransaction omni_createrawtx_opreturn omni_createrawtx_multisig omni_createrawtx_input omni_createrawtx_reference omni_createrawtx_change omni_createpayload_simplesend omni_createpayload_sendall omni_createpayload_dexsell omni_createpayload_dexaccept omni_createpayload_sto omni_createpayload_issuancefixed omni_createpayload_issuancecrowdsale omni_createpayload_issuancemanaged omni_createpayload_closecrowdsale omni_createpayload_grant omni_createpayload_revoke omni_createpayload_changeissuer omni_createpayload_trade omni_createpayload_canceltradesbyprice omni_createpayload_canceltradesbypair omni_createpayload_cancelalltrades omni_createpayload_enablefreezing omni_createpayload_disablefreezing omni_createpayload_freeze omni_createpayload_unfreeze
手续费API
omni_getfeecache omni_getfeetrigger omni_getfeeshare omni_getfeedistribution omni_getfeedistributions
内核配置API
omni_setautocommit
在线工具推荐: Three.js AI纹理开发包 - YOLO合成数据生成器 - GLTF/GLB在线编辑 - 3D模型格式在线转换 - 可编程3D场景编辑器

omni_listtransactions

omni_listtransactions调用返回钱包交易清单,可以使用地址或区块进行过滤。

调用参数

  • txid:地址过滤器,字符串,可选
  • count:返回结果数量,数值,可选,默认值:10
  • skip:跳过结果数量,数值,可选,默认值:0
  • startblock:检索的起始区块,数值,可选,默认值:0
  • endblock :检索的最后区块,数值,可选,默认值:999999999

返回结果

omni_listtransactions调用返回如下数组:

[                                // (array of JSON objects)
  {
    "txid" : "hash",                 // (string) the hex-encoded hash of the transaction
    "sendingaddress" : "address",    // (string) the Bitcoin address of the sender
    "referenceaddress" : "address",  // (string) a Bitcoin address used as reference (if any)
    "ismine" : true|false,           // (boolean) whether the transaction involves an address in the wallet
    "confirmations" : nnnnnnnnnn,    // (number) the number of transaction confirmations
    "fee" : "n.nnnnnnnn",            // (string) the transaction fee in bitcoins
    "blocktime" : nnnnnnnnnn,        // (number) the timestamp of the block that contains the transaction
    "valid" : true|false,            // (boolean) whether the transaction is valid
    "positioninblock" : n,           // (number) the position (index) of the transaction within the block
    "version" : n,                   // (number) the transaction version
    "type_int" : n,                  // (number) the transaction type as number
    "type" : "type",                 // (string) the transaction type as string
    [...]                            // (mixed) other transaction type specific properties
  },
  ...
]

示例代码

~$ omnicore-cli "omni_listtransactions"