Adding meta data to an asset

If I want to create an asset out of my song, how can I add metadata to this asset?

Hi, @anoushka , welcome!

You can specify an URL when you create your asset. Also, you can create a hash256 value from your song, and specifiy it when you create your asset. This “proves” on the blockchain that you had access to this song at the time of asset creation.

After asset creation you can add information in the note field of a transation, up to 1024 bytes, so you can enter URL or IPFS filename here. But don’t forget that others can access it, as the note field of the Algorand blockchain is public. If you want to store information in a secure way, encrypt it first.

If I add my meta data to that URL, will it be on the blockchain?

No, definitely not. It will be on the http server the url points to.
See also ARCs/arc-0003.md at main · algorandfoundation/ARCs · GitHub
and ARCs/arc-0069.md at main · algorandfoundation/ARCs · GitHub

1 Like

then how do I keep it on chain?

Volume data should be stored separately, not on the blockchain.
Only a pointer to the volume data – in your case a pointer to your song – should be stored on the blockchain.

To complement @Maugli’s answer: you can store small amounts of data on-chain but most blockchains (including Ethereum) are not made to store large amount of data.
This is because storing data has a huge cost (cost of disk) and storing data on chain has even more cost as it’s replicated by all (archival) nodes of the chain.
Because of that, the real cost of storing on-chain needs to be much much higher than storing on AWS S3 for example.

Blockchains provide transparency, immutability, and auditability.
If you want storage, you want to use dedicated solutions such as IPFS (https://ipfs.io/) and https://www.arweave.org/. And then you want to point to the IPFS/arweave location.
Note that doing so does not reduces security: arweave and IPFS URL contains a hash of the data, so that anyone recovering the data from such a service can then check it matches the URL.
In other words, even if IPFS/arweave get attacked, the worst that can happen is that your data is no more accessible. But anyone with a copy of the data can easily put the data back in IPFS/arweave and make it available again.
So you keep all the benefits of the blockchain doing so. But you do not pay the huge cost to store huge amount of data. (You just pay the cost of IPFS pinning for example, which depends on the service you use for pinning.)

Now, for metadata, if you are using ARC-69, ARCs/arc-0069.md at main · algorandfoundation/ARCs · GitHub, the metadata would be on-chain directly as long as it’s small enough (less than 1kB).
If you’re using ARC-3, the metadata is off-chain in IPFS/arweave. But once again, doing so does not remove most advantages of using the blockchain.

1 Like

Thanks a lot, this helps

So if I’m using IPFS, my data won’t be accessible on the blockchain by other accounts?

1 Like

Your data will be accessible by the IPFS filename, stored on the blockchain.
Blockchain data is PUBLIC, so others can read this filename, too.

2 Likes