{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/immix/json-schema/immix-account-address-row-schema.json",
  "title": "AccountAddressRow",
  "description": "An account address as the API serves it: the `AccountAddressUpdated` record plus the row extras (`globalSequence`; the deprecated `unscaled`, never present since 0.3.3) — the one shape its reads and its commands answer.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/immix-account-addresses-api-openapi.yml#/components/schemas/AccountAddressRow",
  "type": "object",
  "properties": {
    "accountAddressId": {
      "type": "integer",
      "description": "The address's id, minted by the platform and never reused."
    },
    "version": {
      "type": "string",
      "pattern": "^-?[0-9]+$",
      "description": "The row's version: monotonic per record, bumped on every change — served as the ETag and taken by If-Match. int64 as a decimal JSON string"
    },
    "orgId": {
      "type": "integer",
      "description": "Owner-stamped from the account's org."
    },
    "accountId": {
      "type": "integer",
      "description": "The account the address belongs to."
    },
    "assetId": {
      "type": "integer",
      "description": "Refdata reference — carried, not resolved here."
    },
    "chain": {
      "$ref": "#/$defs/AccountAddressUpdatedChain",
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict"
    },
    "status": {
      "$ref": "#/$defs/AccountAddressUpdatedStatus",
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict"
    },
    "source": {
      "$ref": "#/$defs/AccountAddressUpdatedSource",
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict"
    },
    "declaredByUserId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The user who declared a DECLARED address — its verifier must be a different user (SELF_APPROVAL); 0 for OBSERVED rows."
    },
    "address": {
      "type": "string"
    },
    "memo": {
      "type": "string",
      "description": "Memo/tag where the chain needs one; empty-not-null."
    },
    "globalSequence": {
      "$ref": "#/$defs/GlobalSequenceValue"
    },
    "unscaled": {
      "type": "boolean",
      "description": "Never present since 0.3.3: every money value on this API states its own scale on the wire — a policy amount or cap since 0.3.3, an order's and an execution's since 0.3.2, a balance's since 0.3.1 — so a row is never served raw, whether or not this member holds the asset or instrument it references. Kept, deprecated, so a client generated from 0.3.2 still compiles; it goes at the next major.",
      "deprecated": true
    }
  },
  "required": [
    "accountAddressId",
    "version",
    "orgId",
    "accountId",
    "assetId",
    "chain",
    "status",
    "source",
    "address",
    "memo",
    "globalSequence"
  ],
  "$defs": {
    "AccountAddressUpdatedChain": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "BITCOIN",
        "ETHEREUM"
      ],
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict",
      "title": "AccountAddressUpdatedChain"
    },
    "AccountAddressUpdatedSource": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "DECLARED",
        "OBSERVED"
      ],
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict",
      "title": "AccountAddressUpdatedSource"
    },
    "AccountAddressUpdatedStatus": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "UNVERIFIED",
        "VERIFIED",
        "RETIRED"
      ],
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict",
      "title": "AccountAddressUpdatedStatus"
    },
    "GlobalSequenceValue": {
      "type": "string",
      "pattern": "^[0-9]+$",
      "description": "The position as a decimal string — the last change this member had applied, orders, balance readings and algo instances included.",
      "title": "GlobalSequenceValue"
    }
  }
}