{
  "$schema": "http://json-schema.org/draft-04/schema",
  "title": "Account",
  "description": "An account on a ledger",
  "type": "object",
  "properties": {
    "id": {
      "description": "Unique ID",
      "$ref": "Iri.json"
    },
    "name": {
      "description": "Name of the account",
      "$ref": "Identifier.json"
    },
    "balance": {
      "description": "Balance as decimal",
      "$ref": "Amount.json"
    },
    "connector": {
      "description": "DEPRECATED: A link to the account holder's API",
      "$ref": "Iri.json"
    },
    "password": {
      "description": "Account password",
      "type": "string"
    },
    "public_key": {
      "description": "Account public key for signing HTTP requests",
      "type": "string"
    },
    "is_admin": {
      "description": "admin flag",
      "type": "boolean"
    },
    "is_disabled": {
      "description": "Admin users may disable/enable an account",
      "type": "boolean"
    },
    "ledger": {
      "description": "A link the the account's ledger",
      "$ref": "Iri.json"
    },
    "fingerprint": {
      "description": "A fingerprint of the account's client certificate",
      "type": "string",
      "pattern": "^[0-9A-F]{2}(:[0-9A-F]{2}){19,127}$"
    },
    "minimum_allowed_balance": {
      "description": "The minimum balance permitted on this account",
      "oneOf": [{
        "$ref": "Amount.json"
      }, {
        "enum": ["-infinity"]
      }]
    }
  },
  "required": ["name"],
  "additionalProperties": false
}
