-
Notifications
You must be signed in to change notification settings - Fork 49
Static Data
This part of the metadata includes optional static data fields. Currently the colored coins implementation recognizes the following keys:
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.
Asset Name as a free string
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.
A free string describing the Asset's issuer
A free string describing the Asset
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.
A list of free JSON objects.
A special key named meta is used to allow the explorer and client side applications to display said data.
The value of the meta key should be an array of {key,value,type} objects that will be displayed by the explorer.
Data Types that will be parsed by the explorer:
String, Number, Boolean, Date, URL, Email
if a Type is not specified the parser defaults to the JSON datatype (String, Number or Boolean)
Examples:
{key: "user name", value: "username", type: "String"}{key: "birthday", value: "01/01/1970", type: "Date"}