{
  "components": {
    "schemas": {
      "AuthConfiguration": {
        "properties": {
          "data": {
            "properties": {
              "google_url": {
                "type": "string"
              },
              "guest_demo_enabled": {
                "type": "boolean"
              },
              "login_url": {
                "type": "string"
              },
              "me_url": {
                "type": "string"
              },
              "mode": {
                "enum": [
                  "local",
                  "dev-unverified"
                ],
                "type": "string"
              },
              "policy_console_contract": {
                "type": "integer"
              },
              "policy_console_url": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object"
      },
      "Error": {
        "properties": {
          "error": {
            "description": "Human-readable explanation. Do not parse as a stable error code.",
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object",
        "example": {
          "error": "evidence not sealed yet \u2014 retry shortly"
        }
      },
      "LegConfirmation": {
        "properties": {
          "leg_id": {
            "description": "UUID of the leg being confirmed. Observed rails require sealed finality evidence before this call can succeed.",
            "type": "string"
          }
        },
        "required": [
          "leg_id"
        ],
        "type": "object"
      },
      "LoginRequest": {
        "properties": {
          "email": {
            "description": "Onboarded active bank operator email.",
            "type": "string"
          },
          "password": {
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "LoginResponse": {
        "properties": {
          "data": {
            "properties": {
              "email": {
                "type": "string"
              },
              "expires_at": {
                "description": "Unix seconds; current session lifetime is 12 hours.",
                "type": "integer"
              },
              "tenants": {
                "items": {
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "party": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "token": {
                "description": "Identity-only bearer JWT. Treat as a secret.",
                "type": "string"
              }
            },
            "required": [
              "token",
              "expires_at",
              "email",
              "tenants"
            ],
            "type": "object"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object"
      },
      "PolicyActivation": {
        "properties": {
          "gov_hash": {
            "type": "string"
          },
          "leaf_index": {
            "description": "Coordinate for GET /v1/policies/receipts/{leaf_index}/pack.",
            "type": "integer"
          },
          "party": {
            "type": "string"
          },
          "policy_hash": {
            "type": "string"
          },
          "seclogrs": {
            "properties": {},
            "type": "object"
          },
          "source_hash": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "required": [
          "tenant",
          "version",
          "policy_hash",
          "gov_hash",
          "leaf_index"
        ],
        "type": "object"
      },
      "PolicyDeactivation": {
        "properties": {
          "party": {
            "description": "Optional registered counterparty policy key.",
            "type": "string"
          },
          "tenant": {
            "description": "Tenant whose active policy is retired.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PolicyHistory": {
        "properties": {
          "active_in_enclave": {
            "type": "boolean"
          },
          "active_policy_version": {
            "type": "integer"
          },
          "policies": {
            "items": {
              "$ref": "#/components/schemas/PolicyVersion"
            },
            "type": "array"
          }
        },
        "required": [
          "policies",
          "active_in_enclave",
          "active_policy_version"
        ],
        "type": "object"
      },
      "PolicySubmission": {
        "properties": {
          "approver_pub": {
            "description": "A distinct registered live governance Ed25519 key, 32 bytes as hex.",
            "pattern": "^[0-9a-fA-F]{64}$",
            "type": "string"
          },
          "approver_sig": {
            "description": "64-byte Ed25519 signature over exactly the same preimage, produced by the distinct approver.",
            "pattern": "^[0-9a-fA-F]{128}$",
            "type": "string"
          },
          "author_pub": {
            "description": "Registered live governance Ed25519 key, 32 bytes as 64 hex characters.",
            "pattern": "^[0-9a-fA-F]{64}$",
            "type": "string"
          },
          "author_sig": {
            "description": "64-byte Ed25519 signature (128 hex characters) over the frame.policy.v2 framed preimage.",
            "pattern": "^[0-9a-fA-F]{128}$",
            "type": "string"
          },
          "catalog_version": {
            "description": "Optional authoring catalogue version. Recorded as submitter-provided metadata, not cryptographic proof of the lowering.",
            "type": "string"
          },
          "ciphertext_b64": {
            "description": "Base64 crypto_box_seal ciphertext of the versioned governance JSON payload, including CEL. Verify the enclave sealing key before encrypting. Raw CEL alone is not a valid current payload.",
            "type": "string"
          },
          "expiry": {
            "description": "Unix SECONDS at which the approval expires; zero means no expiry. Included in both signatures.",
            "type": "integer"
          },
          "name": {
            "description": "Optional display name, outside the sealed policy.",
            "type": "string"
          },
          "party": {
            "description": "Optional registered counterparty. When set, the counterparty UUID is the policy key used in the signature and version lineage.",
            "type": "string"
          },
          "rules": {
            "description": "Optional plaintext authoring metadata retained by the host. Omit to keep the bank policy source confidential.",
            "type": "string"
          },
          "source_hash": {
            "description": "32-byte hex source-document commitment, BLAKE3(DomainSep(frame.policy.source.v1, source bytes)). Empty means the all-zero absent commitment.",
            "type": "string"
          },
          "tenant": {
            "description": "Tenant whose live governance key registry authorizes both signers. Send explicitly.",
            "type": "string"
          }
        },
        "required": [
          "ciphertext_b64",
          "author_pub",
          "author_sig",
          "approver_pub",
          "approver_sig"
        ],
        "type": "object"
      },
      "PolicyVersion": {
        "properties": {
          "activated_at": {
            "type": "string"
          },
          "catalog_version": {
            "type": "string"
          },
          "deactivated": {
            "type": "boolean"
          },
          "gov_hash": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "party": {
            "type": "string"
          },
          "policy_hash": {
            "type": "string"
          },
          "rules": {
            "type": "string"
          },
          "source_hash": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "QueryEnvelope": {
        "properties": {
          "data": {
            "properties": {},
            "type": "object"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object"
      },
      "Report_CloseReport": {
        "properties": {
          "forecast": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_ForecastVariance"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "interest_closes": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_InterestCloseResult"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "loans": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_LoanPositionReport"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_CurrencyTotal": {
        "properties": {
          "asset": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "scale": {
            "type": "integer"
          },
          "units": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_ExactFraction": {
        "properties": {
          "denominator": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "numerator": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_ForecastVariance": {
        "properties": {
          "confirmed_principal": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "expected": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "forecast_present": {
            "type": "boolean"
          },
          "from_date": {
            "type": "string"
          },
          "party": {
            "type": "string"
          },
          "period_id": {
            "type": "string"
          },
          "to_date": {
            "type": "string"
          },
          "variance": {
            "$ref": "#/components/schemas/Report_Money"
          }
        },
        "type": "object"
      },
      "Report_HoldReceipt": {
        "properties": {
          "account": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "bank_request_id": {
            "type": "string"
          },
          "expiry": {
            "type": "integer"
          },
          "hold_id": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "obligor": {
            "anyOf": [
              {
                "description": "Hex-encoded bytes.",
                "pattern": "^[0-9a-f]*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sig": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_Instruction": {
        "properties": {
          "atomicity": {
            "type": "string"
          },
          "bank_request_id": {
            "type": "string"
          },
          "conversion_leaf_ref": {
            "anyOf": [
              {
                "description": "Hex-encoded bytes.",
                "pattern": "^[0-9a-f]*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cycle_id": {
            "type": "string"
          },
          "cycle_leaf_ref": {
            "anyOf": [
              {
                "description": "Hex-encoded bytes.",
                "pattern": "^[0-9a-f]*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_ref": {
            "type": "string"
          },
          "legs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_Leg"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "settlement_kind": {
            "type": "string"
          },
          "tenant": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_InterestAccrual": {
        "properties": {
          "accrued": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "carried_after": {
            "$ref": "#/components/schemas/Report_ExactFraction"
          },
          "carried_before": {
            "$ref": "#/components/schemas/Report_ExactFraction"
          },
          "position": {
            "$ref": "#/components/schemas/Report_TreasuryInterestPosition"
          },
          "segments": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_InterestSegment"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_InterestCloseResult": {
        "properties": {
          "command_id": {
            "type": "string"
          },
          "declaration": {
            "$ref": "#/components/schemas/Report_TreasuryInterestClose"
          },
          "rows": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_InterestAccrual"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_InterestSegment": {
        "properties": {
          "days": {
            "type": "integer"
          },
          "from_date": {
            "type": "string"
          },
          "policy_version": {
            "type": "integer"
          },
          "principal": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "rate": {
            "$ref": "#/components/schemas/Report_TreasuryInterestRate"
          },
          "source_ref": {
            "type": "string"
          },
          "to_date": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_JournalEntry": {
        "properties": {
          "accounting_date": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "bank_reference": {
            "type": "string"
          },
          "basis": {
            "type": "string"
          },
          "command_id": {
            "type": "string"
          },
          "credit_account": {
            "type": "string"
          },
          "credit_role": {
            "type": "string"
          },
          "cycle_id": {
            "type": "string"
          },
          "debit_account": {
            "type": "string"
          },
          "debit_role": {
            "type": "string"
          },
          "effective_at": {
            "type": "integer"
          },
          "mapping_version": {
            "type": "integer"
          },
          "obligation_id": {
            "type": "string"
          },
          "party": {
            "type": "string"
          },
          "payment_id": {
            "type": "string"
          },
          "recorded_at": {
            "type": "integer"
          },
          "source_ref": {
            "type": "string"
          },
          "value_date": {
            "type": "string"
          },
          "withholding_settlement_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_Leg": {
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "detail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_LegDetail"
              },
              {
                "type": "null"
              }
            ]
          },
          "finality_class": {
            "type": "string"
          },
          "form": {
            "type": "string"
          },
          "id": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "locked_rate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_Rate"
              },
              {
                "type": "null"
              }
            ]
          },
          "obligor": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "rate_source": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "seq": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_LegDetail": {
        "properties": {
          "account": {
            "type": "string"
          },
          "counterparty": {
            "type": "string"
          },
          "rail": {
            "type": "string"
          },
          "recipient_account": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "token_chain_id": {
            "type": "integer"
          },
          "token_symbol": {
            "type": "string"
          },
          "venue": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_LoanObservation": {
        "properties": {
          "character": {
            "type": "string"
          },
          "confirmed_gross_principal": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "confirmed_recipient_principal": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "confirmed_tax_payment": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "effective_set_off": {
            "type": "integer"
          },
          "obligation_id": {
            "type": "string"
          },
          "original": {
            "$ref": "#/components/schemas/Report_Money"
          }
        },
        "type": "object"
      },
      "Report_LoanPositionReport": {
        "properties": {
          "accrual": {
            "$ref": "#/components/schemas/Report_InterestAccrual"
          },
          "observed_obligations": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_LoanObservation"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_Money": {
        "properties": {
          "asset": {
            "type": "string"
          },
          "scale": {
            "type": "integer"
          },
          "units": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_NettingAcceptedRate": {
        "properties": {
          "base": {
            "type": "string"
          },
          "contributors": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "quote": {
            "type": "string"
          },
          "rate": {
            "$ref": "#/components/schemas/Report_Rate"
          }
        },
        "type": "object"
      },
      "Report_NettingAudit": {
        "properties": {
          "accepted_rates": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingAcceptedRate"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "balances": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingBalance"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "blocked": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingObligation"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "checks": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingCheck"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingConversion"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "converted_opening": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingOpening"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "cycle_id": {
            "type": "string"
          },
          "deferred": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingObligation"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "deferred_cnt": {
            "type": "integer"
          },
          "exact": {
            "type": "boolean"
          },
          "group_id": {
            "type": "string"
          },
          "jurisdiction": {
            "type": "string"
          },
          "legal_basis": {
            "type": "string"
          },
          "members": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingMember"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "method": {
            "type": "string"
          },
          "netting_agreement_ref": {
            "type": "string"
          },
          "obligations": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingObligation"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "opening": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingOpening"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "positions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingPosition"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "prev_cycle_leaf_ref": {
            "anyOf": [
              {
                "description": "Hex-encoded bytes.",
                "pattern": "^[0-9a-f]*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "rate_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_NettingRatePolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "rate_set": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_RateAssertion"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "request_hash": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "residuals": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingResidual"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "resolved_at": {
            "type": "integer"
          },
          "routed_gross": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingObligation"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "savings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingSaving"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "settled": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingObligation"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "settled_cnt": {
            "type": "integer"
          },
          "tax_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_NettingTaxPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "treasury": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_TreasuryCycleEvidence"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_NettingBalance": {
        "properties": {
          "asset": {
            "type": "string"
          },
          "closing": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "net": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "opening": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "party": {
            "type": "string"
          },
          "scale": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_NettingCheck": {
        "properties": {
          "detail": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "passed": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Report_NettingConversion": {
        "properties": {
          "from": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "obligation_id": {
            "type": "string"
          },
          "rate_index": {
            "type": "integer"
          },
          "to": {
            "$ref": "#/components/schemas/Report_Money"
          }
        },
        "type": "object"
      },
      "Report_NettingMember": {
        "properties": {
          "currencies": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "lei": {
            "type": "string"
          },
          "party": {
            "type": "string"
          },
          "tax_id": {
            "type": "string"
          },
          "tax_jurisdiction": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_NettingObligation": {
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "creditor": {
            "type": "string"
          },
          "debtor": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "priority": {
            "type": "integer"
          },
          "tax": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_NettingTaxStamp"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_NettingOpening": {
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "party": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_NettingPosition": {
        "properties": {
          "asset": {
            "type": "string"
          },
          "party": {
            "type": "string"
          },
          "scale": {
            "type": "integer"
          },
          "units": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_NettingRatePolicy": {
        "properties": {
          "aggregation": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "band_bps": {
            "type": "integer"
          },
          "convert_currencies": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "fx_bearer": {
            "type": "string"
          },
          "group_id": {
            "type": "string"
          },
          "k": {
            "type": "integer"
          },
          "sources": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_asset": {
            "type": "string"
          },
          "target_scale": {
            "type": "integer"
          },
          "version": {
            "type": "integer"
          },
          "window_ms": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_NettingResidual": {
        "properties": {
          "carried": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "cycle": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scale": {
            "type": "integer"
          },
          "target_asset": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_NettingSaving": {
        "properties": {
          "asset": {
            "type": "string"
          },
          "gross": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "net_funding": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scale": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_NettingTaxPolicy": {
        "properties": {
          "author": {
            "type": "string"
          },
          "default": {
            "type": "string"
          },
          "group_id": {
            "type": "string"
          },
          "rules": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingTaxRule"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_NettingTaxRule": {
        "properties": {
          "character": {
            "type": "string"
          },
          "creditor_jur": {
            "type": "string"
          },
          "debtor_jur": {
            "type": "string"
          },
          "disposition": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_NettingTaxStamp": {
        "properties": {
          "character": {
            "type": "string"
          },
          "character_ref": {
            "type": "string"
          },
          "character_src": {
            "type": "string"
          },
          "invoice_ref": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_PaymentState": {
        "properties": {
          "cancellation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_TreasuryPaymentCancellation"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "execution": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_TreasuryExecution"
              },
              {
                "type": "null"
              }
            ]
          },
          "execution_at": {
            "type": "integer"
          },
          "instruction": {
            "$ref": "#/components/schemas/Report_TreasuryPayment"
          },
          "route": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_Rate": {
        "properties": {
          "scale": {
            "type": "integer"
          },
          "units": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_RateAssertion": {
        "properties": {
          "rate_assertion_body": {
            "$ref": "#/components/schemas/Report_RateAssertionBody"
          },
          "sig": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_RateAssertionBody": {
        "properties": {
          "as_of": {
            "type": "integer"
          },
          "base": {
            "type": "string"
          },
          "quote": {
            "type": "string"
          },
          "rate": {
            "$ref": "#/components/schemas/Report_Rate"
          },
          "rate_source": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_ReportQuery": {
        "properties": {
          "as_of": {
            "type": "integer"
          },
          "character": {
            "type": "string"
          },
          "cycle_id": {
            "type": "string"
          },
          "disposition": {
            "type": "string"
          },
          "entity": {
            "type": "string"
          },
          "from": {
            "type": "string"
          },
          "missing_character": {
            "type": "boolean"
          },
          "obligation_id": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_ReportedAccount": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "other_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_ReportedEntry": {
        "properties": {
          "acct_svcr_ref": {
            "type": "string"
          },
          "addtl_info": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "asset": {
            "type": "string"
          },
          "booking_date": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "entry_ref": {
            "type": "string"
          },
          "references": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "reversal": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "tx_count": {
            "type": "integer"
          },
          "value_date": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_StatementEntry": {
        "properties": {
          "account": {
            "$ref": "#/components/schemas/Report_ReportedAccount"
          },
          "decision": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_TreasuryReconciliation"
              },
              {
                "type": "null"
              }
            ]
          },
          "entry": {
            "$ref": "#/components/schemas/Report_ReportedEntry"
          },
          "entry_index": {
            "type": "integer"
          },
          "reference": {
            "type": "string"
          },
          "statement_id": {
            "type": "string"
          },
          "statement_index": {
            "type": "integer"
          },
          "suggested_payment_i_ds": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_TaxBucket": {
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "character": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "credit": {
            "type": "boolean"
          },
          "creditor_jurisdiction": {
            "type": "string"
          },
          "debtor_jurisdiction": {
            "type": "string"
          },
          "disposition": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TaxLeg": {
        "properties": {
          "creditor_jurisdiction": {
            "type": "string"
          },
          "cycle_id": {
            "type": "string"
          },
          "debtor_jurisdiction": {
            "type": "string"
          },
          "disposition": {
            "type": "string"
          },
          "effective_set_off": {
            "type": "integer"
          },
          "missing_character": {
            "type": "boolean"
          },
          "obligation": {
            "$ref": "#/components/schemas/Report_TreasuryObligation"
          },
          "policy_hash": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "policy_source": {
            "type": "string"
          },
          "policy_version": {
            "type": "integer"
          },
          "rule": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_TaxWorklist": {
        "properties": {
          "checkpoints": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TaxWorklistCheckpoint"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "exceptions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TaxWorklistException"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "payments": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TaxWorklistPayment"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "review_date": {
            "type": "string"
          },
          "totals": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TaxWorklistTotal"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_TaxWorklistCheckpoint": {
        "properties": {
          "group_id": {
            "type": "string"
          },
          "head": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "recorded_at": {
            "type": "integer"
          },
          "timezone": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TaxWorklistException": {
        "properties": {
          "assessment_id": {
            "type": "string"
          },
          "debtor": {
            "type": "string"
          },
          "follow_up_date": {
            "type": "string"
          },
          "group_id": {
            "type": "string"
          },
          "next_action": {
            "type": "string"
          },
          "obligation_id": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "review_id": {
            "type": "string"
          },
          "settlement_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TaxWorklistPayment": {
        "properties": {
          "alerts": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "assessment_id": {
            "type": "string"
          },
          "authority": {
            "type": "string"
          },
          "debtor": {
            "type": "string"
          },
          "due_date": {
            "type": "string"
          },
          "due_status": {
            "type": "string"
          },
          "group_id": {
            "type": "string"
          },
          "next_action": {
            "type": "string"
          },
          "obligation_id": {
            "type": "string"
          },
          "paid": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "payment_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "recipient": {
            "type": "string"
          },
          "remaining": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "review_follow_up_date": {
            "type": "string"
          },
          "review_id": {
            "type": "string"
          },
          "review_owner": {
            "type": "string"
          },
          "review_status": {
            "type": "string"
          },
          "settlement_id": {
            "type": "string"
          },
          "tax": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "tax_payment_reference": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TaxWorklistTotal": {
        "properties": {
          "asset": {
            "type": "string"
          },
          "due_today": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "later": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_seven_days": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "outstanding": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "overdue": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scale": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_TreasuryAccount": {
        "properties": {
          "asset": {
            "type": "string"
          },
          "bic": {
            "type": "string"
          },
          "finality_class": {
            "type": "string"
          },
          "frame_party_id": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "other_id": {
            "type": "string"
          },
          "party": {
            "type": "string"
          },
          "rail": {
            "type": "string"
          },
          "source_ref": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryAgreement": {
        "properties": {
          "allow_early": {
            "type": "boolean"
          },
          "author": {
            "type": "string"
          },
          "calendar": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_TreasuryCalendar"
              },
              {
                "type": "null"
              }
            ]
          },
          "group_id": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "rate_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_NettingRatePolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "rate_sources": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TreasuryRateSource"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_TreasuryCalendar": {
        "properties": {
          "cutoff_time": {
            "type": "string"
          },
          "holidays": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_time": {
            "type": "string"
          },
          "source_ref": {
            "type": "string"
          },
          "weekdays": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryConfirmation": {
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "payment_id": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "reverses": {
            "type": "string"
          },
          "source_ref": {
            "type": "string"
          },
          "value_date": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryCycleEvidence": {
        "properties": {
          "dispositions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TreasuryDisposition"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "input": {
            "$ref": "#/components/schemas/Report_TreasuryCycleInput"
          },
          "position_conversions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TreasuryPositionConversion"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "rounding_transfers": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TreasuryRoundingTransfer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_TreasuryCycleInput": {
        "properties": {
          "agreement": {
            "$ref": "#/components/schemas/Report_TreasuryAgreement"
          },
          "candidates": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TreasuryObligation"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "cutoff_override_ref": {
            "type": "string"
          },
          "cycle_id": {
            "type": "string"
          },
          "evaluated_at": {
            "type": "integer"
          },
          "funding_as_of": {
            "type": "integer"
          },
          "funding_ref": {
            "type": "string"
          },
          "limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_TreasuryLimits"
              },
              {
                "type": "null"
              }
            ]
          },
          "members": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingMember"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "opening": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingOpening"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "outstanding_checkpoint": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "prior_residuals": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingResidual"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "rates": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_RateAssertion"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_policy": {
            "$ref": "#/components/schemas/Report_TreasuryTaxPolicy"
          },
          "tenant": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "value_date": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_TreasuryDisposition": {
        "properties": {
          "disposition": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "limits": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer"
          },
          "rule": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_TreasuryExecution": {
        "properties": {
          "funding_hold": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_HoldReceipt"
              },
              {
                "type": "null"
              }
            ]
          },
          "funding_ref": {
            "type": "string"
          },
          "instruction": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_Instruction"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_id": {
            "type": "string"
          },
          "route": {
            "type": "string"
          },
          "settlement_id": {
            "anyOf": [
              {
                "description": "Hex-encoded bytes.",
                "pattern": "^[0-9a-f]*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_TreasuryInterestClose": {
        "properties": {
          "due_date": {
            "type": "string"
          },
          "from_date": {
            "type": "string"
          },
          "source_ref": {
            "type": "string"
          },
          "to_date": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryInterestPosition": {
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "creditor": {
            "type": "string"
          },
          "debtor": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryInterestRate": {
        "properties": {
          "asset": {
            "type": "string"
          },
          "day_count": {
            "type": "string"
          },
          "scale": {
            "type": "integer"
          },
          "units": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_TreasuryLimit": {
        "properties": {
          "ceiling": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "on_breach": {
            "type": "string"
          },
          "party_a": {
            "type": "string"
          },
          "party_b": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryLimits": {
        "properties": {
          "author": {
            "type": "string"
          },
          "rules": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TreasuryLimit"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_ref": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_TreasuryObligation": {
        "properties": {
          "correction_reason": {
            "type": "string"
          },
          "correction_ref": {
            "type": "string"
          },
          "credit_note_for": {
            "type": "string"
          },
          "due_date": {
            "type": "string"
          },
          "external_payee_ref": {
            "type": "string"
          },
          "first_seen": {
            "type": "integer"
          },
          "invoice_date": {
            "type": "string"
          },
          "leg": {
            "$ref": "#/components/schemas/Report_NettingObligation"
          },
          "revision": {
            "type": "integer"
          },
          "source": {
            "type": "string"
          },
          "source_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryOutstanding": {
        "properties": {
          "cancelled_at": {
            "type": "integer"
          },
          "cycle_id": {
            "type": "string"
          },
          "disposition": {
            "type": "string"
          },
          "obligation": {
            "$ref": "#/components/schemas/Report_TreasuryObligation"
          },
          "policy_version": {
            "type": "integer"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_TreasuryReview"
              },
              {
                "type": "null"
              }
            ]
          },
          "rule": {
            "type": "integer"
          },
          "set_off_at": {
            "type": "integer"
          },
          "withholding_settlement_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryPayable": {
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "component": {
            "type": "string"
          },
          "creditor": {
            "type": "string"
          },
          "cycle_id": {
            "type": "string"
          },
          "debtor": {
            "type": "string"
          },
          "due_date": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "obligation_id": {
            "type": "string"
          },
          "paid": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_asset": {
            "type": "string"
          },
          "withholding_settlement_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryPayment": {
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "creditor_account": {
            "$ref": "#/components/schemas/Report_TreasuryAccount"
          },
          "debtor_account": {
            "$ref": "#/components/schemas/Report_TreasuryAccount"
          },
          "execution_date": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "payable_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryPaymentCancellation": {
        "properties": {
          "payment_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "source_ref": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryPositionConversion": {
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "position": {
            "$ref": "#/components/schemas/Report_NettingPosition"
          },
          "rate_index": {
            "type": "integer"
          },
          "remainder_numerator": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "remainder_scale": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_TreasuryRateSource": {
        "properties": {
          "id": {
            "type": "string"
          },
          "public_key": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "source_ref": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryReconciliation": {
        "properties": {
          "decision": {
            "type": "string"
          },
          "entry_index": {
            "type": "integer"
          },
          "payment_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "reverses": {
            "type": "string"
          },
          "statement_id": {
            "type": "string"
          },
          "statement_index": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_TreasuryReport": {
        "properties": {
          "appearances": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TaxLeg"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "coverage": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TaxBucket"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "cycles": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_NettingAudit"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "exceptions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TreasuryOutstanding"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "gross_register": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TaxBucket"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "head": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "original_credits": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_CurrencyTotal"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "original_gross": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_CurrencyTotal"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "outstanding": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TreasuryPayable"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "policies": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/Report_TreasuryTaxPolicy"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "query": {
            "$ref": "#/components/schemas/Report_ReportQuery"
          },
          "selected_original_credits": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_CurrencyTotal"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "selected_original_gross": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_CurrencyTotal"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "statement_entries": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_StatementEntry"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_legs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TaxLeg"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "withholding": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_WithholdingRow"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "withholding_settlements": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_WithholdingSettlementRow"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_TreasuryReview": {
        "properties": {
          "next_action": {
            "type": "string"
          },
          "obligation_id": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "revision": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_TreasuryRoundingTransfer": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "position": {
            "$ref": "#/components/schemas/Report_NettingPosition"
          }
        },
        "type": "object"
      },
      "Report_TreasuryTaxPolicy": {
        "properties": {
          "author": {
            "type": "string"
          },
          "characters": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "default": {
            "type": "string"
          },
          "rules": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TreasuryTaxRule"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_ref": {
            "type": "string"
          },
          "sources": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Report_TreasuryTaxRule": {
        "properties": {
          "character": {
            "type": "string"
          },
          "creditor": {
            "type": "string"
          },
          "creditor_jur": {
            "type": "string"
          },
          "debtor": {
            "type": "string"
          },
          "debtor_jur": {
            "type": "string"
          },
          "disposition": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryWithholding": {
        "properties": {
          "beneficial_owner_ref": {
            "type": "string"
          },
          "determination_ref": {
            "type": "string"
          },
          "determined_by": {
            "type": "string"
          },
          "eligibility_ref": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "obligation_id": {
            "type": "string"
          },
          "rate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_TreasuryWithholdingRate"
              },
              {
                "type": "null"
              }
            ]
          },
          "rate_basis": {
            "type": "string"
          },
          "recipient_residence": {
            "type": "string"
          },
          "residence_ref": {
            "type": "string"
          },
          "revision": {
            "type": "integer"
          },
          "rounding": {
            "type": "string"
          },
          "rule_ref": {
            "type": "string"
          },
          "source_jurisdiction": {
            "type": "string"
          },
          "tax_authority_ref": {
            "type": "string"
          },
          "tax_date": {
            "type": "string"
          },
          "tax_point": {
            "type": "string"
          },
          "taxable_base": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "valid_from": {
            "type": "string"
          },
          "valid_through": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryWithholdingAccounting": {
        "properties": {
          "date": {
            "type": "string"
          },
          "payer_cash": {
            "type": "string"
          },
          "payer_gross_up_expense": {
            "type": "string"
          },
          "payer_payable": {
            "type": "string"
          },
          "payer_tax_payable": {
            "type": "string"
          },
          "recipient_cash": {
            "type": "string"
          },
          "recipient_gross_up_income": {
            "type": "string"
          },
          "recipient_receivable": {
            "type": "string"
          },
          "recipient_withheld_tax": {
            "type": "string"
          },
          "source_ref": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryWithholdingRate": {
        "properties": {
          "scale": {
            "type": "integer"
          },
          "units": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_TreasuryWithholdingReview": {
        "properties": {
          "assessment_id": {
            "type": "string"
          },
          "decision": {
            "type": "string"
          },
          "facts_hash": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "follow_up_date": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "settlement_id": {
            "type": "string"
          },
          "source_ref": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryWithholdingSettlement": {
        "properties": {
          "accounting": {
            "$ref": "#/components/schemas/Report_TreasuryWithholdingAccounting"
          },
          "assessment_id": {
            "type": "string"
          },
          "debtor_account": {
            "$ref": "#/components/schemas/Report_TreasuryAccount"
          },
          "recipient_account": {
            "$ref": "#/components/schemas/Report_TreasuryAccount"
          },
          "recipient_due_date": {
            "type": "string"
          },
          "tax_authority_account": {
            "$ref": "#/components/schemas/Report_TreasuryAccount"
          },
          "tax_due_date": {
            "type": "string"
          },
          "tax_payment_reference": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_TreasuryWithholdingSettlementCancellation": {
        "properties": {
          "accounting_date": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "settlement_id": {
            "type": "string"
          },
          "source_ref": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_WithholdingAssessment": {
        "properties": {
          "calculation": {
            "$ref": "#/components/schemas/Report_WithholdingCalculation"
          },
          "determination": {
            "$ref": "#/components/schemas/Report_TreasuryWithholding"
          },
          "id": {
            "type": "string"
          },
          "obligation": {
            "$ref": "#/components/schemas/Report_TreasuryObligation"
          },
          "recorded_at": {
            "type": "integer"
          },
          "requester": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "reviewer": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_WithholdingCalculation": {
        "properties": {
          "gross_up": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "missing": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "original": {
            "$ref": "#/components/schemas/Report_Money"
          },
          "payer_funding": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "recipient": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "remainder_denominator": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "remainder_numerator": {
            "anyOf": [
              {
                "description": "Exact decimal integer units.",
                "pattern": "^-?[0-9]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string"
          },
          "taxable_base": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "withheld": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_Money"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Report_WithholdingReview": {
        "properties": {
          "declaration": {
            "$ref": "#/components/schemas/Report_TreasuryWithholdingReview"
          },
          "id": {
            "type": "string"
          },
          "recorded_at": {
            "type": "integer"
          },
          "requester": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "reviewer": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_WithholdingReviewRow": {
        "properties": {
          "assessment_id": {
            "type": "string"
          },
          "can_close": {
            "type": "boolean"
          },
          "facts_hash": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "history": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_WithholdingReview"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "obligation_id": {
            "type": "string"
          },
          "reasons": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "settlement_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_WithholdingRow": {
        "properties": {
          "assessment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_WithholdingAssessment"
              },
              {
                "type": "null"
              }
            ]
          },
          "calculation": {
            "$ref": "#/components/schemas/Report_WithholdingCalculation"
          },
          "disposition": {
            "type": "string"
          },
          "obligation": {
            "$ref": "#/components/schemas/Report_TreasuryObligation"
          }
        },
        "type": "object"
      },
      "Report_WithholdingSettlement": {
        "properties": {
          "assessment": {
            "$ref": "#/components/schemas/Report_WithholdingAssessment"
          },
          "cancellation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_TreasuryWithholdingSettlementCancellation"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelled_at": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "original_payable": {
            "$ref": "#/components/schemas/Report_TreasuryPayable"
          },
          "plan": {
            "$ref": "#/components/schemas/Report_TreasuryWithholdingSettlement"
          },
          "recipient_payable_id": {
            "type": "string"
          },
          "recorded_at": {
            "type": "integer"
          },
          "requester": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "reviewer": {
            "description": "Hex-encoded bytes.",
            "pattern": "^[0-9a-f]*$",
            "type": "string"
          },
          "tax_payable_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Report_WithholdingSettlementLeg": {
        "properties": {
          "confirmations": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_TreasuryConfirmation"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Report_PaymentState"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "payable": {
            "$ref": "#/components/schemas/Report_TreasuryPayable"
          },
          "remaining": {
            "$ref": "#/components/schemas/Report_Money"
          }
        },
        "type": "object"
      },
      "Report_WithholdingSettlementRow": {
        "properties": {
          "recipient": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_WithholdingSettlementLeg"
              },
              {
                "type": "null"
              }
            ]
          },
          "settlement": {
            "$ref": "#/components/schemas/Report_WithholdingSettlement"
          },
          "status": {
            "type": "string"
          },
          "tax": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Report_WithholdingSettlementLeg"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_date_review_required": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SettlementRequest": {
        "properties": {
          "atomicity": {
            "description": "Declared atomicity requirement, evaluated against the available settlement mechanism.",
            "type": "string"
          },
          "bank_request_id": {
            "description": "Bank-assigned stable instruction ID. Exactly-once intake key together with tenant. Reuse for a retry of the same instruction. The treasury/v2/ prefix is reserved.",
            "type": "string"
          },
          "inputs": {
            "description": "Attested facts required by the installed policy and configured trust roots. A valid JSON shape is not sufficient: signatures and binding to this instruction are checked.",
            "items": {
              "properties": {
                "account": {
                  "type": "string"
                },
                "amount": {
                  "properties": {
                    "asset": {
                      "type": "string"
                    },
                    "scale": {
                      "type": "integer"
                    },
                    "units": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "approver": {
                  "type": "string"
                },
                "as_of": {
                  "description": "Rate or screening observation time in Unix milliseconds.",
                  "type": "integer"
                },
                "bank_request_id": {
                  "description": "Funds input request ID; must bind to the source leg reservation as required by the hold protocol.",
                  "type": "string"
                },
                "base": {
                  "type": "string"
                },
                "clear": {
                  "type": "boolean"
                },
                "expiry": {
                  "description": "Funds fact expiry in Unix milliseconds.",
                  "type": "integer"
                },
                "hold_id": {
                  "type": "string"
                },
                "kind": {
                  "description": "Fact kind: screening, clock, approval, funds, rate, or kyc. Fields are conditional on kind.",
                  "type": "string"
                },
                "level": {
                  "type": "string"
                },
                "now": {
                  "type": "integer"
                },
                "obligor": {
                  "description": "Party UUID for a funds hold. Required when the instruction has multiple obligors.",
                  "type": "string"
                },
                "quote": {
                  "type": "string"
                },
                "rate": {
                  "properties": {
                    "scale": {
                      "type": "integer"
                    },
                    "units": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "rate_source": {
                  "type": "string"
                },
                "sig": {
                  "description": "Externally produced Ed25519 signature, 64 bytes as hex. Required when the configured trust root requires an external attester. Never copy development self-attestation into a bank integration.",
                  "type": "string"
                },
                "subject": {
                  "description": "Party reference bound by a screening or KYC fact.",
                  "type": "string"
                },
                "tenant": {
                  "description": "Tenant bound by an externally signed screening or KYC fact.",
                  "type": "string"
                },
                "verified": {
                  "type": "boolean"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "invoice_ref": {
            "description": "Optional bank-side invoice or receivable reference.",
            "type": "string"
          },
          "legs": {
            "description": "Ordered movement legs. Waves must satisfy the declared form and reversibility constraints.",
            "items": {
              "properties": {
                "amount": {
                  "properties": {
                    "asset": {
                      "description": "Asset or currency identifier understood by the installed policy and rail.",
                      "examples": [
                        "USD"
                      ],
                      "type": "string"
                    },
                    "scale": {
                      "description": "Decimal exponent. USD minor units conventionally use 2.",
                      "maximum": 255,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "units": {
                      "description": "Exact integer minor units as a decimal string; never a JSON floating-point amount.",
                      "examples": [
                        "12345"
                      ],
                      "pattern": "^-?[0-9]+$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "asset",
                    "scale",
                    "units"
                  ],
                  "type": "object"
                },
                "detail": {
                  "properties": {
                    "account": {
                      "type": "string"
                    },
                    "counterparty": {
                      "type": "string"
                    },
                    "rail": {
                      "type": "string"
                    },
                    "recipient_account": {
                      "type": "string"
                    },
                    "venue": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "finality_class": {
                  "description": "Finality classification checked by the intake floor.",
                  "type": "string"
                },
                "form": {
                  "description": "Settlement form supported by the configured rail and policy.",
                  "type": "string"
                },
                "id": {
                  "description": "Optional leg UUID. When omitted, deterministically derived from tenant, bank_request_id and leg index.",
                  "type": "string"
                },
                "locked_rate": {
                  "description": "Required locked conversion rate on cross-asset destination legs. Exact decimal integer units at scale.",
                  "properties": {
                    "scale": {
                      "type": "integer"
                    },
                    "units": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "obligor": {
                  "description": "Party UUID whose obligation this leg represents. Required where the declared settlement shape needs it.",
                  "type": "string"
                },
                "rate_source": {
                  "description": "Must match the signed rate input used for this leg.",
                  "type": "string"
                },
                "role": {
                  "description": "Leg role: source, destination, or residual.",
                  "type": "string"
                },
                "seq": {
                  "description": "Wave index. Lower waves fire before higher waves.",
                  "type": "integer"
                }
              },
              "required": [
                "role",
                "form",
                "amount"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "party_ref": {
            "description": "Registered customer reference used to join signed compliance inputs. It must name a party in this instruction.",
            "type": "string"
          },
          "settlement_kind": {
            "description": "Declared kind, checked against the leg shape. Omit to use the server inference.",
            "type": "string"
          },
          "tenant": {
            "description": "Bank tenant UUID. Send explicitly on every submission and retry; it must be an authorized tenant.",
            "type": "string"
          }
        },
        "required": [
          "bank_request_id",
          "legs"
        ],
        "type": "object",
        "examples": [
          {
            "tenant": "00000000000000000000000000000101",
            "bank_request_id": "bank-payment-20260928-001",
            "legs": [
              {
                "role": "source",
                "form": "fiat",
                "seq": 0,
                "amount": {
                  "asset": "USD",
                  "scale": 2,
                  "units": "12345"
                },
                "detail": {
                  "account": "BANK-USD-OPERATING"
                }
              },
              {
                "role": "destination",
                "form": "fiat",
                "seq": 1,
                "amount": {
                  "asset": "USD",
                  "scale": 2,
                  "units": "12345"
                },
                "detail": {
                  "counterparty": "REGISTERED-PAYEE"
                }
              }
            ],
            "inputs": []
          }
        ],
        "description": "Wire-format example only: replace identifiers and supply the real attested inputs required by your policy and rail. The empty inputs array is not a recipe for an authorized bank payment."
      },
      "SettlementStatus": {
        "properties": {
          "atomicity": {
            "type": "string"
          },
          "bank_request_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invoice_ref": {
            "type": "string"
          },
          "legs": {
            "items": {
              "properties": {
                "amount": {
                  "properties": {
                    "asset": {
                      "description": "Asset or currency identifier understood by the installed policy and rail.",
                      "examples": [
                        "USD"
                      ],
                      "type": "string"
                    },
                    "scale": {
                      "description": "Decimal exponent. USD minor units conventionally use 2.",
                      "maximum": 255,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "units": {
                      "description": "Exact integer minor units as a decimal string; never a JSON floating-point amount.",
                      "examples": [
                        "12345"
                      ],
                      "pattern": "^-?[0-9]+$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "asset",
                    "scale",
                    "units"
                  ],
                  "type": "object"
                },
                "finality_class": {
                  "type": "string"
                },
                "form": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "obligor": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                },
                "token_chain_id": {
                  "type": "integer"
                },
                "token_symbol": {
                  "type": "string"
                },
                "wave": {
                  "type": "integer"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "settlement_kind": {
            "type": "string"
          },
          "status": {
            "description": "Persisted saga status. HTTP success does not imply settlement success.",
            "type": "string",
            "enum": [
              "accepted",
              "authorised",
              "sealed",
              "dispatched",
              "confirmed",
              "denied",
              "reversed",
              "stuck",
              "resolved_manual"
            ]
          },
          "stuck_deadline_ms": {
            "type": "integer"
          },
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "tenant",
          "bank_request_id",
          "settlement_kind",
          "status",
          "legs"
        ],
        "type": "object"
      },
      "TreasuryReport": {
        "properties": {
          "journal": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Report_JournalEntry"
            }
          },
          "journal_date_basis": {
            "type": "string"
          },
          "report": {
            "$ref": "#/components/schemas/Report_TreasuryReport"
          },
          "withholding_reviews": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Report_WithholdingReviewRow"
            }
          }
        },
        "required": [
          "report",
          "journal",
          "journal_date_basis",
          "withholding_reviews"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "JWT",
        "description": "Identity-only local session from POST /v1/auth/login. There is no separate API-key grant in this contract.",
        "scheme": "bearer",
        "type": "http"
      },
      "sessionCookie": {
        "in": "cookie",
        "name": "frame_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Bank integration contract: submit and track settlements, install client-sealed policies, and query reports and evidence. Authentication is deployment-specific; use /v1/auth/config. This reference intentionally covers bank workflows, not every console, portal, demo, or platform administration route.",
    "title": "Frame Bank API",
    "version": "1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/policies": {
      "get": {
        "description": "Returns policies newest-first, including deactivation tombstones, plus active_in_enclave and active_policy_version. Compute the signature version floor from the maximum policies[].version (0 when empty), not from active_policy_version. A concurrent update invalidates signatures based on an older floor.",
        "operationId": "get-policies",
        "parameters": [
          {
            "description": "Optional explicit tenant UUID; membership checked. Defaults to active tenant.",
            "in": "query",
            "name": "tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional registered counterparty policy key.",
            "in": "query",
            "name": "party",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyHistory"
                }
              }
            },
            "description": "Successful response. Read policy lineage including deactivations."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Read policy lineage including deactivations",
        "tags": [
          "Policies"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/policies\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "listPolicies"
      }
    },
    "/settlements": {
      "post": {
        "description": "Requires an ACTIVE policy. Intake is exactly-once for (tenant, bank_request_id). On timeout retry the identical instruction with the same explicit tenant and request ID. The response is the current settlement record after running the saga. A denied record can return HTTP 200. Pre-intake validation failures may return only an error, with no settlement ID or sealed verdict.",
        "operationId": "post-settlements",
        "parameters": [
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettlementRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementStatus"
                },
                "example": {
                  "id": "00000000-0000-0000-0000-0000000000a1",
                  "tenant": "00000000-0000-0000-0000-000000000101",
                  "bank_request_id": "bank-payment-20260928-001",
                  "settlement_kind": "payment",
                  "status": "denied",
                  "legs": [
                    {
                      "id": "00000000-0000-0000-0000-0000000000b1",
                      "role": "source",
                      "obligor": "",
                      "form": "fiat",
                      "wave": 0,
                      "finality_class": "instant",
                      "status": "pending",
                      "amount": {
                        "asset": "USD",
                        "scale": 2,
                        "units": "12345"
                      }
                    },
                    {
                      "id": "00000000-0000-0000-0000-0000000000b2",
                      "role": "destination",
                      "obligor": "",
                      "form": "fiat",
                      "wave": 1,
                      "finality_class": "instant",
                      "status": "pending",
                      "amount": {
                        "asset": "USD",
                        "scale": 2,
                        "units": "12345"
                      }
                    }
                  ]
                }
              }
            },
            "description": "Successful response. Read the returned settlement status; this is not a guarantee of completed value movement."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "State conflict; inspect the error before retrying."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Required service or evidence input is unavailable."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Submit a settlement instruction",
        "tags": [
          "Settlements"
        ],
        "x-access": "Bank session \u00b7 settle capability",
        "x-capability": "settle",
        "x-curl": "curl --fail-with-body -sS -X POST \"$FRAME_URL/settlements\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\" \\\n  -H 'Content-Type: application/json' --data-binary @instruction.json",
        "x-handler": "submit"
      }
    },
    "/settlements/{id}": {
      "get": {
        "description": "Returns the core status and leg progress for a known ID. Resources outside the active tenant are hidden as not found. Track IDs from submission; the recent-settlement listing is bounded.",
        "operationId": "get-settlements-id",
        "parameters": [
          {
            "description": "Resource identifier from the corresponding response.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementStatus"
                },
                "example": {
                  "id": "00000000-0000-0000-0000-0000000000a1",
                  "tenant": "00000000-0000-0000-0000-000000000101",
                  "bank_request_id": "bank-payment-20260928-001",
                  "settlement_kind": "payment",
                  "status": "denied",
                  "legs": [
                    {
                      "id": "00000000-0000-0000-0000-0000000000b1",
                      "role": "source",
                      "obligor": "",
                      "form": "fiat",
                      "wave": 0,
                      "finality_class": "instant",
                      "status": "pending",
                      "amount": {
                        "asset": "USD",
                        "scale": 2,
                        "units": "12345"
                      }
                    },
                    {
                      "id": "00000000-0000-0000-0000-0000000000b2",
                      "role": "destination",
                      "obligor": "",
                      "form": "fiat",
                      "wave": 1,
                      "finality_class": "instant",
                      "status": "pending",
                      "amount": {
                        "asset": "USD",
                        "scale": 2,
                        "units": "12345"
                      }
                    }
                  ]
                }
              }
            },
            "description": "Successful response. Read the returned settlement status; this is not a guarantee of completed value movement."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Read authoritative settlement status",
        "tags": [
          "Settlements"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/settlements/${FRAME_ID}\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "status"
      }
    },
    "/settlements/{id}/confirm": {
      "post": {
        "description": "Requires settle capability. For observed rails, a corresponding sealed rail fact must exist. A non-confirmable leg or missing observed finality returns 409. This endpoint does not replace a bank or rail finality attestation.",
        "operationId": "post-settlements-id-confirm",
        "parameters": [
          {
            "description": "Resource identifier from the corresponding response.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LegConfirmation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementStatus"
                }
              }
            },
            "description": "Successful response. Read the returned settlement status; this is not a guarantee of completed value movement."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "State conflict; inspect the error before retrying."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Confirm a leg after finality",
        "tags": [
          "Settlements"
        ],
        "x-access": "Bank session \u00b7 settle capability",
        "x-capability": "settle",
        "x-curl": "curl --fail-with-body -sS -X POST \"$FRAME_URL/settlements/${FRAME_ID}/confirm\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\" \\\n  -H 'Content-Type: application/json' --data-binary @request.json",
        "x-handler": "confirm"
      }
    },
    "/settlements/{id}/pack": {
      "get": {
        "description": "Returns a binary CBOR verify-pack for either a sealed authorization or a sealed denial. 409 means not sealed yet (Retry-After: 1); 410 means admission rejection with no sealed verdict ever available. Verify trust and attestation against independent pins. Anchor reference strings alone do not establish finality.",
        "operationId": "get-settlements-id-pack",
        "parameters": [
          {
            "description": "Resource identifier from the corresponding response.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional anchor reference bytes carried in the pack. Supplying a value does not prove chain finality; omission uses a development reference.",
            "in": "query",
            "name": "anchor_tx",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/cbor": {
                "schema": {
                  "format": "binary",
                  "type": "string",
                  "description": "Binary Frame verify-pack. Save the bytes; do not JSON-decode."
                }
              }
            },
            "description": "Successful response. Download settlement verification evidence."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "State conflict; inspect the error before retrying.",
            "headers": {
              "Retry-After": {
                "description": "Seconds before another evidence request.",
                "schema": {
                  "const": 1,
                  "type": "integer"
                }
              }
            }
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "No sealed verdict can exist for this admission-rejected settlement."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Download settlement verification evidence",
        "tags": [
          "Settlements"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/settlements/${FRAME_ID}/pack\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\" --output evidence.cbor",
        "x-handler": "pack"
      }
    },
    "/settlements/{id}/railobs": {
      "get": {
        "description": "Returns settlement and observations, including source URL, peer certificate fingerprint, observation time and trust class. Observations are not themselves settlement authorization.",
        "operationId": "get-settlements-id-railobs",
        "parameters": [
          {
            "description": "Resource identifier from the corresponding response.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "observations": {
                      "items": {
                        "properties": {
                          "observation_id": {
                            "type": "string"
                          },
                          "observed_at_ms": {
                            "type": "integer"
                          },
                          "peer_spki_sha256": {
                            "type": "string"
                          },
                          "source_url": {
                            "type": "string"
                          },
                          "trust_class": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "settlement": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response. Read corroborating rail observations."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Read corroborating rail observations",
        "tags": [
          "Settlements"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/settlements/${FRAME_ID}/railobs\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "railObsList"
      }
    },
    "/v1/activity": {
      "get": {
        "description": "Returns success.data.transfers from the latest 100 settlement events. No pagination or query filters are implemented. Store failures can produce an empty success envelope; use this view for recent activity, not a complete ledger export.",
        "operationId": "get-v1-activity",
        "parameters": [
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "transfers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Successful response. Read recent settlement activity."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Read recent settlement activity",
        "tags": [
          "Queries"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/activity\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "v1Activity"
      }
    },
    "/v1/auth/config": {
      "get": {
        "description": "Call before login. The success.data.mode field identifies local or dev-unverified mode. Local login requires an onboarded active account.",
        "operationId": "get-v1-auth-config",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthConfiguration"
                },
                "example": {
                  "success": true,
                  "data": {
                    "mode": "local",
                    "login_url": "/v1/auth/login",
                    "me_url": "/v1/me",
                    "policy_console_contract": 2,
                    "guest_demo_enabled": false
                  }
                }
              }
            },
            "description": "Successful response. Discover authentication mode."
          }
        },
        "security": [],
        "summary": "Discover authentication mode",
        "tags": [
          "Authentication"
        ],
        "x-access": "Public \u00b7 no session required",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/auth/config\"",
        "x-handler": "v1AuthConfig"
      }
    },
    "/v1/auth/login": {
      "post": {
        "description": "Authenticates email and password in local mode. Read data.token, data.expires_at and data.tenants. Current tokens expire after 12 hours and can be revoked earlier. Select an authorized tenant on subsequent requests. No client-credentials or API-key token grant is implemented.",
        "operationId": "post-v1-auth-login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            },
            "description": "Successful response. Create a bank operator session."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited. Back off; honor Retry-After when supplied."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          }
        },
        "security": [],
        "summary": "Create a bank operator session",
        "tags": [
          "Authentication"
        ],
        "x-access": "Public \u00b7 no session required",
        "x-curl": "curl --fail-with-body -sS -X POST \"$FRAME_URL/v1/auth/login\" \\\n  -H 'Content-Type: application/json' --data-binary @login.json",
        "x-handler": "v1AuthLogin"
      }
    },
    "/v1/capabilities": {
      "get": {
        "description": "Returns role and capability-dependent UI/action metadata. Authorization remains enforced at each operation. This is discovery, not a substitute for checking errors.",
        "operationId": "get-v1-capabilities",
        "parameters": [
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string"
                        },
                        "capabilities": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "actions": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "sections": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Successful response. Discover permitted actions."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Discover permitted actions",
        "tags": [
          "Authentication"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/capabilities\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "v1Capabilities"
      }
    },
    "/v1/me": {
      "get": {
        "description": "Returns success.data with username, role, capabilities, active tenant, memberships and session expiry when available. Memberships are evaluated per request; authority is not embedded in the token.",
        "operationId": "get-v1-me",
        "parameters": [
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "username": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        },
                        "capabilities": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "tenant": {
                          "type": "string"
                        },
                        "tenants": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "role": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "party": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "session_exp": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Successful response. Read identity and tenant memberships."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Read identity and tenant memberships",
        "tags": [
          "Authentication"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/me\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "v1Me"
      }
    },
    "/v1/policies": {
      "get": {
        "description": "Returns success.data.items, capped at 50 versions, with name, version, hashes, status, and optional authoring metadata. Deactivation tombstones are omitted, so use GET /policies for the signing version floor. The list can return an empty success envelope for store or policy-key resolution failures.",
        "operationId": "get-v1-policies",
        "parameters": [
          {
            "description": "Optional explicit tenant UUID; membership checked. Defaults to active tenant.",
            "in": "query",
            "name": "tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional registered counterparty policy key.",
            "in": "query",
            "name": "party",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "policy_hash": {
                                "type": "string"
                              },
                              "activated_at": {
                                "type": "string"
                              },
                              "tenant": {
                                "type": "string"
                              },
                              "yaml": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "source_hash": {
                                "type": "string"
                              },
                              "gov_hash": {
                                "type": "string"
                              },
                              "catalog_version": {
                                "type": "string"
                              },
                              "party": {
                                "type": "string"
                              },
                              "version": {
                                "type": "integer"
                              },
                              "has_source": {
                                "type": "boolean"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Successful response. List policy versions for display."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List policy versions for display",
        "tags": [
          "Policies"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/policies\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "v1Policies"
      }
    },
    "/v1/policies/deactivate": {
      "post": {
        "description": "Appends a deactivation version and removes the active policy from the enclave. New settlement intake fails closed until another policy is activated. This operation uses the policy capability; its request carries no four-eyes signatures. History is retained. Read the new lineage before signing a reactivation.",
        "operationId": "post-v1-policies-deactivate",
        "parameters": [
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyDeactivation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "active": {
                      "const": false,
                      "type": "boolean"
                    },
                    "party": {
                      "type": "string"
                    },
                    "seclogrs": {
                      "properties": {},
                      "type": "object"
                    },
                    "tenant": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response. Retire the active policy."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Retire the active policy",
        "tags": [
          "Policies"
        ],
        "x-access": "Bank session \u00b7 policy capability",
        "x-capability": "policy",
        "x-curl": "curl --fail-with-body -sS -X POST \"$FRAME_URL/v1/policies/deactivate\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\" \\\n  -H 'Content-Type: application/json' --data-binary @request.json",
        "x-handler": "deactivatePolicy"
      }
    },
    "/v1/policies/governance": {
      "get": {
        "description": "Returns pinned=false when the enclave has no governance for this policy key. When pinned, returns governance_root, delegations and gov_hash. Compare these with the bank-owned root and delegation set; do not derive trust solely from this response.",
        "operationId": "get-v1-policies-governance",
        "parameters": [
          {
            "description": "Optional explicit tenant UUID; membership checked. Defaults to active tenant.",
            "in": "query",
            "name": "tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional registered counterparty policy key.",
            "in": "query",
            "name": "party",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "delegations": {
                      "items": {
                        "properties": {},
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "gov_hash": {
                      "type": "string"
                    },
                    "governance_root": {
                      "type": "string"
                    },
                    "party": {
                      "type": "string"
                    },
                    "pinned": {
                      "type": "boolean"
                    },
                    "tenant": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response. Read pinned policy governance."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Read pinned policy governance",
        "tags": [
          "Policies"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/policies/governance\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "policyGovernance"
      }
    },
    "/v1/policies/metadata": {
      "get": {
        "description": "Returns the deployed policy authoring metadata and supported inputs. Compile and evaluate confidential source on the bank side with the matching authoring engine; retain the source and catalogue version.",
        "operationId": "get-v1-policies-metadata",
        "parameters": [
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Successful response. Read policy authoring metadata."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Read policy authoring metadata",
        "tags": [
          "Policies"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/policies/metadata\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "policyMetadata"
      }
    },
    "/v1/policies/receipts/{leaf_index}/pack": {
      "get": {
        "description": "Use leaf_index from the activation response. The CBOR artifact contains the sealed activation hashes; retain the authoring document bank-side and verify it against source_hash. It is an activation receipt, not a plaintext policy download.",
        "operationId": "get-v1-policies-receipts-leaf-index-pack",
        "parameters": [
          {
            "description": "Zero-based sealed log leaf index.",
            "in": "path",
            "name": "leaf_index",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional anchor reference bytes carried in the pack. Supplying a value does not prove chain finality; omission uses a development reference.",
            "in": "query",
            "name": "anchor_tx",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/cbor": {
                "schema": {
                  "format": "binary",
                  "type": "string",
                  "description": "Binary Frame verify-pack. Save the bytes; do not JSON-decode."
                }
              }
            },
            "description": "Successful response. Download a policy activation receipt."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Download a policy activation receipt",
        "tags": [
          "Policies"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/policies/receipts/${FRAME_LEAF_INDEX}/pack\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\" --output evidence.cbor",
        "x-handler": "getPolicyReceiptPack"
      }
    },
    "/v1/policies/sealing-key": {
      "get": {
        "description": "Returns enclave_box_pub and trust_root as hex, log_id, policy metadata, and attestation fields when available. Validate the attestation and bind its measurement and key to your independent pins before sealing a policy.",
        "operationId": "get-v1-policies-sealing-key",
        "parameters": [
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attestation_b64": {
                      "type": "string"
                    },
                    "attestation_mode": {
                      "type": "string"
                    },
                    "enclave_box_pub": {
                      "type": "string"
                    },
                    "log_id": {
                      "type": "string"
                    },
                    "measurement": {
                      "type": "string"
                    },
                    "policy": {
                      "properties": {},
                      "type": "object"
                    },
                    "trust_root": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response. Get the enclave sealing key and attestation."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Get the enclave sealing key and attestation",
        "tags": [
          "Policies"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/policies/sealing-key\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "enclaveInfo"
      }
    },
    "/v1/policies/submit": {
      "post": {
        "description": "Both signers must be distinct, registered live approval keys and authorized by the enclave governance payload. The signed version floor is read by the server from current storage; there is no version_floor request field. Read GET /policies immediately before signing. This call is not idempotent: after a timeout, reconcile versions and hashes before preparing another submission. Omit rules to avoid retaining plaintext authoring source on the host.",
        "operationId": "post-v1-policies-submit",
        "parameters": [
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicySubmission"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyActivation"
                }
              }
            },
            "description": "Successful response. Install or update a client-sealed policy."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Install or update a client-sealed policy",
        "tags": [
          "Policies"
        ],
        "x-access": "Bank session \u00b7 policy capability",
        "x-capability": "policy",
        "x-curl": "curl --fail-with-body -sS -X POST \"$FRAME_URL/v1/policies/submit\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\" \\\n  -H 'Content-Type: application/json' --data-binary @signed-policy.json",
        "x-handler": "submitPolicy"
      }
    },
    "/v1/positions": {
      "get": {
        "description": "Returns success.data.parties and aggregate, derived from confirmed settlement history. Frame is not the bank balance authority. Store or snapshot failures return errors; use bank balance attestations where authoritative balances are required.",
        "operationId": "get-v1-positions",
        "parameters": [
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "parties": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "party_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "positions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "form": {
                                      "type": "string"
                                    },
                                    "asset": {
                                      "type": "string"
                                    },
                                    "scale": {
                                      "type": "integer"
                                    },
                                    "units": {
                                      "type": "string"
                                    },
                                    "display": {
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "settlement_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "aggregate": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "form": {
                                "type": "string"
                              },
                              "asset": {
                                "type": "string"
                              },
                              "scale": {
                                "type": "integer"
                              },
                              "units": {
                                "type": "string"
                              },
                              "display": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Successful response. Query tenant positions."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Required service or evidence input is unavailable."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Query tenant positions",
        "tags": [
          "Queries"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/positions\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "v1Positions"
      }
    },
    "/v1/seclog-entries": {
      "get": {
        "description": "Returns success.data.items, total and cursor. The cursor is currently an empty string, not an implemented continuation token. Filtering happens within a bounded recent event scan; do not infer whole-history completeness from this response. An invalid ref_id shape returns an empty list.",
        "operationId": "get-v1-seclog-entries",
        "parameters": [
          {
            "description": "Settlement UUID to match.",
            "in": "query",
            "name": "ref_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact event kind to match.",
            "in": "query",
            "name": "entry_type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Requested result count. Default 100; values clamp to 1\u2013500. Invalid integers retain the default.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "entry_type": {
                                "type": "string"
                              },
                              "prev_hash": {
                                "type": "string"
                              },
                              "self_hash": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "ref_id": {
                                "type": "string"
                              },
                              "log_id": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string"
                              },
                              "at": {
                                "type": "string"
                              },
                              "sequence_num": {
                                "type": "integer"
                              },
                              "leaf_index": {
                                "type": "integer"
                              },
                              "tenant_id": {},
                              "sealed_in": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "sealed": {
                                "type": "boolean"
                              },
                              "payload": {
                                "type": "object",
                                "properties": {}
                              }
                            }
                          }
                        },
                        "total": {
                          "type": "integer"
                        },
                        "cursor": {
                          "type": "string",
                          "const": ""
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Successful response. Query sealed-log entries."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Query sealed-log entries",
        "tags": [
          "Queries"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/seclog-entries\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "v1SeclogEntries"
      }
    },
    "/v1/settlements": {
      "get": {
        "description": "Returns success.data.items and SLA metadata for at most 200 recent settlements. There are no filter, pagination, or bank_request_id lookup parameters on this endpoint. An empty list can also result from unavailable store reads; do not use it as an exhaustive reconciliation or completeness proof.",
        "operationId": "get-v1-settlements",
        "parameters": [
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "corridor_id": {
                                "type": "string"
                              },
                              "from_party": {
                                "type": "string"
                              },
                              "to_party": {
                                "type": "string"
                              },
                              "from_party_id": {
                                "type": "string"
                              },
                              "to_party_id": {
                                "type": "string"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "amount_display": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "updated_at": {
                                "type": "string"
                              },
                              "bank_request_id": {
                                "type": "string"
                              },
                              "settlement_kind": {
                                "type": "string"
                              },
                              "atomicity": {
                                "type": "string"
                              },
                              "from_party_name": {
                                "type": "string"
                              },
                              "to_party_name": {
                                "type": "string"
                              },
                              "amount": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "total_amount": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "simulated": {
                                "type": "boolean"
                              },
                              "status_view": {
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "phase": {
                                    "type": "string"
                                  },
                                  "tone": {
                                    "type": "string"
                                  }
                                }
                              },
                              "actions": {
                                "type": "array",
                                "items": {}
                              }
                            }
                          }
                        },
                        "sla": {
                          "type": "object",
                          "properties": {
                            "warn_after_seconds": {
                              "type": "integer"
                            },
                            "overdue_after_seconds": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Successful response. List recent settlements."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List recent settlements",
        "tags": [
          "Queries"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/settlements\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "v1Settlements"
      }
    },
    "/v1/settlements/{id}/receipt": {
      "get": {
        "description": "Returns success.data with the human-readable settlement narrative, finality and evidence links. Use the CBOR pack for independent cryptographic verification; a rendered receipt is a view.",
        "operationId": "get-v1-settlements-id-receipt",
        "parameters": [
          {
            "description": "Resource identifier from the corresponding response.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "settlement": {
                          "type": "object",
                          "properties": {}
                        },
                        "headline": {
                          "type": "object",
                          "properties": {}
                        },
                        "instruction": {
                          "type": "object",
                          "properties": {}
                        },
                        "enclave": {
                          "type": "object",
                          "properties": {}
                        },
                        "witness": {
                          "type": "object",
                          "properties": {}
                        },
                        "verification": {
                          "type": "object",
                          "properties": {}
                        },
                        "pack": {
                          "type": "object",
                          "properties": {}
                        },
                        "verdict": {
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "seal": {
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "inputs": {},
                        "lifecycle": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        },
                        "not_claimed": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "lifecycle_truncated": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Successful response. Read a settlement receipt."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Required service or evidence input is unavailable."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Read a settlement receipt",
        "tags": [
          "Settlements"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/settlements/${FRAME_ID}/receipt\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "v1SettlementReceipt"
      }
    },
    "/v1/timeline": {
      "get": {
        "description": "Returns success.data.items and total from a bounded event scan. No cursor is accepted. An empty success envelope can indicate unavailable store reads; this endpoint does not establish completeness.",
        "operationId": "get-v1-timeline",
        "parameters": [
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "timestamp": {
                                "type": "string"
                              },
                              "event_type": {
                                "type": "string"
                              },
                              "decision": {
                                "type": "string"
                              },
                              "ref_id": {
                                "type": "string"
                              },
                              "settlement_id": {
                                "type": "string"
                              },
                              "leaf_index": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Successful response. Read a settlement event timeline."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Read a settlement event timeline",
        "tags": [
          "Queries"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/timeline\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "v1Timeline"
      }
    },
    "/v1/treasury/close-report": {
      "get": {
        "description": "Replays verified evidence strictly before the cutoff in the agreement timezone. before_date defaults to tomorrow in that timezone. The response is a direct JSON report, not a success/data envelope.",
        "operationId": "get-v1-treasury-close-report",
        "parameters": [
          {
            "description": "Optional explicit tenant UUID; membership checked. Defaults to active tenant.",
            "in": "query",
            "name": "tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Configured treasury group identifier. Discover with GET /v1/treasury/groups.",
            "in": "query",
            "name": "group_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exclusive YYYY-MM-DD cutoff in the agreement timezone.",
            "in": "query",
            "name": "before_date",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "before_date": {
                      "type": "string"
                    },
                    "report": {
                      "$ref": "#/components/schemas/Report_CloseReport"
                    },
                    "actual_basis": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": "Successful response. Get a historical close report."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "State conflict; inspect the error before retrying."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Get a historical close report",
        "tags": [
          "Reports"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/treasury/close-report?group_id=${FRAME_GROUP_ID}\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "treasuryCloseReport",
        "x-query-helpers": [
          "treasuryScope"
        ]
      }
    },
    "/v1/treasury/groups": {
      "get": {
        "description": "Returns a JSON array of configured group IDs for the selected tenant. Select a group_id for the report, close report and evidence endpoints.",
        "operationId": "get-v1-treasury-groups",
        "parameters": [
          {
            "description": "Optional explicit tenant UUID; membership checked. Defaults to active tenant.",
            "in": "query",
            "name": "tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Successful response. List treasury report groups."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "List treasury report groups",
        "tags": [
          "Reports"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/treasury/groups\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "treasuryGroups"
      }
    },
    "/v1/treasury/pack": {
      "get": {
        "description": "Returns CBOR evidence for the group, including execution evidence where required. Returns 404 if no treasury evidence exists, and 409 when the evidence cannot be reconstructed or verified.",
        "operationId": "get-v1-treasury-pack",
        "parameters": [
          {
            "description": "Optional explicit tenant UUID; membership checked. Defaults to active tenant.",
            "in": "query",
            "name": "tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Configured treasury group identifier. Discover with GET /v1/treasury/groups.",
            "in": "query",
            "name": "group_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/cbor": {
                "schema": {
                  "format": "binary",
                  "type": "string",
                  "description": "Binary Frame verify-pack. Save the bytes; do not JSON-decode."
                }
              }
            },
            "description": "Successful response. Download treasury verification evidence."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "State conflict; inspect the error before retrying."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Download treasury verification evidence",
        "tags": [
          "Reports"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/treasury/pack?group_id=${FRAME_GROUP_ID}\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\" --output evidence.cbor",
        "x-handler": "treasuryPack",
        "x-query-helpers": [
          "treasuryScope"
        ]
      }
    },
    "/v1/treasury/report": {
      "get": {
        "description": "Verifies source evidence before replaying the requested checkpoint. JSON returns report, journal, journal_date_basis and withholding_reviews without a success/data envelope. Journal dates use the agreement timezone. csv selects a downloadable report. as_of must be in the past; it is not a date-only filter.",
        "operationId": "get-v1-treasury-report",
        "parameters": [
          {
            "description": "Optional explicit tenant UUID; membership checked. Defaults to active tenant.",
            "in": "query",
            "name": "tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Configured treasury group identifier. Discover with GET /v1/treasury/groups.",
            "in": "query",
            "name": "group_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Past RFC3339 timestamp; defaults to now.",
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Inclusive YYYY-MM-DD report window start.",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Inclusive YYYY-MM-DD report window end.",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by entity identifier.",
            "in": "query",
            "name": "entity",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact payment character.",
            "in": "query",
            "name": "character",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact disposition.",
            "in": "query",
            "name": "disposition",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Obligation identifier.",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Cycle identifier.",
            "in": "query",
            "name": "cycle_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Use 1 to include only obligations missing character.",
            "in": "query",
            "name": "uncharacterised",
            "required": false,
            "schema": {
              "enum": [
                "1"
              ],
              "type": "string"
            }
          },
          {
            "description": "CSV report kind; omit for JSON.",
            "in": "query",
            "name": "csv",
            "required": false,
            "schema": {
              "enum": [
                "withholding_settlements",
                "withholding",
                "tax",
                "appearances",
                "coverage",
                "gross",
                "outstanding",
                "journal"
              ],
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TreasuryReport"
                }
              },
              "text/csv": {
                "schema": {
                  "description": "CSV attachment selected by csv query parameter.",
                  "type": "string"
                }
              }
            },
            "description": "Successful response. Query a treasury report or CSV export."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "State conflict; inspect the error before retrying."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Query a treasury report or CSV export",
        "tags": [
          "Reports"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/treasury/report?group_id=${FRAME_GROUP_ID}\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "treasuryReport",
        "x-query-helpers": [
          "treasuryScope"
        ]
      }
    },
    "/v1/treasury/tax-worklist": {
      "get": {
        "description": "Verifies each selected group before reporting current balances against review_date. This is not an as-of ledger query. Unknown query parameters and csv values other than 1 return 400. Omit group_id to aggregate the tenant groups.",
        "operationId": "get-v1-treasury-tax-worklist",
        "parameters": [
          {
            "description": "Optional explicit tenant UUID; membership checked. Defaults to active tenant.",
            "in": "query",
            "name": "tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional group; absent selects all tenant groups.",
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required YYYY-MM-DD comparison date for review scheduling.",
            "in": "query",
            "name": "review_date",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Set to 1 for CSV; omit for JSON.",
            "in": "query",
            "name": "csv",
            "required": false,
            "schema": {
              "enum": [
                "1"
              ],
              "type": "string"
            }
          },
          {
            "description": "Active tenant membership UUID. Send explicitly for deterministic tenancy.",
            "in": "header",
            "name": "X-Frame-Tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report_TaxWorklist"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Successful response. Query tax review work or export CSV."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request, malformed identifier, or unmet input requirement."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing, expired, or revoked session."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Tenant or capability does not authorize this operation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Resource not found in the caller scope."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "State conflict; inspect the error before retrying."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal failure."
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sessionCookie": []
          }
        ],
        "summary": "Query tax review work or export CSV",
        "tags": [
          "Reports"
        ],
        "x-access": "Bank session \u00b7 read capability",
        "x-capability": "read",
        "x-curl": "curl --fail-with-body -sS \"$FRAME_URL/v1/treasury/tax-worklist?review_date=${FRAME_REVIEW_DATE}\" \\\n  -H \"Authorization: Bearer $FRAME_TOKEN\" \\\n  -H \"X-Frame-Tenant: $FRAME_TENANT\"",
        "x-handler": "treasuryTaxWorklist"
      }
    }
  },
  "servers": [
    {
      "description": "The Frame host serving this document",
      "url": "/"
    }
  ],
  "tags": [
    {
      "name": "Authentication"
    },
    {
      "name": "Settlements"
    },
    {
      "name": "Policies"
    },
    {
      "name": "Queries"
    },
    {
      "name": "Reports"
    }
  ]
}
