/build/rpc / assets / icu
rotateicu_raw
rotateicu_raw "icu_txid" icu_vout "new_icu_address" new_icu_amount "asset_id" policy_bits ( allowed_spk_families unlock_fees_sats {"autofund":bool,"broadcast":bool,"fee_rate":n,"replaceable":bool} ) Rotate ICU to a new address and/or bond amount (pure rotation, no asset minting/burning). Arguments: 1. icu_txid (string, required) Current ICU transaction ID 2. icu_vout (numeric, required) Current ICU output index 3. new_icu_address (string, required) New ICU destination address 4. new_icu_amount (numeric or string, required) New ICU BTC bond amount 5. asset_id (string, required) Asset ID 6. policy_bits (numeric, required) Policy bits (u32) 7. allowed_spk_families (numeric, optional, default=28) Allowed families (u16) 8. unlock_fees_sats (numeric, optional) Unlock threshold sats 9. options (json object, optional) Options { "autofund": bool, (boolean, optional, default=false) Automatically fund using loaded wallet "broadcast": bool, (boolean, optional, default=false) Broadcast after signing with loaded wallet "fee_rate": n, (numeric, optional) Fee rate in sat/vB "replaceable": bool, (boolean, optional, default=wallet default) Signal RBF } Result: { (json object) "hex" : "hex", (string) Raw transaction hex (may be funded/signed depending on options and wallet) "txid" : "hex" (string, optional) Broadcast txid if broadcast=true }
Signature
rotateicu_raw(icu_txid: string, icu_vout: number, new_icu_address: string, new_icu_amount: any, asset_id: string, policy_bits: number, allowed_spk_families?: number, unlock_fees_sats?: number, options?: object) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"rotateicu_raw","params":["\"<icu_txid>\"",0,"\"<new_icu_address>\"","\"<new_icu_amount>\"","\"<asset_id>\"",0,28,0,{}]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| icu_txid | string | yes | Current ICU transaction ID |
| icu_vout | number | yes | Current ICU output index |
| new_icu_address | string | yes | New ICU destination address |
| new_icu_amount | number | string | yes | New ICU BTC bond amount |
| asset_id | string | yes | Asset ID |
| policy_bits | number | yes | Policy bits (u32) |
| allowed_spk_families | number | — | Allowed families (u16) |
| unlock_fees_sats | number | — | Unlock threshold sats |
| options | object | — | Options { "autofund": bool, (boolean, optional, default=false) Automatically fund using loaded wallet "broadcast": bool, (boolean, optional, default=false) Broadcast after signing with loaded wallet "fee_rate": n, (numeric, optional) Fee rate in sat/vB "replaceable": bool, (boolean, optional, default=wallet default) Signal RBF } |
Result
Type: any
{ (json object) "hex" : "hex", (string) Raw transaction hex (may be funded/signed depending on options and wallet) "txid" : "hex" (string, optional) Broadcast txid if broadcast=true }
Source: services/core-node/bcore/src/rpc/rotateicu.cpp:55
C++ symbol: rotateicu_raw