{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "TokenCreation",
  "description": "Create a new token.\nThe token id is derived from the [Transaction]\nso it depends also on the creator and the [Nonce].",
  "type": "object",
  "properties": {
    "token_name": {
      "description": "Human-readable name",
      "type": "string"
    },
    "decimals": {
      "description": "Power of 10 that should be considered a full unit of this token.\nAn [Amount] is still always in least units.",
      "type": "integer",
      "format": "uint8",
      "minimum": 0,
      "maximum": 255
    },
    "initial_amount": {
      "description": "Initial balance, which will be held by the creator of the token.",
      "$ref": "#/$defs/Amount"
    },
    "mints": {
      "description": "Addresses which will be able to create more of this token",
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicKeyBytes"
      }
    },
    "user_data": {
      "description": "Arbitrary userdata attached to this transaction",
      "$ref": "#/$defs/UserData"
    }
  },
  "required": [
    "token_name",
    "decimals",
    "initial_amount",
    "mints",
    "user_data"
  ],
  "$defs": {
    "Amount": {
      "description": "256-bit unsigned integer encoded as a hex string",
      "type": "string"
    },
    "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
    },
    "UserData": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "integer",
        "format": "uint8",
        "minimum": 0,
        "maximum": 255
      },
      "minItems": 32,
      "maxItems": 32
    }
  }
}