{
  "$schema": "http://json-schema.org/draft-07/schema",
  "$id": "bns-get-name-history",
  "title": "BnsGetNameHistoryResponse",
  "description": "Get a history of all blockchain records of a registered name.",
  "type": "object",
  "patternProperties": {
    "^[0-9]+": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "pattern": "^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+)$"
          },
          "base": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          },
          "buckets": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minItems": 16,
                  "maxItems": 16
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "block_number": {
            "type": "integer",
            "minimum": 0
          },
          "coeff": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "consensus_hash": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{32}"
              },
              {
                "type": "null"
              }
            ]
          },
          "domain": {
            "type": "string",
            "pattern": "^([a-z0-9\\-_.+]{3,37})$"
          },
          "fee": {
            "type": "integer",
            "minimum": 0
          },
          "first_registered": {
            "type": "integer",
            "minimum": 0
          },
          "history_snapshot": {
            "type": "boolean"
          },
          "importer": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^76[aA]914[0-9a-fA-F]{40}88[aA][cC]$"
              },
              {
                "type": "null"
              }
            ]
          },
          "importer_address": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_renewed": {
            "type": "integer",
            "minimum": 0
          },
          "name": {
            "type": "string",
            "pattern": "^([a-z0-9\\-_.+]{3,37}).([a-z0-9\\-_.+]{3,37})$"
          },
          "op": {
            "type": "string",
            "pattern": "^([>?+~:!&*:;#]{1}|>>|>~|::)$"
          },
          "op_fee": {
            "type": "number"
          },
          "opcode": {
            "type": "string",
            "pattern": "^NAME_TRANSFER|NAME_PREORDER|NAME_UPDATE|NAME_REVOKE|NAME_REGISTRATION|NAMESPACE_READY|NAMESPACE_REVEAL|NAMESPACE_PREORDER|NAME_RENEWAL|NAME_IMPORT|ANNOUNCE$"
          },
          "revoked": {
            "type": "boolean"
          },
          "sender": {
            "type": "string",
            "pattern": "^([0-9a-fA-F]+)$"
          },
          "sender_pubkey": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([0-9a-fA-F]+)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "sequence": {
            "type": "integer",
            "minimum": 0
          },
          "recipient": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([0-9a-fA-F]+)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "recipient_address": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "recipient_pubkey": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([0-9a-fA-F]+)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "txid": {
            "type": "string",
            "pattern": "^([0-9a-fA-F]+)$"
          },
          "value_hash": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([0-9a-fA-F]{40})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "vtxindex": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": ["txid", "vtxindex"]
      }
    }
  }
}
