/build/rpc / assets / registry
getassetinfo
- workflowissue-an-asset·step 2 of 5Workflow: issue-an-asset · step 2 of 5
getassetinfo "asset" Return registry information about a specific asset. Arguments: 1. asset (string, required) Asset ID (hex) or ticker Result: { (json object) "asset_id" : "hex", (string) Asset identifier "ticker" : "str", (string, optional) Ticker if registered "decimals" : n, (numeric, optional) Decimals if registered "policy_bits" : n, (numeric) Policy bitfield "allowed_spk_families" : n, (numeric) Allowed script families mask "icu_txid" : "hex", (string) Current ICU transaction "icu_vout" : n, (numeric) Current ICU vout "unlock_fees_sats" : n, (numeric) Unlock threshold in satoshis "fees_accum_sats" : n, (numeric) Accumulated fees in satoshis "rotation_min_sats" : n (numeric, optional) Observed minimum rotation value } Examples: > bitcoin-cli getassetinfo GOLD > bitcoin-cli getassetinfo <asset_id>
Signature
getassetinfo(asset: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"getassetinfo","params":["\"<asset>\""]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| asset | string | yes | Asset ID (hex) or ticker |
Result
Type: any
{ (json object) "asset_id" : "hex", (string) Asset identifier "ticker" : "str", (string, optional) Ticker if registered "decimals" : n, (numeric, optional) Decimals if registered "policy_bits" : n, (numeric) Policy bitfield "allowed_spk_families" : n, (numeric) Allowed script families mask "icu_txid" : "hex", (string) Current ICU transaction "icu_vout" : n, (numeric) Current ICU vout "unlock_fees_sats" : n, (numeric) Unlock threshold in satoshis "fees_accum_sats" : n, (numeric) Accumulated fees in satoshis "rotation_min_sats" : n (numeric, optional) Observed minimum rotation value }
Source: services/core-node/bcore/src/wallet/rpc/assets.cpp:1499
C++ symbol: getassetinfo