/build/rpc / assets / raw_attach
getassetpolicy
getassetpolicy "asset_id_or_ticker" ( include_history ) Return the policy entry for a given asset_id or ticker from the registry (if present) Arguments: 1. asset_id_or_ticker (string, required) Asset ID (32-byte hex) or ticker symbol (3-11 chars) 2. include_history (boolean, optional, default=false) Include governance rotation history Result: { (json object) "asset_id" : "str", (string) asset id "policy_bits" : n, (numeric) policy bits "allowed_spk_families" : n, (numeric) allowed script family mask "icu_txid" : "hex", (string) ICU txid "icu_vout" : n, (numeric) ICU vout "unlock_fees_sats" : n, (numeric) unlock threshold in sats "fees_accum_sats" : n, (numeric) accumulated fees in sats "rotation_min_sats" : n, (numeric) minimum rotation value in sats "is_unlocked" : true|false, (boolean) whether bond has been unlocked "issued_total" : n, (numeric) cumulative minted units "burned_total" : n, (numeric) cumulative burned units "ticker" : "str", (string, optional) asset ticker if set "decimals" : n, (numeric, optional) decimals if set "has_kyc" : true|false, (boolean) ZK/KYC enforcement enabled "zk_vk_commitment" : "hex", (string) ZK verifying key commitment "max_root_age" : n, (numeric) Maximum KYC root age in blocks "tfr_flags" : n, (numeric) Transfer flags (e.g., TFR_ANCHOR_REQUIRED) "compliance_root_commit" : "hex", (string, optional) Compliance Merkle root commitment (32-byte hex) "icu_flags" : n, (numeric) ICU structural flags (e.g., WRAP_REQUIRED) "icu_visibility" : n, (numeric) ICU visibility (0=public, 1=holder_only) "issuance_cap_units" : n, (numeric) Issuance cap (0=unlimited) "icu_ctxt_commit" : "hex", (string) SHA256 of ICU ciphertext "icu_plain_commit" : "hex", (string) SHA256 of canonical plaintext "kdf_salt" : "hex", (string) 16-byte encryption salt "policy_quorum_bps" : n, (numeric) Governance quorum in basis points (0=immutable) "policy_epoch" : n, (numeric) Wallet advisory version counter "core_policy_commit" : "hex", (string) SHA256 of immutable core policy "rotation_history" : [ (json array, optional) Historical governance snapshots (only if include_history=true) { (json object) "policy_epoch" : n, (numeric) Epoch number for this snapshot "block_height" : n, (numeric) Block height when rotation occurred "rotation_txid" : "hex", (string) Transaction that rotated to next state "timestamp" : n, (numeric) Block timestamp (Unix epoch) "policy_quorum_bps" : n, (numeric) Quorum at this epoch "issuance_cap_units" : n, (numeric) Issuance cap at this epoch "icu_ctxt_commit" : "hex", (string) ICU ciphertext commitment (for historical text lookup) "icu_plain_commit" : "hex" (string) ICU plaintext commitment }, ... ] } Result: null (json null) asset entry not found Examples: > bitcoin-cli getassetpolicy "<asset_id>" > bitcoin-cli getassetpolicy "GOLD" > bitcoin-cli getassetpolicy "GOLD" true
Signature
getassetpolicy(asset_id_or_ticker: string, include_history?: boolean) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"getassetpolicy","params":["\"<asset_id_or_ticker>\"",false]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| asset_id_or_ticker | string | yes | Asset ID (32-byte hex) or ticker symbol (3-11 chars) |
| include_history | boolean | — | Include governance rotation history |
Result
Type: any
{ (json object) "asset_id" : "str", (string) asset id "policy_bits" : n, (numeric) policy bits "allowed_spk_families" : n, (numeric) allowed script family mask "icu_txid" : "hex", (string) ICU txid "icu_vout" : n, (numeric) ICU vout "unlock_fees_sats" : n, (numeric) unlock threshold in sats "fees_accum_sats" : n, (numeric) accumulated fees in sats "rotation_min_sats" : n, (numeric) minimum rotation value in sats "is_unlocked" : true|false, (boolean) whether bond has been unlocked "issued_total" : n, (numeric) cumulative minted units "burned_total" : n, (numeric) cumulative burned units "ticker" : "str", (string, optional) asset ticker if set "decimals" : n, (numeric, optional) decimals if set "has_kyc" : true|false, (boolean) ZK/KYC enforcement enabled "zk_vk_commitment" : "hex", (string) ZK verifying key commitment "max_root_age" : n, (numeric) Maximum KYC root age in blocks "tfr_flags" : n, (numeric) Transfer flags (e.g., TFR_ANCHOR_REQUIRED) "compliance_root_commit" : "hex", (string, optional) Compliance Merkle root commitment (32-byte hex) "icu_flags" : n, (numeric) ICU structural flags (e.g., WRAP_REQUIRED) "icu_visibility" : n, (numeric) ICU visibility (0=public, 1=holder_only) "issuance_cap_units" : n, (numeric) Issuance cap (0=unlimited) "icu_ctxt_commit" : "hex", (string) SHA256 of ICU ciphertext "icu_plain_commit" : "hex", (string) SHA256 of canonical plaintext "kdf_salt" : "hex", (string) 16-byte encryption salt "policy_quorum_bps" : n, (numeric) Governance quorum in basis points (0=immutable) "policy_epoch" : n, (numeric) Wallet advisory version counter "core_policy_commit" : "hex", (string) SHA256 of immutable core policy "rotation_history" : [ (json array, optional) Historical governance snapshots (only if include_history=true) { (json object) "policy_epoch" : n, (numeric) Epoch number for this snapshot "block_height" : n, (numeric) Block height when rotation occurred "rotation_txid" : "hex", (string) Transaction that rotated to next state "timestamp" : n, (numeric) Block timestamp (Unix epoch) "policy_quorum_bps" : n, (numeric) Quorum at this epoch "issuance_cap_units" : n, (numeric) Issuance cap at this epoch "icu_ctxt_commit" : "hex", (string) ICU ciphertext commitment (for historical text lookup) "icu_plain_commit" : "hex" (string) ICU plaintext commitment }, ... ] } null (json null) asset entry not found
Source: services/core-node/bcore/src/rpc/rawtransaction.cpp:888
C++ symbol: getassetpolicy