The first step is to create the asset identifier!
One more time, we are doing to use the hash function on three elements:
Here is the formula : asset_id = sha256(genesis_outpoint || asset_tag || asset_meta)
If you have the private key for the bitcoin UTXO, you cannot move Taproot assets if you don’t also have the keys for the asset scripts. The only thing you as the owner of the bitcoin UTXO can do is to commit to the same asset state again ( basically using the same Taproot Assets root hash again) or burn all the assets by not committing to any Taproot Assets root hash anymore.
This is the genesis information of an asset (This information never changes):
Field | Description |
---|---|
genesis_point | The first outpoint of the transaction that created the asset (txid:vout) |
name | The name of the asset |
meta | The hashed meta data of the asset |
asset_id | The asset ID that uniquely identifies the asset |
output_index | The index of the output that carries the unique Taproot Assets commitment in the genesis transaction |
genesis_bootstrap_info | The full genesis information encoded in a portable manner so it can be easily copy pasted for address creation |
This how an asset is defined:
Field | Description |
---|---|
genesis_point | The genesis information |
asset_type | Assert type (normal or collectible) |
amount | The total amount of the asset stored in this Taproot Assets UTXO |
lock_time | An optional locktime, as with Bitcoin transactions |
relative_lock_time | An optional relative lock time, same as Bitcoin transactions |
script_key | The script key of the asset, which can be spent under Taproot semantics |
asset_family | The information related to the key family of an asset (if it exists) |
chain_anchor | Describes where in the chain the asset is currently anchored |
Chain anchor defines where, in the chain, the asset is currently anchored:
Field | Description |
---|---|
anchor_tx | The transaction that anchors the Taproot Assets commitment where the asset resides |
anchor_txid | The txid of the above transaction |
anchor_block_hash | The block hash the contains the anchor transaction above |
anchor_outpoint | The raw internal key that was used to create the anchor Taproot output key |
internal_key | The transaction that anchors the Taproot Assets commitment where the asset resides |
This field contains the full genesis information encoded in a portable manner. All those data are immutable.
The structure can be found here. The methods used to decrypt it are from the tlv library.
It uses Z-Base32 encoder/decoder from the specification from Phil Zimmermann.
You can find an example here: https://github.com/tv42/zbase32
It represents the outpoint of the transaction’s first input that resulted in the creation of the asset.
The OutPointDecoder method is used to decode the data.
The data is decomposed in:
Tag is a human-readable identifier for the asset
The index of the output that carries the unique Taproot Assets commitment in the genesis transaction
Assert type (Normal Type = 0 or Collectible Type = 1).