/build/rpc / assets / zk_compliance
updatecomplianceroot
updatecomplianceroot "asset_id_or_ticker" "compliance_root_commit" ( options ) Update the compliance root commitment for a KYC asset by building an IssuerReg rotation transaction. The wallet must hold the ICU authority (control over icu_outpoint) to sign the rotation. The compliance_root_commit should be a 32-byte hex string encoding root‖height as expected by the circuit. Arguments: 1. asset_id_or_ticker (string, required) Asset identifier (hex) or ticker 2. compliance_root_commit (string, required) 32-byte compliance root commitment (root‖height) 3. options (json object, optional, default={}) Additional options { "max_root_age": n, (numeric, optional, default=unchanged) Override max_root_age (blocks) "broadcast": bool, (boolean, optional, default=true) Broadcast the transaction } Result: { (json object) "txid" : "hex", (string) Transaction ID "hex" : "hex", (string) Serialized transaction hex "broadcast" : true|false (boolean) Whether the transaction was broadcast } Examples: > bitcoin-cli updatecomplianceroot "GOLD" "a1b2c3d4e5f6789012345678901234567890123456789012345678901234567890" > bitcoin-cli updatecomplianceroot "GOLD" "a1b2c3d4e5f6789012345678901234567890123456789012345678901234567890" '{"max_root_age": 10000}'
Signature
updatecomplianceroot(asset_id_or_ticker: string, compliance_root_commit: string, options?: object) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"updatecomplianceroot","params":["\"<asset_id_or_ticker>\"","\"<compliance_root_commit>\"","{}"]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| asset_id_or_ticker | string | yes | Asset identifier (hex) or ticker |
| compliance_root_commit | string | yes | 32-byte compliance root commitment (root‖height) |
| options | object | — | Additional options { "max_root_age": n, (numeric, optional, default=unchanged) Override max_root_age (blocks) "broadcast": bool, (boolean, optional, default=true) Broadcast the transaction } |
Result
Type: any
{ (json object) "txid" : "hex", (string) Transaction ID "hex" : "hex", (string) Serialized transaction hex "broadcast" : true|false (boolean) Whether the transaction was broadcast }
Source: services/core-node/bcore/src/wallet/rpc/assets.cpp:8753
C++ symbol: updatecomplianceroot