{
  "$id": "https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0006/schema.json",
  "$schema": "http://json-schema.org/draft-07/schema",
  "default": {},
  "description": "Additional information for Cardano Stake Pools in CIP-6 format",
  "examples": [
    {
      "serial": 2020072001,
      "pool": {
        "id": "5ee7591bf30eaa4f5dce70b4a676eb02d5be8012d188f04fe3beffb0",
        "country": "DE",
        "status": "active",
        "contact": {
          "primary": "email",
          "email": "help@pooldomain.org",
          "facebook": "demopool",
          "github": "demopool",
          "feed": "https://demopool.com/xml/poolrss.xml",
          "telegram": "demopool",
          "twitter": "demopool"
        },
        "media_assets": {
          "icon_png_64x64": "https://mydemopool.com/icon.png",
          "logo_png": "https://mydemopool.com/logo.png",
          "logo_svg": "https://mydemopool.com/logo.svg",
          "color_fg": "#RRGGBB",
          "color_bg": "#RRGGBB"
        },
        "itn": {
          "owner": "ed25519_pk1...",
          "witness": "ed25519_sig1..."
        }
      }
    }
  ],
  "maxLength": 4096,
  "required": [
    "serial",
    "pool"
  ],
  "title": "Extended stake pool metadata",
  "type": "object",
  "properties": {
    "serial": {
      "$id": "#/properties/serial",
      "default": 0,
      "description": "Integer number incremented on every update, by using YYYYMMDDxx (xx each day start by 01 and is incremented on each update",
      "examples": [
        2021012001
      ],
      "maxLength": 10,
      "minLength": 10,
      "required": [],
      "title": "serial number",
      "type": "integer"
    },
    "pool": {
      "$id": "#/properties/pool",
      "default": {},
      "description": "pool related metadata",
      "required": [
        "id"
      ],
      "title": "stake pool",
      "type": "object",
      "properties": {
        "id": {
          "$id": "#/properties/pool/properties/id",
          "type": "string",
          "title": "Pool ID",
          "description": "the pools unique id in hex format",
          "maxLength": 56,
          "minLength": 56,
          "examples": [
            "5ee7591bf30eaa4f5dce70b4a676eb02d5be8012d188f04fe3beffb0"
          ]
        },
        "country": {
          "$id": "#/properties/pool/properties/country",
          "default": "",
          "description": "3 letter country code as defined in https://www.iso.org/iso-3166-country-codes.html (alpha-3)",
          "maxLength": 20,
          "minLength": 2,
          "examples": [
            "JPN"
          ],
          "title": "declared pool location",
          "type": "string"
        },
        "status": {
          "$id": "#/properties/pool/properties/status",
          "default": "",
          "maxLength": 12,
          "description": "the current operative status (see examples).",
          "examples": [
            "active",
            "retired",
            "offline",
            "experimental",
            "private"
          ],
          "title": "pool status",
          "type": "string"
        },
        "contact": {
          "$id": "#/properties/pool/properties/contact",
          "default": {},
          "description": "Optional contact information.",
          "examples": [
            {
              "primary": "email",
              "email": "help@demopool.org",
              "facebook": "demopool",
              "github": "demopool",
              "feed": "https://mydemopool.com/xml/poolrss.xml",
              "telegram": "demopool",
              "telegram_channel": "https://t.me/coolchannel",
              "twitter": "demopool"
            }
          ],
          "required": [
            "primary"
          ],
          "title": "Pool contact data",
          "type": "object",
          "properties": {
            "primary": {
              "$id": "#/properties/pool/properties/contact/properties/primary",
              "default": "email",
              "description": "the pools preferred communication channel",
              "title": "primary contact preference",
              "type": "string"
            },
            "email": {
              "$id": "#/properties/pool/properties/contact/properties/email",
              "description": "valid email contact address",
              "title": "email address",
              "type": "string"
            },
            "facebook": {
              "$id": "#/properties/pool/properties/contact/properties/facebook",
              "description": "a user or page name",
              "title": "facebook account",
              "examples": [
                "demopool"
              ],
              "type": "string"
            },
            "github": {
              "$id": "#/properties/pool/properties/contact/properties/github",
              "description": "a github username",
              "examples": [
                "demopool"
              ],
              "title": "github account",
              "type": "string"
            },
            "feed": {
              "$id": "#/properties/pool/properties/contact/properties/feed",
              "default": "",
              "description": "RSS feed URL",
              "examples": [
                "https://mydemopool.com/xml/poolrss.xml"
              ],
              "title": "RSS feed",
              "type": "string"
            },
            "telegram": {
              "$id": "#/properties/pool/properties/contact/properties/telegram",
              "description": "a telegram username",
              "examples": [
                "demopool"
              ],
              "title": "telegram account",
              "type": "string"
            },
            "twitter": {
              "$id": "#/properties/pool/properties/contact/properties/twitter",
              "description": "a twitter username",
              "examples": [
                "demopool"
              ],
              "title": "twitter account",
              "type": "string"
            }
          }
        },
        "media_assets": {
          "$id": "#/properties/pool/properties/media_assets",
          "type": "object",
          "title": "The pools media assets",
          "description": "Media file URLs and colors",
          "required": [
            "icon_png_64x64"
          ],
          "properties": {
            "icon_png_64x64": {
              "$id": "#/properties/pool/properties/media_assets/properties/icon_png_64x64",
              "type": "string",
              "title": "Pool Icon in PNG file format 64x64 px",
              "description": "PNG image with exact 64x64 pixel size",
              "examples": [
                "https://mydemopool.com/media/icon64.png"
              ]
            },
            "logo_png": {
              "$id": "#/properties/pool/properties/media_assets/properties/logo_png",
              "type": "string",
              "title": "Pool Logo in PNG file format",
              "description": "PNG image (should have less than 250 kByte of file size)",
              "examples": [
                "https://mydemopool.com/media/logo.png"
              ]
            },
            "logo_svg": {
              "$id": "#/properties/pool/properties/media_assets/properties/logo_svg",
              "type": "string",
              "title": "Pool Logo in SVG file format",
              "description": "(should have less tha 250 kByte of file size)",
              "examples": [
                "https://mydemopool.com/media/logo.svg"
              ]
            },
            "color_fg": {
              "$id": "#/properties/pool/properties/media_assets/properties/color_fg",
              "type": "string",
              "title": "Pool primary color",
              "description": "RGB color code.",
              "examples": [
                "#AABBCC"
              ]
            },
            "color_bg": {
              "$id": "#/properties/pool/properties/media_assets/properties/color_bg",
              "type": "string",
              "title": "Pool secondary color",
              "description": "RGB color code.",
              "default": "",
              "examples": [
                "#C0C0C0"
              ]
            }
          }
        },
        "itn": {
          "$id": "#/properties/pool/properties/itn",
          "type": "object",
          "title": "ITN verification",
          "description": "A proof of ownership for an established ITN pool brand.",
          "required": [
            "owner",
            "witness"
          ],
          "properties": {
            "owner": {
              "$id": "#/properties/pool/properties/itn/properties/owner",
              "type": "string",
              "title": "the ITN pool owner public key",
              "examples": [
                "ed25519_pk1..."
              ]
            },
            "witness": {
              "$id": "#/properties/pool/properties/itn/properties/witness",
              "type": "string",
              "title": "the secret key generated witness",
              "examples": [
                "ed25519_sig1..."
              ]
            }
          }
        }
      }
    }
  }
}