{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "TokenMetadata",
  "description": "Encodes metadata about a custom token",
  "type": "object",
  "properties": {
    "update_id": {
      "description": "number of management operations applied to some token",
      "$ref": "#/$defs/Nonce"
    },
    "admin": {
      "description": "the current token admin",
      "$ref": "#/$defs/PublicKeyBytes"
    },
    "token_name": {
      "description": "the name of the token",
      "type": "string"
    },
    "decimals": {
      "description": "the number of decimals for this token",
      "type": "integer",
      "format": "uint8",
      "minimum": 0,
      "maximum": 255
    },
    "total_supply": {
      "description": "the total supply for this token",
      "$ref": "#/$defs/Amount"
    },
    "mints": {
      "description": "the authorized minting addresses for this token",
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicKeyBytes"
      }
    }
  },
  "required": [
    "update_id",
    "admin",
    "token_name",
    "decimals",
    "total_supply",
    "mints"
  ],
  "$defs": {
    "Nonce": {
      "type": "integer",
      "format": "uint64",
      "minimum": 0
    },
    "PublicKeyBytes": {
      "description": "A byte sequence that names an entity on or off the FastSet network,\ndepending on the name of type which stores this value;\ntypically encoded as an Ed25519 public key,\nbut may have other formats including but not limited to:\n(a) Burn Address - a 32-byte string composed of all 0x00 bytes.\nNote: any funds sent to the burn address will be permenantly lost!",
      "type": "array",
      "items": {
        "type": "integer",
        "format": "uint8",
        "minimum": 0,
        "maximum": 255
      },
      "minItems": 32,
      "maxItems": 32
    },
    "Amount": {
      "description": "256-bit unsigned integer encoded as a hex string",
      "type": "string"
    }
  }
}