{
  "$defs": {
    "EntrySignature": {
      "description": "Cryptographic signature over a MARS entry's canonical content.\n\nThe signature uses `MARS-PUBLISHER-SIGNING-V1`: JCS (RFC 8785) over\npublisher-authored fields after removing only `signature`, `sequence`,\n`updatedAt`, `lifecycleStatus`, `verifiableAttestations`, `shardAssignment`,\n`anchorProjection`, `anchorState`, `anchorTxHash`, `anchorBlockHeight`, and\n`anchorProof`.",
      "properties": {
        "algorithm": {
          "description": "Signature algorithm. Always \"Ed25519\".",
          "pattern": "^Ed25519$",
          "type": "string"
        },
        "created": {
          "description": "ISO 8601 timestamp of when the signature was created.",
          "type": [
            "string",
            "null"
          ]
        },
        "keyId": {
          "description": "DID URL of the signing key (e.g. `\"did:oas:l1fe:ao:org#key-1\"`).",
          "pattern": "^did:oas:.+#.+$",
          "type": "string"
        },
        "value": {
          "description": "Strict URL-safe, unpadded base64url signature bytes.\n\nStandard-base64 characters (`+`, `/`) and `=` padding are rejected.",
          "type": "string"
        }
      },
      "required": [
        "algorithm",
        "keyId",
        "value"
      ],
      "type": "object"
    },
    "TransferOfferStatus": {
      "description": "Closed transfer-offer state machine.",
      "enum": [
        "offered",
        "accepted",
        "declined",
        "expired"
      ],
      "type": "string"
    }
  },
  "$id": "urn:mars:schema:v1:transfer-offer",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Persisted transfer-offer state returned by transfer endpoints.",
  "properties": {
    "createdAt": {
      "description": "Offer creation time.",
      "format": "date-time",
      "type": "string"
    },
    "entryDid": {
      "description": "Entry whose ownership may change.",
      "type": "string"
    },
    "entrySequence": {
      "description": "Entry sequence signed by the owner.",
      "format": "uint64",
      "minimum": 0,
      "type": "integer"
    },
    "expiresAt": {
      "description": "Offer expiry.",
      "format": "date-time",
      "type": "string"
    },
    "offerId": {
      "description": "Registry-generated immutable offer identifier.",
      "type": "string"
    },
    "ownerDid": {
      "description": "Current owner derived from the authenticated principal.",
      "type": "string"
    },
    "ownerSignature": {
      "$ref": "#/$defs/EntrySignature",
      "description": "Owner's signature over the offer payload."
    },
    "recipientDid": {
      "description": "Intended recipient.",
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/TransferOfferStatus",
      "description": "Current state."
    }
  },
  "required": [
    "offerId",
    "entryDid",
    "ownerDid",
    "recipientDid",
    "entrySequence",
    "createdAt",
    "expiresAt",
    "status",
    "ownerSignature"
  ],
  "title": "TransferOffer",
  "type": "object"
}
