Do multiple issuances of a taproot asset, using the same group_key, count conceptually as the same asset, even if they have different asset_ids?


I am trying to understand the minting of Taproot Assets.

In particular I want to understand how to mint more of an existing asset, i.e. add to the existing supply of that asset.

I am experimenting with Taproot Assets using tapd version 0.3.2-alpha:

$ tapcli --version
tapcli version 0.3.2-alpha.rc1 commit=v0.3.2-beta.rc1-2-g3757262

I have managed to create assets on Testnet using the MintAsset API endpoint:

https://lightning.engineering/api-docs/api/taproot-assets/mint/mint-asset/

For example, I can send the following REST message to create an asset:

{
    "short_response": false,
    "asset": {
        "asset_type": 0, // Normal type
        "asset_version": 1, // ASSET_VERSION_V1
        "name": "My asset",
        "amount": 1000,
        "asset_meta": {
            "data": "123456", // Metadata relevant to the asset
            "type": 0 // META_TYPE_OPAQUE
        },
        "new_grouped_asset": true
    }
}

This will successfully enqueue the minting into the next batch, and once the batch is committed, 1000 units of the asset are created, with an asset_id and a group_key. Let’s say the group_key was 0123456789ABCDEF.

Suppose I want now to mint 500 more units of the same asset. If I send the following to the MintAsset API:

{
    "short_response": false,
    "asset": {
        "asset_type": 0, // normal
        "asset_version": 1, // ASSET_VERSION_V1
        "name": "My asset",
        "amount": 500,
        "asset_meta": {
            "data": "123456", // Metadata relevant to the asset
            "type": 0 // META_TYPE_OPAQUE
        },
        "grouped_asset": true,
        "group_key": "0123456789ABCDEF", // the hypothetical group_key hex
    }
}

Then this will mint 500 units of a NEW asset_id, but using the same group_key.

I can now get the balance of the group (1500) with:

tapcli assets balance --by_group --group_key 0123456789ABCDEF

Or I can get the balance resulting from each issuance (1000 or 500) with

tapcli assets balance --asset_id ABCDEF0123456789

And now my question:

  • Should I think of these two assets (which have different asset_ids but the same group_key), as one asset conceptually, because they are in the same group now?
  • Or is there another way to issue more of the same asset, so that multiple issuances have the same asset_id?

I hope my question makes sense. Please let me know if I have misunderstood something, or if my question is not clear.



Source link

Leave a Comment