How to set JSON Metadata Hash for Ravencoin Assets you want to resell

Ben Fitts
4 min readNov 7, 2018

--

This medium post will attempt to explain how to set your JSON Metadata for your Ravencoin assets in a way that is simple for people to understand. This is especially important if you want to list your assets for sale.

This article assumes you already know how to register a Ravencoin asset. If you’re looking for more general information on Ravencoin assets look here:

When you create an asset one field will ask you for JSON Metadata. This field allows you to attach data to the asset on the blockchain. There are many uses for this metadata. Many of you will be interested in using this metadata to list your asset for sale. With metadata you can let others know that your asset is for sale, list contact information, suggest a price or add a description.

What was confusing to me, was that the field doesn’t just allow me to type in text. It has to be in IPFS hash format.

IPFS is for file transfer and storage. So how does that help us store metadata to show our asset is for sale? It requires a couple extra steps. We can’t just type text into this field.

Here is an example of some JSON code that we can use. It should be fairly self-explanatory what each field is for.

{“description”: “Asset for sale”,“description_mime”: “text/x-markdown; charset=UTF-8”,“contact_email”: “youremail@address.here”,“forsale”: true,“forsale_price”: “100000 RVN”}
  • The description can be something simple like “asset for sale” or you can use it to describe what uses you think this asset might be for.
  • Mime, leave as is.
  • Contact Email is obvious.
  • Forsale is obvious. If you want to sell it this should be set to true.
  • Forsale_price is the price you want to receive for this asset. It’s been discussed that you could use USD or BTC or other methods. I think this is also something that could be negotiated with the user after the fact.

What you want to do is save this data as a text file. I will provide a copy for you to download. The following is a link to a sample file.

rvn-assets-sample.json

Once you’ve downloaded the file, open it and edit the data to change your contact_email and forsale_price.

Save the file.

Then open GlobalUpload.IO.

This site allows you to upload a file and generates the IPFS hash you need to enter into the JSON Metadata field when you create your asset. If you select the JSON file we edited you will get an IPFS hash like:

You’ll take the last part of that which looks like a URL. You want to copy the last part of that which ALWAYS starts with Qm:

QmPVAdC1kmbzgPqTMbagyowE6KVqTbKPd4coaGjwN8gLe3

This is a SAMPLE hash. Don’t use this one. Create your own.

Copy YOUR hash and enter it into the “Add JSON Meta Data Hash” field when you create your asset.

Create your asset as usual.

Once your asset is created you can look it up in one of the Ravencoin asset explorers. If it worked you’ll see something like this:

What other information can I put in my JSON metadata?

This page shows the Ravencoin metadata specification.

https://github.com/RavenProject/Ravencoin/blob/master/assets/asset_metadata_spec.md

Why would I want to use metadata for my contact information?

Even though there will be asset marketplaces, listing it on the asset will make it easiest for people to find. Many people will look for assets on the blockchain, first!

Where can I find those Ravencoin Asset Explorers?

If there are others, let me know! I’m happy to add them.

How can I fix my asset if I registered it without metadata?

Great question. If you made the asset re-issuable, you can re-issue an asset for 100 RVN. When you re-issue the asset you can check the JSON Meta Data field and add your IPFS hash.

  • Go to the Assets tab in your wallet.
  • Select “Manage Owned Assets
  • Select an Asset to Reissue
  • Now you can add your IPFS hash to your asset. It will cost 100 RVN to re-issue.

Got questions? Leave a comment and I’ll try to answer them.

Thanks for the information! Can I send you a tip?

Yes! Thank you. You can send your RVN tips to:
RFV7rtpt9ysoEtmTdNdjW8SbQ81vJGH9n2

Got airdrops? I love to participate in the Ravencoin community!

RQX4t4Et4aURNUwPrBfh4Pz8fCzQraMvpP

--

--