/build/rpc / assets / issuance
mintasset
- workflowissue-an-asset·step 3 of 5Workflow: issue-an-asset · step 3 of 5
mintasset "icu_txid" icu_vout "icu_address" icu_amount "asset_address" asset_amount_btc "asset_id" asset_units policy_bits ( allowed_spk_families unlock_fees_sats {"autofund":bool,"broadcast":bool,"fee_rate":n,"replaceable":bool,"kyc_flags":n,"vk_data":"hex","max_root_age":n,"tfr_flags":n,"icu_payload":"hex","icu_plain_commit":"hex","icu_ctxt_commit":"hex","kdf_salt":"hex","icu_flags":n,"icu_visibility":n,"policy_quorum_bps":n,"issuance_cap_units":n,"issuance_cap":"str","wrapped_key":"hex","suite_id":n,"extras_mask":n,"wrap_commit":"hex","kc_tag":"hex"} ) Mint new asset units (wallet version). 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. icu_amount (numeric or string, required) New ICU BTC amount 5. asset_address (string, required) Asset destination address 6. asset_amount_btc (numeric or string, required) BTC amount for asset output 7. asset_id (string, required) Asset ID to mint 8. asset_units (numeric, required) Number of asset units to mint 9. policy_bits (numeric, required) Policy bits 10. allowed_spk_families (numeric, optional, default=28) Allowed script families 11. unlock_fees_sats (numeric, optional) Unlock threshold 12. 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 "kyc_flags": n, (numeric, optional, default=0) ZK/KYC flags (e.g., KYC_REQUIRED=1) "vk_data": "hex", (string, optional) ZK verification key data (will be chunked and committed) "max_root_age": n, (numeric, optional, default=0) Maximum merkle root age in seconds "tfr_flags": n, (numeric, optional, default=0) Transfer flags (e.g., TFR_ANCHOR_REQUIRED) "icu_payload": "hex", (string, optional) ICU governance payload for ICU_TEXT_CHUNK "icu_plain_commit": "hex", (string, optional) 32-byte plaintext commitment "icu_ctxt_commit": "hex", (string, optional) 32-byte ciphertext commitment "kdf_salt": "hex", (string, optional) 16-byte encryption salt "icu_flags": n, (numeric, optional, default=0) ICU flags (e.g., WRAP_REQUIRED=1) "icu_visibility": n, (numeric, optional, default=0) ICU visibility (0=public, 1=holder_only) "policy_quorum_bps": n, (numeric, optional, default=0) Governance quorum in basis points "issuance_cap_units": n, (numeric, optional, default=0) Issuance cap in base units (0=unlimited) "issuance_cap": "str", (string, optional) Issuance cap expressed in asset units (e.g., "50.0"). Overrides issuance_cap_units. "wrapped_key": "hex", (string, optional) Override for auto-generated wrapped key (UTF-8 hex) "suite_id": n, (numeric, optional, default=0) Cryptographic suite ID for keywrap "extras_mask": n, (numeric, optional, default=0) Keywrap extras: 0x01=wrap_commit, 0x02=kc_tag "wrap_commit": "hex", (string, optional) 32-byte wrap commitment "kc_tag": "hex", (string, optional) 16-byte key confirmation tag } Result: "hex" (string) Transaction ID if broadcast, otherwise hex Examples: > bitcoin-cli mintasset "txid" 0 "bc1q..." 5.1 "bc1q..." 0.001 "asset_id" 1000000 3 28
Signature
mintasset(icu_txid: string, icu_vout: number, icu_address: string, icu_amount: any, asset_address: string, asset_amount_btc: any, asset_id: string, asset_units: number, 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":"mintasset","params":["\"<icu_txid>\"",0,"\"<icu_address>\"","\"<icu_amount>\"","\"<asset_address>\"","\"<asset_amount_btc>\"","\"<asset_id>\"",0,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 |
| icu_address | string | yes | New ICU destination address |
| icu_amount | number | string | yes | New ICU BTC amount |
| asset_address | string | yes | Asset destination address |
| asset_amount_btc | number | string | yes | BTC amount for asset output |
| asset_id | string | yes | Asset ID to mint |
| asset_units | number | yes | Number of asset units to mint |
| policy_bits | number | yes | Policy bits |
| allowed_spk_families | number | — | Allowed script families |
| unlock_fees_sats | number | — | Unlock threshold |
| options | object | — | 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 "kyc_flags": n, (numeric, optional, default=0) ZK/KYC flags (e.g., KYC_REQUIRED=1) "vk_data": "hex", (string, optional) ZK verification key data (will be chunked and committed) "max_root_age": n, (numeric, optional, default=0) Maximum merkle root age in seconds "tfr_flags": n, (numeric, optional, default=0) Transfer flags (e.g., TFR_ANCHOR_REQUIRED) "icu_payload": "hex", (string, optional) ICU governance payload for ICU_TEXT_CHUNK "icu_plain_commit": "hex", (string, optional) 32-byte plaintext commitment "icu_ctxt_commit": "hex", (string, optional) 32-byte ciphertext commitment "kdf_salt": "hex", (string, optional) 16-byte encryption salt "icu_flags": n, (numeric, optional, default=0) ICU flags (e.g., WRAP_REQUIRED=1) "icu_visibility": n, (numeric, optional, default=0) ICU visibility (0=public, 1=holder_only) "policy_quorum_bps": n, (numeric, optional, default=0) Governance quorum in basis points "issuance_cap_units": n, (numeric, optional, default=0) Issuance cap in base units (0=unlimited) "issuance_cap": "str", (string, optional) Issuance cap expressed in asset units (e.g., "50.0"). Overrides issuance_cap_units. "wrapped_key": "hex", (string, optional) Override for auto-generated wrapped key (UTF-8 hex) "suite_id": n, (numeric, optional, default=0) Cryptographic suite ID for keywrap "extras_mask": n, (numeric, optional, default=0) Keywrap extras: 0x01=wrap_commit, 0x02=kc_tag "wrap_commit": "hex", (string, optional) 32-byte wrap commitment "kc_tag": "hex", (string, optional) 16-byte key confirmation tag } |
Result
Type: any
"hex" (string) Transaction ID if broadcast, otherwise hex
Source: services/core-node/bcore/src/wallet/rpc/assets.cpp:3510
C++ symbol: mintasset