Omni Core v0.11.0 rpc-api

Posted 看见月亮的人

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Omni Core v0.11.0 rpc-api相关的知识,希望对你有一定的参考价值。

JSON-RPC API

Omni Core 是 Bitcoin Core 的一个分支,在上面添加了 Omni 协议功能支持作为一个新的功能层。因此,与 API 的交互以与比特币核心相同的方式 (JSON-RPC) 完成,只需使用额外的 RPC 即可利用 Omni 协议功能。

由于所有现有的比特币核心功能都是 Omni Core 固有的,默认情况下 RPC 端口保持与8332比特币核心相同。如果您希望将 Omni Core 与 Bitcoin Core 一起运行(例如,通过单独的数据目录),您可以使用-rpcport指定替代端口号的选项。

可以使用 列出所有可用命令"help",可以使用 检索有关特定命令的信息"help "。

请注意:本文档可能并不总是最新的。可能存在错误、遗漏或不准确之处。

目录


Transaction creation

The RPCs for transaction creation can be used to create and broadcast Omni Protocol transactions.

A hash of the broadcasted transaction is returned as result.

omni_send

Create and broadcast a simple send transaction.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
toaddressstringrequiredthe address of the receiver
propertyidnumberrequiredthe identifier of the tokens to send
amountstringrequiredthe amount to send
redeemaddressstringoptionalan address that can spend the transaction dust (sender by default)
referenceamountstringoptionala bitcoin amount that is sent to the receiver (minimal by default)

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_send" "3M9qvHKtgARhqcMtM5cRT9VaiDJ5PSfQGY" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 1 "100.0"

omni_senddexsell

Place, update or cancel a sell offer on the distributed token/BTC exchange.

Please note: this RPC is replaced by:

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
propertyidforsalenumberrequiredthe identifier of the tokens to list for sale
amountforsalestringrequiredthe amount of tokens to list for sale
amountdesiredstringrequiredthe amount of bitcoins desired
paymentwindownumberrequireda time limit in blocks a buyer has to pay following a successful accepting order
minacceptfeestringrequireda minimum mining fee a buyer has to pay to accept the offer
actionnumberrequiredthe action to take (1 for new offers, 2 to update, 3 to cancel)

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_senddexsell" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 1 "1.5" "0.75" 25 "0.0001" 1

omni_sendnewdexorder

Creates a new sell offer on the distributed token/BTC exchange.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
propertyidforsalenumberrequiredthe identifier of the tokens to list for sale
amountforsalestringrequiredthe amount of tokens to list for sale
amountdesiredstringrequiredthe amount of bitcoins desired
paymentwindownumberrequireda time limit in blocks a buyer has to pay following a successful accepting order
minacceptfeestringrequireda minimum mining fee a buyer has to pay to accept the offer

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendnewdexorder" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 1 "1.5" "0.75" 50 "0.0001"

omni_sendupdatedexorder

Updates an existing sell offer on the distributed token/BTC exchange.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
propertyidforsalenumberrequiredthe identifier of the tokens to update
amountforsalestringrequiredthe new amount of tokens to list for sale
amountdesiredstringrequiredthe new amount of bitcoins desired
paymentwindownumberrequireda new time limit in blocks a buyer has to pay following a successful accepting order
minacceptfeestringrequireda new minimum mining fee a buyer has to pay to accept the offer

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendupdatedexorder" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 1 "1.0" "1.75" 50 "0.0001"

omni_sendcanceldexorder

Cancels existing sell offer on the distributed token/BTC exchange.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
propertyidforsalenumberrequiredthe identifier of the tokens to cancel

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendcanceldexorder" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 1

omni_senddexaccept

Create and broadcast an accept offer for the specified token and amount.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
toaddressstringrequiredthe address of the seller
propertyidnumberrequiredthe identifier of the token to purchase
amountstringrequiredthe amount to accept
overridebooleanrequiredoverride minimum accept fee and payment window checks (use with caution!)

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_senddexaccept" \\
    "35URq1NN3xL6GeRKUP6vzaQVcxoJiiJKd8" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 1 "15.0"

omni_senddexpay

Create and broadcast payment for an accept offer.

Please note:
Partial purchases are not possible and the whole accepted amount must be paid.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
toaddressstringrequiredthe address of the seller
propertyidnumberrequiredthe identifier of the token to purchase
amountstringrequiredthe Bitcoin amount to send

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_senddexpay" \\
    "35URq1NN3xL6GeRKUP6vzaQVcxoJiiJKd8" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 1 "15.0"

omni_sendissuancecrowdsale

Create new tokens as crowdsale.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
ecosystemnumberrequiredthe ecosystem to create the tokens in (1 for main ecosystem, 2 for test ecosystem)
typenumberrequiredthe type of the tokens to create: (1 for indivisible tokens, 2 for divisible tokens)
previousidnumberrequiredan identifier of a predecessor token (0 for new crowdsales)
categorystringrequireda category for the new tokens (can be "")
subcategorystringrequireda subcategory for the new tokens (can be "")
namestringrequiredthe name of the new tokens to create
urlstringrequiredan URL for further information about the new tokens (can be "")
datastringrequireda description for the new tokens (can be "")
propertyiddesirednumberrequiredthe identifier of a token eligible to participate in the crowdsale
tokensperunitstringrequiredthe amount of tokens granted per unit invested in the crowdsale
deadlinenumberrequiredthe deadline of the crowdsale as Unix timestamp
earlybonusnumberrequiredan early bird bonus for participants in percent per week
issuerpercentagenumberrequireda percentage of tokens that will be granted to the issuer

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendissuancecrowdsale" \\
    "3JYd75REX3HXn1vAU83YuGfmiPXW7BpYXo" 2 1 0 "Companies" "Bitcoin Mining" \\
    "Quantum Miner" "" "" 2 "100" 1483228800 30 2

omni_sendissuancefixed

Create new tokens with fixed supply.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
ecosystemnumberrequiredthe ecosystem to create the tokens in (1 for main ecosystem, 2 for test ecosystem)
typenumberrequiredthe type of the tokens to create: (1 for indivisible tokens, 2 for divisible tokens)
previousidnumberrequiredan identifier of a predecessor token (0 for new tokens)
categorystringrequireda category for the new tokens (can be "")
subcategorystringrequireda subcategory for the new tokens (can be "")
namestringrequiredthe name of the new tokens to create
urlstringrequiredan URL for further information about the new tokens (can be "")
datastringrequireda description for the new tokens (can be "")
amountstringrequiredthe number of tokens to create

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendissuancefixed" \\
    "3Ck2kEGLJtZw9ENj2tameMCtS3HB7uRar3" 2 1 0 "Companies" "Bitcoin Mining" \\
    "Quantum Miner" "" "" "1000000"

omni_sendissuancemanaged

Create new tokens with manageable supply.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
ecosystemnumberrequiredthe ecosystem to create the tokens in (1 for main ecosystem, 2 for test ecosystem)
typenumberrequiredthe type of the tokens to create: (1 for indivisible tokens, 2 for divisible tokens, 5 for NFTs)
previousidnumberrequiredan identifier of a predecessor token (0 for new tokens)
categorystringrequireda category for the new tokens (can be "")
subcategorystringrequireda subcategory for the new tokens (can be "")
namestringrequiredthe name of the new tokens to create
urlstringrequiredan URL for further information about the new tokens (can be "")
datastringrequireda description for the new tokens (can be "")

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendissuancemanaged" \\
    "3HsJvhr9qzgRe3ss97b1QHs38rmaLExLcH" 2 1 0 "Companies" "Bitcoin Mining" "Quantum Miner" "" ""

omni_sendsto

Create and broadcast a send-to-owners transaction.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
propertyidnumberrequiredthe identifier of the tokens to distribute
amountstringrequiredthe amount to distribute
redeemaddressstringoptionalan address that can spend the transaction dust (sender by default)
distributionpropertynumberoptionalthe identifier of the property holders to distribute to

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendsto" \\
    "32Z3tJccZuqQZ4PhJR2hxHC3tjgjA8cbqz" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 3 "5000"

omni_sendgrant

Issue or grant new units of managed tokens.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
toaddressstringrequiredthe receiver of the tokens (sender by default, can be "")
propertyidnumberrequiredthe identifier of the tokens to grant
amountstringrequiredthe amount of tokens to create
grantdatastringoptionalNFT only: data set in all NFTs created in this grant (default: empty)

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendgrant" "3HsJvhr9qzgRe3ss97b1QHs38rmaLExLcH" "" 51 "7000"

omni_sendrevoke

Revoke units of managed tokens.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
propertyidnumberrequiredthe identifier of the tokens to revoke
amountstringrequiredthe amount of tokens to revoke
memostringoptionala text note attached to this transaction (none by default)

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendrevoke" "3HsJvhr9qzgRe3ss97b1QHs38rmaLExLcH" "" 51 "100"

omni_sendclosecrowdsale

Manually close a crowdsale.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address associated with the crowdsale to close
propertyidnumberrequiredthe identifier of the crowdsale to close

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendclosecrowdsale" "3JYd75REX3HXn1vAU83YuGfmiPXW7BpYXo" 70

omni_sendtrade

Place a trade offer on the distributed token exchange.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to trade with
propertyidforsalenumberrequiredthe identifier of the tokens to list for sale
amountforsalestringrequiredthe amount of tokens to list for sale
propertiddesirednumberrequiredthe identifier of the tokens desired in exchange
amountdesiredstringrequiredthe amount of tokens desired in exchange

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendtrade" "3BydPiSLPP3DR5cf726hDQ89fpqWLxPKLR" 31 "250.0" 1 "10.0"

omni_sendcanceltradesbyprice

Cancel offers on the distributed token exchange with the specified price.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to trade with
propertyidforsalenumberrequiredthe identifier of the tokens listed for sale
amountforsalestringrequiredthe amount of tokens to listed for sale
propertiddesirednumberrequiredthe identifier of the tokens desired in exchange
amountdesiredstringrequiredthe amount of tokens desired in exchange

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendcanceltradesbyprice" "3BydPiSLPP3DR5cf726hDQ89fpqWLxPKLR" 31 "100.0" 1 "5.0"

omni_sendcanceltradesbypair

Cancel all offers on the distributed token exchange with the given currency pair.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to trade with
propertyidforsalenumberrequiredthe identifier of the tokens listed for sale
propertiddesirednumberrequiredthe identifier of the tokens desired in exchange

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendcanceltradesbypair" "3BydPiSLPP3DR5cf726hDQ89fpqWLxPKLR" 1 31

omni_sendcancelalltrades

Cancel all offers on the distributed token exchange.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to trade with
ecosystemnumberrequiredthe ecosystem of the offers to cancel (1 for main ecosystem, 2 for test ecosystem)

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendcancelalltrades" "3BydPiSLPP3DR5cf726hDQ89fpqWLxPKLR" 1

omni_sendchangeissuer

Change the issuer on record of the given tokens.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address associated with the tokens
toaddressstringrequiredthe address to transfer administrative control to
propertyidnumberrequiredthe identifier of the tokens

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendchangeissuer" \\
    "1ARjWDkZ7kT9fwjPrjcQyvbXDkEySzKHwu" "3HTHRxu3aSDV4deakjC7VmsiUp7c6dfbvs" 3

omni_sendall

Transfers all available tokens in the given ecosystem to the recipient.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
toaddressstringrequiredthe address of the receiver
ecosystemnumberrequiredthe ecosystem of the tokens to send (1 for main ecosystem, 2 for test ecosystem)
redeemaddressstringoptionalan address that can spend the transaction dust (sender by default)
referenceamountstringoptionala bitcoin amount that is sent to the receiver (minimal by default)

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendall" "3M9qvHKtgARhqcMtM5cRT9VaiDJ5PSfQGY" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 2

omni_sendenablefreezing

Enables address freezing for a centrally managed property.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from (must be issuer of a managed property)
propertyidnumberrequiredthe identifier of the tokens

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendenablefreezing" "3M9qvHKtgARhqcMtM5cRT9VaiDJ5PSfQGY" 2

omni_senddisablefreezing

Disables address freezing for a centrally managed property.

IMPORTANT NOTE: Disabling freezing for a property will UNFREEZE all frozen addresses for that property!

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from (must be issuer of a managed property)
propertyidnumberrequiredthe identifier of the tokens

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_senddisablefreezing" "3M9qvHKtgARhqcMtM5cRT9VaiDJ5PSfQGY" 2

omni_sendfreeze

Freeze an address for a centrally managed token.

Note: Only the issuer may freeze tokens, and only if the token is of the managed type with the freezing option enabled.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from (must be delegate or issuer of a managed property with freezing enabled
toaddressstringrequiredthe address to freeze
propertyidnumberrequiredthe identifier of the tokens to freeze
amountstringrequiredthe amount to freeze (note: currently unused, frozen addresses cannot transact the property)

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendfreeze" "3M9qvHKtgARhqcMtM5cRT9VaiDJ5PSfQGY" "3HTHRxu3aSDV4deakjC7VmsiUp7c6dfbvs" 2 1000

omni_sendunfreeze

Unfreeze an address for a centrally managed token.

Note: Only the issuer may unfreeze tokens

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from (must be delegate or issuer of a managed property with freezing enabled
toaddressstringrequiredthe address to unfreeze
propertyidnumberrequiredthe identifier of the tokens to unfreeze
amountstringrequiredthe amount to unfreeze (note: currently unused

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendunfreeze" "3M9qvHKtgARhqcMtM5cRT9VaiDJ5PSfQGY" "3HTHRxu3aSDV4deakjC7VmsiUp7c6dfbvs" 2 1000

omni_sendadddelegate

Adds a delegate for the issuance of tokens of a managed property.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe issuer of the tokens
propertyidnumberrequiredthe identifier of the tokens
delegateaddressstringrequiredthe new delegate

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendadddelegate" "12GftZCQ3vwubWmRCmnfZAHdDWXj6ujenx" 21 "14TG9NsTxk2fvH8iGiFcVbquC5NPhHcFjh"

omni_sendremovedelegate

Removes a delegate for the issuance of tokens of a managed property.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe issuer or delegate of the tokens
propertyidnumberrequiredthe identifier of the tokens
delegateaddressstringrequiredthe delegate to be removed

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendremovedelegate" "12GftZCQ3vwubWmRCmnfZAHdDWXj6ujenx" 21 "14TG9NsTxk2fvH8iGiFcVbquC5NPhHcFjh"

omni_sendanydata

Create and broadcast a transaction with an arbitrary payload.

When no receiver is specified, the sender is also considered as receiver.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
datastringrequiredthe hex-encoded data
toaddressstringoptionalthe optional address of the receiver

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendanydata" "3M9qvHKtgARhqcMtM5cRT9VaiDJ5PSfQGY" "646578782032303230"
$ omnicore-cli "omni_sendanydata" "3M9qvHKtgARhqcMtM5cRT9VaiDJ5PSfQGY" "646578782032303230" "3HTHRxu3aSDV4deakjC7VmsiUp7c6dfbvs"

omni_sendrawtx

Broadcasts a raw Omni Layer transaction.

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send from
rawtransactionstringrequiredthe hex-encoded raw transaction
referenceaddressstringoptionala reference address (none by default)
redeemaddressstringoptionalan address that can spend the transaction dust (sender by default)
referenceamountstringoptionala bitcoin amount that is sent to the receiver (minimal by default)

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendrawtx" \\
    "1MCHESTptvd2LnNp7wmr2sGTpRomteAkq8" "000000000000000100000000017d7840" \\
    "1EqTta1Rt8ixAA32DuC29oukbsSWU62qAV"

omni_funded_send

Creates and sends a funded simple send transaction.

All bitcoins from the sender are consumed and if there are bitcoins missing, they are taken from the specified fee source. Change is sent to the fee source!

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send the tokens from
toaddressstringrequiredthe address of the receiver
propertyidnumberrequiredthe identifier of the tokens to send
amountstringrequiredthe amount to send
feeaddressstringrequiredthe address that is used for change and to pay for fees, if needed

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_funded_send" "1DFa5bT6KMEr6ta29QJouainsjaNBsJQhH" \\
    "15cWrfuvMxyxGst2FisrQcvcpF48x6sXoH" 1 "100.0" \\
    "15Jhzz4omEXEyFKbdcccJwuVPea5LqsKM1"

omni_funded_sendall

Creates and sends a transaction that transfers all available tokens in the given ecosystem to the recipient.

All bitcoins from the sender are consumed and if there are bitcoins missing, they are taken from the specified fee source. Change is sent to the fee source!

Arguments:

NameTypePresenceDescription
fromaddressstringrequiredthe address to send the tokens from
toaddressstringrequiredthe address of the receiver
ecosystemnumberrequiredthe ecosystem of the tokens to send (1 for main ecosystem, 2 for test ecosystem)
feeaddressstringrequiredthe address that is used for change and to pay for fees, if needed

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_funded_sendall" "1DFa5bT6KMEr6ta29QJouainsjaNBsJQhH" \\
    "15cWrfuvMxyxGst2FisrQcvcpF48x6sXoH" 1 "15Jhzz4omEXEyFKbdcccJwuVPea5LqsKM1"

omni_sendnonfungible

Create and broadcast a non-fungible send transaction.

Arguments:

NameTypePresenceDescription
addressstringrequiredthe address to send from
toaddressstringrequiredthe address of the receiver
propertyidnumberrequiredthe identifier of the tokens to send
tokenstartnumberrequiredthe first token in the range to send
tokenendnumberrequiredthe last token in the range to send
redeemaddressstringoptionalan address that can spend the transaction dust (sender by default)
referenceamountstringoptionala bitcoin amount that is sent to the receiver (minimal by default)

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_sendnonfungible" "3M9qvHKtgARhqcMtM5cRT9VaiDJ5PSfQGY" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 70 1 1000

omni_setnonfungibledata

Sets either the issuer or holder data field in a non-fungible tokem. Holder data can only be
updated by the token owner and issuer data can only be updated by address that created the tokens.

Arguments:

NameTypePresenceDescription
propertyidnumberrequiredthe property identifier
tokenstartnumberrequiredthe first token in the range to set data on
tokenendnumberrequiredthe last token in the range to set data on
issuerbooleanrequiredif true issuer data set, otherwise holder data set
datastringrequireddata set as in either issuer or holder fields

Result:

"hash"  // (string) the hex-encoded transaction hash

Example:

$ omnicore-cli "omni_setnonfungibledata" 70 50 60 true "string data"

Data retrieval

The RPCs for data retrieval can be used to get information about the state of the Omni ecosystem.

omni_getinfo

Returns various state information of the client and protocol.

Arguments:

None

Result:

Result:
{
  "omnicoreversion_int" : xxxxxxx,      // (number) client version as integer
  "omnicoreversion" : "x.x.x.x-xxx",    // (string) client version
  "mastercoreversion" : "x.x.x.x-xxx",  // (string) client version (DEPRECATED)
  "bitcoincoreversion" : "x.x.x",       // (string) Bitcoin Core version
  "commitinfo" : "xxxxxxx",             // (string) build commit identifier
  "block" : nnnnnn,                     // (number) index of the last processed block
  "blocktime" : nnnnnnnnnn,             // (number) timestamp of the last processed block
  "blocktransactions" : nnnn,           // (number) Omni transactions found in the last processed block
  "totaltransactions" : nnnnnnnn,       // (number) Omni transactions processed in total
  "alerts" : [                          // (array of JSON objects) active protocol alert (if any)
    {
      "alerttype" : n                       // (number) alert type as integer
      "alerttype" : "xxx"                   // (string) alert type (can be "alertexpiringbyblock", "alertexpiringbyblocktime", "alertexpiringbyclientversion" or "error")
      "alertexpiry" : "nnnnnnnnnn"          // (string) expiration criteria (can refer to block height, timestamp or client version)
      "alertmessage" : "xxx"                // (string) information about the alert
    },
    ...
  ]
}

Example:

$ omnicore-cli "omni_getinfo"

omni_getbalance

Returns the token balance for a given address and property.

Arguments:

NameTypePresenceDescription
addressstringrequiredthe address
propertyidnumberrequiredthe property identifier

Result:

{
  "balance" : "n.nnnnnnnn",  // (string) the available balance of the address
  "reserved" : "n.nnnnnnnn", // (string) the amount reserved by sell offers and accepts
  "frozen" : "n.nnnnnnnn"    // (string) the amount frozen by the issuer (applies to managed properties only)
}

Example:

$ omnicore-cli "omni_getbalance", "1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P" 1

omni_getallbalancesforid

Returns a list of token balances for a given currency or property identifier.

Arguments:

NameTypePresenceDescription
propertyid以上是关于Omni Core v0.11.0 rpc-api的主要内容,如果未能解决你的问题,请参考以下文章

Paddle v0.11.0 发布,百度深度学习开源平台

Omni 全节点搭建

Centos7.6部署k8s v1.16.4高可用集群(主备模式)

Centos7.6部署k8s v1.16.4高可用集群(主备模式)

使用 MiniZip 库读取 omni.jar 存档文件

omn​​iORB::MaxMessageSize 在omni 4

(c)2006-2024 SYSTEM All Rights Reserved IT常识