Rare Bits Developer Documentation

Welcome to the Rare Bits developer hub. You'll find comprehensive guides and documentation to help you start working with Rare Bits as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Listing your Assets on Rare Bits

This page will help you get started with Rare Bits. You'll be up and running in a jiffy!

Thanks for your interest in listing on Rare Bits

There are a few prerequsites for having your assets automatically be listed on the Rare Bits marketplace.

  • Your app must be ERC721-compatible

  • You must have a smart contract live on either the Ethereum Mainnet or one of the testnets (Rinkeby, Ropsten, Kovan, etc.)

  • You must adhere to our token metadata standard (or the draft ERC721 metadata standard)

Adding your contract to Rare Bits

We have a self-service page that you can use to add your token contract. It will automatically check for ERC721-compatibility and whether or not your contract supports a metadata standard.

Click here to add your contract now

For contracts that don't support a metadata-standard, we still may be able to support your contract but it will take longer and require custom work on our end. Please reach out to us: support@rarebits.io

Metadata

The ERC721 specification doesn't include any capacity for token metadata such as images, names, descriptions, tags, etc. on its own.

To get around this, the ERC721 standard gives the option for a token minter to set a URI that provides JSON-formatted metadata for every token that is minted. Our servers automatically check for this URI in order to fill in metadata for your item.

To take advantage of this functionality, make sure your contract has a public tokenURI function that returns the URI for your metadata.

As an example, tokenURI(14) for a robot game could return https://www.robotgame.com/api/tokens/14 which then responds to GET requests with a JSON blob.

Metadata Format

key
type
description
example

name

string

Name to display for the token

"Red Robot #14"

image_url

string

URL for an image to use to represent the token

"https://www.robotgame.com/images/14.png"

home_url

string

URL of the token on your website, will be linked to on the asset's page

"https://www.robotgame.com/robots/14.html"

description

string

Longer description to use for the token

"This is the amazing Robot #14, please buy me!"

tags

Array<String>

List of tags for the asset

["red","rare","fire"]

properties

Array<Object>

Properties to display with the asset. Should be in this format:

[{"key":string, "value":<string or number>, "type": <"string","integer","number">}, ...]

[{"key": "generation", "value": 4, type: "integer"}, {"key": "cooldown", "value": "slow", type: "string"}]

Here's an example response that would be automatically parsed by our system and added to the site:

{
  "name": "Robot token #14",
  "image_url": "https://www.robotgame.com/images/14.png",
  "home_url": "https://www.robotgame.com/robots/14.html",
  "description": "This is the amazing Robot #14, please buy me!",
  "properties": [
    {"key": "generation", "value": 4, type: "integer"}, 
    {"key": "cooldown", "value": "slow", type: "string"}
  ],
  "tags": ["red","rare","fire"]
}

Listing your Assets on Rare Bits


This page will help you get started with Rare Bits. You'll be up and running in a jiffy!

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.