<p>In order to use Mesh for Cip 68 you will need to concat the (hexed)assetname with the correct prefix in order to avoid Mesh's hex conversion on submission.
Here are the correct prexfixes to add to the asset names:</p>
<pre><code>const refprefix = '000643b0';
const usrprefix = '000de140';
const hexassetName = Buffer.from(`${assetName}`).toString(&quot;hex&quot;);
const hexrefName = Buffer.from(`${refName}`).toString(&quot;hex&quot;);

Here is an example of defining metadata with the cip 68 compliant names         

const asset: any = {
            assetName: `${usrprefix}${hexassetName}`,
            assetQuantity: '1',
            metadata: assetMetadata1,
            label: '0', //721 if you also want cip25(cip 68 will overide) 
            recipient: recipientAddress,
        };  
The last bit is an example of how to create a recipient with inline datum load for transaction. 
const inlineDatumFields = new Map();
              inlineDatumFields.set('name', `${assetName}`);
              inlineDatumFields.set('image', inlineDatumPair2);
              inlineDatumFields.set('description', misc);             

              const inlineDatum: any = {
                alternative: 0,
                fields: [inlineDatumFields, 1, plutus_data],
              };

          const refercenceRecipient: Recipient = {
            address: 'addr',
            datum: {
              value: inlineDatum,
              inline: true,
            },
          };
    I'm sure Mesh will update the process, but this method I have tested to allow metadata retrieval using blockfrost and 'cardano-mode' UTXO view using cardano cli. 
</code></pre>

CC BY-SA 4.0
2023-05-19T05:58:23.427Z
So how we will handle the thing of that one NFT have to be reference nft which will point towards the nft present in script? And also how metadata will get updated in reference nft according to other nft?
duaa azhar
CC BY-SA 4.0
2023-05-20T12:28:03.613Z
Mint the Reference NFT with the const '000643b0' prefix, and create the User asset with the prefix const '000de140'. When The nft is queried for metadata...the prefix tells the requester to look for the reference nft and read the metadata for the User nft there.
const inlineDatumFields = new Map();
              inlineDatumFields.set('name', `${assetName}`);
              inlineDatumFields.set('image', inlineDatumPair2);
Ref. contains the Metadata..user is the pointer to said metadata, lItems are linked by having user and ref prefix + same asset name. @duaaazhar
Dominick Garey
CC BY-SA 4.0
2023-05-16T14:12:08.807Z
2023-05-16T14:16:05.970Z
2023-05-16T14:16:05.970Z
Dominick Garey
<p>Check this <a href="https://meshjs.dev/apis/transaction/minting" rel="nofollow noreferrer">Mint with CIP-68 demo and sample codes</a>.</p>

CC BY-SA 4.0
2024-08-04T08:57:27.567Z
2024-08-04T08:57:27.567Z
Jingles
<p>I want to write the code for <strong>minting NFTs with CIP68 update</strong>. Like i need such NFTs whose metadata could be updated instead of minting the new NFT everytime. I searched about it and get to know that cardano has now allowed such functionality according to <a href="https://cips.cardano.org/cips/cip68/" rel="nofollow noreferrer">cip68</a></p>
<p>I have initially tried minting the NFTs with mesh library and also with cardano serialization library but i dont know about how do i implement according to cip68 standard in mesh.
Is there any resources or implementation available to mint the NFTs according to this CIP68 standard? I got one in CIP68 repo but its in Plutus (Haskell) and i am finding it difficult to implement with offchain. Here's the <a href="https://github.com/spacebudz/ref-impl-cip68/blob/main/onchain.hs" rel="nofollow noreferrer">link</a> for that.</p>
<p>Kindly guide me through this, it will be very helpful.
Thanks in Advance</p>

<cardano-node><nft><cardano-serialization-lib><mesh><cip>
NFT Minting with cip68 standard
# NFT Minting with cip68 standard

(Asked by: username_0 on 2023-05-15)

I want to write the code for **minting NFTs with CIP68 update**. Like i need such NFTs whose metadata could be updated instead of minting the new NFT everytime. I searched about it and get to know that cardano has now allowed such functionality according to [cip68](https://cips.cardano.org/cips/cip68/)

I have initially tried minting the NFTs with mesh library and also with cardano serialization library but i dont know about how do i implement according to cip68 standard in mesh.
Is there any resources or implementation available to mint the NFTs according to this CIP68 standard? I got one in CIP68 repo but its in Plutus (Haskell) and i am finding it difficult to implement with offchain. Here's the [link](https://github.com/spacebudz/ref-impl-cip68/blob/main/onchain.hs) for that.

Kindly guide me through this, it will be very helpful.
Thanks in Advance

**Tags:** cardano-node, nft, cardano-serialization-lib, mesh, cip

---

## 2 answers

### Answer by username_1 on 2023-05-16. Score: 1

In order to use Mesh for Cip 68 you will need to concat the (hexed)assetname with the correct prefix in order to avoid Mesh's hex conversion on submission.
Here are the correct prexfixes to add to the asset names:
const refprefix = '000643b0';
const usrprefix = '000de140';
const hexassetName = Buffer.from(`${assetName}`).toString("hex");
const hexrefName = Buffer.from(`${refName}`).toString("hex");

Here is an example of defining metadata with the cip 68 compliant names         

const asset: any = {
            assetName: `${usrprefix}${hexassetName}`,
            assetQuantity: '1',
            metadata: assetMetadata1,
            label: '0', //721 if you also want cip25(cip 68 will overide) 
            recipient: recipientAddress,
        };  
The last bit is an example of how to create a recipient with inline datum load for transaction. 
const inlineDatumFields = new Map();
              inlineDatumFields.set('name', `${assetName}`);
              inlineDatumFields.set('image', inlineDatumPair2);
              inlineDatumFields.set('description', misc);             

              const inlineDatum: any = {
                alternative: 0,
                fields: [inlineDatumFields, 1, plutus_data],
              };

          const refercenceRecipient: Recipient = {
            address: 'addr',
            datum: {
              value: inlineDatum,
              inline: true,
            },
          };
    I'm sure Mesh will update the process, but this method I have tested to allow metadata retrieval using blockfrost and 'cardano-mode' UTXO view using cardano cli.

> **Comments:**
> **username_0**: So how we will handle the thing of that one NFT have to be reference nft which will point towards the nft present in script? And also how metadata will get updated in reference nft according to other nft?  
> **username_1**: Mint the Reference NFT with the const '000643b0' prefix, and create the User asset with the prefix const '000de140'. When The nft is queried for metadata...the prefix tells the requester to look for the reference nft and read the metadata for the User nft there. const inlineDatumFields = new Map();               inlineDatumFields.set('name', `${assetName}`);               inlineDatumFields.set('image', inlineDatumPair2); Ref. contains the Metadata..user is the pointer to said metadata, lItems are linked by having user and ref prefix + same asset name. @duaaazhar  

---

### Answer by username_2 on 2024-08-04. Score: -1

Check this [Mint with CIP-68 demo and sample codes](https://meshjs.dev/apis/transaction/minting).


---

