Last active
September 2, 2016 02:29
-
-
Save deweller/319cc0f33ad7e7e57623 to your computer and use it in GitHub Desktop.
BVAM v1.0.0 draft schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "BVAM v1.0.0", | |
"type": "object", | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"version": "1.0.0-draft", | |
"properties": { | |
"asset": { | |
"type": "string", | |
"maxLength": 24, | |
"description": "The asset name that represents the token" | |
}, | |
"name": { | |
"type": "string", | |
"maxLength": 127, | |
"description": "The full name of the token" | |
}, | |
"short_name": { | |
"type": "string", | |
"maxLength": 24, | |
"description": "A short name of the token" | |
}, | |
"description":{ | |
"type": "string", | |
"maxLength": 2048, | |
"description": "A full description of the token" | |
}, | |
"image": { | |
"type": "string", | |
"format": "uri", | |
"maxLength": 100, | |
"description": "A link a 48x48 PNG image to represent the token on the leaderboard and portfolio views (DEPRECATED: Use the images attribute instead)" | |
}, | |
"images": { | |
"type": "array", | |
"minItems": 1, | |
"maxItems": 3, | |
"items": { "$ref": "#/definitions/image" }, | |
"uniqueItems": true, | |
"description": "One or more images used to represent the token." | |
}, | |
"website": { | |
"type": "string", | |
"format": "uri", | |
"maxLength": 255, | |
"description": "A URI with more information the token" | |
}, | |
"owner": { | |
"$ref": "#/definitions/owner", | |
"description": "Information about the owner of this token" | |
}, | |
"expiration_date": { | |
"type": "string", | |
"format": "date-time", | |
"description": "The expiration date of this token" | |
}, | |
"terms_and_conditions": { | |
"type": "string", | |
"maxLength": 2048, | |
"description": "Terms and conditions applicable to this token" | |
}, | |
"category_schemas": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"maxLength": 128, | |
"description": "A category schema identifier" | |
}, | |
"maxItems": 256, | |
"description": "A list of one or more category schema identifiers that classify this token" | |
}, | |
"category_data": { | |
"type": "object", | |
"description": "Collections of category specific data grouped by each category schema identifier", | |
"additionalProperties": true | |
}, | |
"other": { | |
"type": "array", | |
"minItems": 1, | |
"maxItems": 256, | |
"items": { "$ref": "#/definitions/other_field" }, | |
"uniqueItems": true, | |
"description": "Arbitrary uncategorized data related to this token" | |
}, | |
"signature": { | |
"$ref": "#/definitions/signature", | |
"description": "A cryptographic signature that validates the identity of the creator of the BVAM document" | |
}, | |
"pgpsig": { | |
"type": "string", | |
"format": "uri", | |
"maxLength": 100, | |
"description": "A link to a pgp signature text/file that will or can be used to sign messages by the issuer of this token (DEPRECATED: Use signature to validate ownership)" | |
}, | |
"meta": { | |
"$ref": "#/definitions/meta", | |
"description": "Data about this document" | |
} | |
}, | |
"required": ["asset", "name", "meta"], | |
"additionalProperties": false, | |
"definitions": { | |
"owner": { | |
"type": "object", | |
"properties": { | |
"organization": { | |
"type": "string", | |
"maxLength": 128, | |
"description": "The organization name that owns this token" | |
}, | |
"full_name": { | |
"type": "string", | |
"maxLength": 128, | |
"description": "The full name of the contact for the owner of this token" | |
}, | |
"title": { | |
"type": "string", | |
"maxLength": 128, | |
"description": "The organization title for the owner of this token" | |
}, | |
"support_email": { | |
"type": "string", | |
"format": "email", | |
"maxLength": 128, | |
"description": "The support email for this token" | |
}, | |
"website": { | |
"type": "string", | |
"format": "uri", | |
"maxLength": 255, | |
"description": "The website of the owner of this token" | |
}, | |
"address": { | |
"type": "string", | |
"maxLength": 255, | |
"description": "The full mailing address of the owner of this token" | |
}, | |
"phone": { | |
"type": "string", | |
"maxLength": 32, | |
"description": "The contact phone number for the owner of this token" | |
}, | |
"social_accounts": { | |
"type": "array", | |
"minItems": 1, | |
"items": { "$ref": "#/definitions/social_account" }, | |
"uniqueItems": true, | |
"description": "Social media accounts for the owner of this token" | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"image": { | |
"type": "object", | |
"properties": { | |
"size": { | |
"enum": ["48x48", "64x64", "128x128", "256x256", "svg"], | |
"description": "The size of the image for pixel-based images or svg for SVG images" | |
}, | |
"data": { | |
"type": "string", | |
"format": "string", | |
"maxLength": 20480, | |
"pattern": "^data:(image/gif|image/png|image/jpeg|image/svg\\+xml);base64,[a-zA-Z0-9+/=]+", | |
"description": "The image represented as a base64 encoded data URI" | |
} | |
}, | |
"required": ["size", "data"], | |
"additionalProperties": false | |
}, | |
"social_account": { | |
"type": "object", | |
"properties": { | |
"provider": { | |
"type": "string", | |
"maxLength": 255, | |
"description": "The social media account provider name like facebook or twitter" | |
}, | |
"account_name": { | |
"type": "string", | |
"maxLength": 255, | |
"description": "The social media account username or name" | |
}, | |
"account_uri": { | |
"type": "string", | |
"format": "uri", | |
"maxLength": 255, | |
"description": "A URI for the social media account" | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"other_field": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"maxLength": 64 | |
}, | |
"value": { | |
"type": "string", | |
"maxLength": 255 | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"signature": { | |
"type": "object", | |
"properties": { | |
"certificate_location": { | |
"type": "string", | |
"format": "uri", | |
"maxLength": 255, | |
"pattern": "^https://", | |
"description": "A URI of a website where the x.509 certificate is served beginning with https:/" | |
}, | |
"certificate_chain": { | |
"type": "string", | |
"maxLength": 32768 | |
} | |
}, | |
"oneOf": [ | |
{"required" : ["certificate_location"]}, | |
{"required" : ["certificate_chain"]} | |
], | |
"additionalProperties": false | |
}, | |
"meta": { | |
"type": "object", | |
"properties": { | |
"bvam_version": { | |
"type": "string", | |
"enum": ["1.0.0-draft", "1.0.0"], | |
"description": "The bvam version of this document" | |
}, | |
"generated_by": { | |
"type": "string", | |
"maxLength": 255, | |
"description": "The name of the software used to generate this document" | |
} | |
}, | |
"required": ["bvam_version"], | |
"additionalProperties": false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment