Skip to content

Instantly share code, notes, and snippets.

@jdogresorg
Last active September 22, 2022 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdogresorg/8e2567603f39edecc9cfdba9356b1903 to your computer and use it in GitHub Desktop.
Save jdogresorg/8e2567603f39edecc9cfdba9356b1903 to your computer and use it in GitHub Desktop.
CIP-25 - Enhanced Asset Information Specification
  CIP: 25
  Title: Enhanced Asset Information Specification
  Author: Jeremy Johnson 
  Discussions-To: https://counterpartytalk.org/t/enhanced-asset-information-specification/6431
  Status: Draft
  Type: Process
  Created: 2022-09-13

Abstract

This CIP proposes extending the basic enhanced asset info to allow for providing more information, such as images, audio, video, files, etc. in a standardized format.

Motivation

Counterparty provides a simple standard for enhanced asset info. This standard is useful, but is limited. By standardizing an additional set of fields which can be defined in the asset enhancement info JSON file, we can allow for much more information to be associated with an asset in a standardized way.

Rationale

The goals of this Enhanced Asset Information Specification are as follows:

  • Define list of Supported Asset Description Formats
  • Document the Enhanced Asset Information Specification v1.0.0
  • Define and document the Enhanced Asset Information Specification v2.0.0

Specifications

v1.0.0

Field Definitions

Field Type Description
asset String The name of the token. Must match your token's name exactly. 24 characters max.
description String A longish description about this token. 2048 characters max.
image String A link a 48x48 PNG image to represent the token on the leaderboard and portfolio views. The text itself must be a valid URL that starts with "http://" or "https://" (100 characters max). The image the URL references must be in PNG format (the URL must end in .png). It must be 48x48, and it must use the RGB or RGBA color palette. If any of these are not correct, the system will reject it.
website String A link to the website for the token. 100 characters max. Must be a valid URL that starts with "http://" or "https://"
pgpsig String A link to a pgp signature text/file that will or can be used to sign messages by the issuer of this token. 100 characters max. Must be a valid URL that starts with "http://" or "https://"

v2.0.0

Field Definitions

Field Type Description
name String The full name of the token
owner Object Information about the owner of this token
contacts Array Information about how to contact the owner of this token
categories Array Information on what type of categories this token falls into
social Array Social media accounts related to this token
images Array One or more images used to represent the token
audio Array One or more audio files related to the token
video Array One or more video files related to the token
files Array One or more files related to the token
dns Array One or more DNS records related to the token.

Supported Asset Description Formats

Below are a number of formats which should be recognized by block explorers.

IMAGE Format

Formathttps://domain.com/imagename.jpg
NoteURL must end in gif, jpg, or png
Examplehttps://xchain.io/img/xchain-color-500.png

JSON Format

Formathttps://domain.com/info.json
NoteURL to a JSON file ending in .json
Examplexcp.coindaddy.io/GRUMPYCAT.json

JSON Format with Hash

Formathttps://domain.com/info.json;HASH
HASH64-character sha256 hash
NoteURL to a JSON file ending in .json
Examplexcp.coindaddy.io/GRUMPYCAT.json;96fc96754c913f60e9d7a0be07d76ffbcdc53338295cbd69595e69cf49616c3b

IMGUR Format

Formatimgur/IMAGENAME;TITLE
IMAGENAMEFilename of the image on imgur.com
TITLETitle of the image/artwork
NoteIn the URL https://i.imgur.com/27rd2sB.jpg the IMAGENAME is 27rd2sB.jpg
Exampleimgur/27rd2sB.jpg;MikeInSpace

SOUNDCLOUD Format

Formatsoundcloud/CODE;TITLE
CODEUnique code for the audio on soundcloud.com
TITLEthe title of the song/artwork
NoteIn the URL https://api.soundcloud.com/tracks/924613324 the CODE is 924613324
Examplesoundcloud/924613324;Back in Blood

YOUTUBE Format

Formatyoutube/CODE;TITLE
CODEUnique code for the video on youtube.com
TITLEthe title of the video/artwork
NoteIn the URL https://www.youtube.com/watch?v=FenVJ_cyE5M the CODE is FenVJ_cyE5M
Exampleyoutube/FenVJ_cyE5M;Can't Suck Dick!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment