Language

Choose a language

/build/rpc / assets / zk_compliance

rotatezk

rotatezk "icu_txid" icu_vout "icu_address" "asset_id" ( {"vk_data":"hex","compliance_root":"hex","max_root_age":n,"tfr_flags":n,"autofund":bool,"broadcast":bool,"fee_rate":n} ) Rotate ZK verification parameters for an asset (mutable, no unlock fee bump required). Updates max_root_age, zk_vk_commitment, tfr_flags without governance overhead. Requires spending the current ICU (issuer) output. Arguments: 1. icu_txid (string, required) Current ICU transaction ID 2. icu_vout (numeric, required) Current ICU output index 3. icu_address (string, required) New ICU destination address 4. asset_id (string, required) Asset ID to rotate 5. options (json object, optional) ZK rotation options { "vk_data": "hex", (string, optional) New ZK verification key data (will be chunked and committed) "compliance_root": "hex", (string, optional) New compliance Merkle root commitment (32-byte hex) "max_root_age": n, (numeric, optional) Maximum merkle root age in blocks "tfr_flags": n, (numeric, optional) Transfer validation flags "autofund": bool, (boolean, optional, default=true) Automatically fund transaction fees "broadcast": bool, (boolean, optional, default=false) Broadcast after signing "fee_rate": n, (numeric, optional) Fee rate in sat/vB } Result: "hex" (string) Transaction ID if broadcast, otherwise hex Examples: > bitcoin-cli rotatezk "icu_txid" 0 "bc1q..." "asset_id" '{"max_root_age": 2016}'

Signature

rotatezk(icu_txid: string, icu_vout: number, icu_address: string, asset_id: string, options?: object) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"rotatezk","params":["\"<icu_txid>\"",0,"\"<icu_address>\"","\"<asset_id>\"",{}]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
icu_txidstringyesCurrent ICU transaction ID
icu_voutnumberyesCurrent ICU output index
icu_addressstringyesNew ICU destination address
asset_idstringyesAsset ID to rotate
optionsobjectZK rotation options { "vk_data": "hex", (string, optional) New ZK verification key data (will be chunked and committed) "compliance_root": "hex", (string, optional) New compliance Merkle root commitment (32-byte hex) "max_root_age": n, (numeric, optional) Maximum merkle root age in blocks "tfr_flags": n, (numeric, optional) Transfer validation flags "autofund": bool, (boolean, optional, default=true) Automatically fund transaction fees "broadcast": bool, (boolean, optional, default=false) Broadcast after signing "fee_rate": n, (numeric, optional) Fee rate in sat/vB }

Result

Type:  any

"hex" (string) Transaction ID if broadcast, otherwise hex

Source: services/core-node/bcore/src/wallet/rpc/assets.cpp:5916

C++ symbol: rotatezk