{
  "$id": "https://smatchit.io/schema/pagan",
  "$comment": "To create account bin apxtrib",
  "title": "Pagans identity",
  "description": "A numeric id in the nationchains world",
  "type": "object",
  "properties": {
    "publickey": {
      "title": "Alias's publickey",
      "description": "Public key generate with openpgp.js",
      "type": "string",
      "format": "pgppublickey"
    },
    "alias": {
      "title": "Alias",
      "description": "text to remember easily a public key",
      "type": "string",
      "minLength": 4,
      "pattern": "^[a-z0-9]*$"
    },
    "dt_delete": {
      "title": "Date of death",
      "description": "Date of alias delete request, your will will be apply",
      "type": "string",
      "format": "date-time"
    },
    "will": {
      "title": "Will script after death",
      "description": "This will script will be apply on your data 30 days after your alias death",
      "type": "string"
    }
  },
  "required": ["publickey", "alias"],
  "apxid": "alias",
  "apxuniquekey": ["publickey"],
  "apxidx": [
    { "name": "lst_alias", "keyval": "alias" },
    { "name": "alias", "keyval": "alias" }
  ],
  "apxaccessrights": {
    "owner": { "R": [], "D": [] },
    "anonymous": { "C": [], "R": ["alias"] },
    "pagan": { "R": ["alias", "publickey"] }
  }
}
