Skip to content

Static Data

Assaf Shomer edited this page Aug 10, 2015 · 18 revisions

This part of the metadata includes optional static data fields. Currently the colored coins implementation recognizes the following keys:

assetId

Including the [assetId](Asset ID) in the metadata during asset transfer, while optional, can expedite processing. Note that one cannot include the Asset ID during issuance because the Asset ID was not yet determined.

assetName

Asset Name as a free string

assetGenesis

This field is required only upon re-issuance of an asset by a minter, regardless of whether the asset is locked or unlocked. The genesis field stores the block and transaction ids of the issuance transaction.

issuer

A free string describing the Asset's issuer

description

A free string describing the Asset

urls

An array of JSON objects, each containing a link to a file (hosted on some remote server) containing data about the asset.

{
    name: String,
    url: String,
    mimeType: String, // mime type of data in that url
    dataHash: String // SHA-256 hash of the data (to allow data verification)
}

the following are predefined names for use with the coloredcoins explorer:
icon - this will be the icon of the asset on asset pages and lists

large_icon - a larger version of the icon to be displayed on larger screens

Other examples:

consider a legal contract describing the issuer's promise to redeem each unit for goods or services in the real world. That legal document file can be hosted on the issuer's company website and linked using the URL data field. A hash of the document can be stored as well to ensure that the issuer (or otherwise host of the data) did not alter it. Both issuers and holders of an asset can thus refer unambiguously to the original contract against which the asset was issued.

userData

JSON object containing an array named meta of {key,value,type} objects is expected in order to allow the explorer and client side applications to display said data, however this field will accept any JSON object in it.

Current data Types that will be parsed on the explorer:
String, Number, Boolean, Date, URL, Email

if a Type is not specified parser should default to the JSON datatype (String, Number or Boolean)

Examples:

{key: "user name", value: "username", type: "String"}
{key: "birthday", value: "01/01/1970", type: "Date"}

Clone this wiki locally