Skip to content

[bug]: Minting an asset without metadata returns an error #1574

Open
@jamaljsr

Description

@jamaljsr

Background

Minting returns an error when minting an asset without any metadata. This command worked in v0.5.0, but not in v0.5.1 & v0.6.0. I was originally running litd v0.14.0-alpha but also tested with tapd standalone to confirm the behavior.

tapcli assets mint --type normal --name TEST --supply 1000
[tapcli] unable to mint asset: rpc error: code = Unknown desc = meta data missing

Now I have to explicitly set the metadata to an empty JSON object for the mint to succeed.

tapcli assets mint --type normal --name TEST --supply 1000 --meta_type json --meta_bytes "{}"

Your environment

tapcli getinfo                       # version of `tapd`, `lnd`, and network
{
    "version":  "0.5.0-alpha commit=v0.5.0",
    "lnd_version":  "0.19.0-beta.rc4",
    "network":  "regtest",
    "lnd_identity_pubkey":  "03d59b6f89d49e36056c93f7734fc1b8fb3c0f928709c86eeb7ef05370e65f4d55",
    "node_alias":  "nancy",
    "block_height":  302,
    "block_hash":  "267bcb12d205236e100d83b0298e638c6a353ef4abd959bde62f2148f6c300b6",
    "sync_to_chain":  true
}

uname -mrsv                          # operating system 
Linux 6.10.14-linuxkit #1 SMP Tue Apr 15 16:00:54 UTC 2025 aarch64

bitcoind --version || btcd --version # version of `btcd`, `bitcoind`, or other backend
Bitcoin Core version v27.0.0
  • any other relevant environment details

Steps to reproduce

Run this command:

tapcli assets mint --type normal --name TEST --supply 1000

Expected behavior

I expect the command to succeed and return output like this:

{
    "pending_batch":  {
        "batch_key":  "03f02c50b0a2563c5b8d8d7e5f467aeff59e8de38d66a841f5fe62d481549925e3",
        "batch_txid":  "",
        "state":  "BATCH_STATE_PENDING",
        "assets":  [
            {
                "asset_version":  "ASSET_VERSION_V0",
                "asset_type":  "NORMAL",
                "name":  "TEST",
                "asset_meta":  null,
                "amount":  "1000",
                "new_grouped_asset":  false,
                "group_key":  "",
                "group_anchor":  "",
                "group_internal_key":  null,
                "group_tapscript_root":  "",
                "script_key":  {
                    "pub_key":  "582c60fcbc7c8290215ecef0ffda47239190e81f6605f61ddbb2ede9105f6775",
                    "key_desc":  {
                        "raw_key_bytes":  "0280fcf483bfb4edccfe1f6bf87dc122c2f28d55c70f97d3e8925822c9703cb39d",
                        "key_loc":  {
                            "key_family":  212,
                            "key_index":  0
                        }
                    },
                    "tap_tweak":  ""
                }
            }
        ],
        "created_at":  "1748395153",
        "height_hint":  302,
        "batch_psbt":  ""
    }
}

Actual behavior

It returns the following error instead:

tapcli assets mint --type normal --name TEST --supply 1000
[tapcli] unable to mint asset: rpc error: code = Unknown desc = meta data missing

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions