Language

Choose a language

/build/rpc / assets / issuance

burnasset

burnasset "icu_txid" icu_vout "asset_txid" asset_vout "icu_address" icu_amount "asset_id" policy_bits ( allowed_spk_families unlock_fees_sats {"autofund":bool,"broadcast":bool,"fee_rate":n,"replaceable":bool} ) Burn asset units (wallet version). Arguments: 1. icu_txid (string, required) Current ICU transaction ID 2. icu_vout (numeric, required) Current ICU output index 3. asset_txid (string, required) Asset UTXO transaction ID 4. asset_vout (numeric, required) Asset UTXO output index 5. icu_address (string, required) New ICU destination address 6. icu_amount (numeric or string, required) New ICU BTC amount 7. asset_id (string, required) Asset ID being burned 8. policy_bits (numeric, required) Policy bits 9. allowed_spk_families (numeric, optional, default=28) Allowed script families 10. unlock_fees_sats (numeric, optional) Unlock threshold 11. options (json object, optional) Options { "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 "replaceable": bool, (boolean, optional, default=true) Enable RBF } Result: "hex" (string) Transaction ID if broadcast, otherwise hex Examples: > bitcoin-cli burnasset "icu_txid" 0 "asset_txid" 1 "bc1q..." 5.1 "asset_id" 3 28

Signature

burnasset(icu_txid: string, icu_vout: number, asset_txid: string, asset_vout: number, icu_address: string, 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":"burnasset","params":["\"<icu_txid>\"",0,"\"<asset_txid>\"",0,"\"<icu_address>\"","\"<icu_amount>\"","\"<asset_id>\"",0,28,0,{}]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
icu_txidstringyesCurrent ICU transaction ID
icu_voutnumberyesCurrent ICU output index
asset_txidstringyesAsset UTXO transaction ID
asset_voutnumberyesAsset UTXO output index
icu_addressstringyesNew ICU destination address
icu_amountnumber | stringyesNew ICU BTC amount
asset_idstringyesAsset ID being burned
policy_bitsnumberyesPolicy bits
allowed_spk_familiesnumberAllowed script families
unlock_fees_satsnumberUnlock threshold
optionsobjectOptions { "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 "replaceable": bool, (boolean, optional, default=true) Enable RBF }

Result

Type:  any

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

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

C++ symbol: burnasset