跳转到内容

ak.schema.realm_invite_link.v1

← Schema 目录

Arkret Realm Invite Link
ak.schema.realm_invite_link.v1 · schemas/realm-invite-link.schema.json

必填标记属于当前 Schema 对象或分支。oneOf、anyOf、if / then / else 中的 required 不表示所有实例均必填。树状视图有递归深度限制;完整约束以 canonical 原件为准。

必填 $ · object · $ref #/$defs/view

此对象的 required:realm_invite_link_id, realm_id, inviter_account_id, expires_at, max_use_count, use_count, status, create_event_id, evaluated_at

必填 realm_invite_link_id · string · $ref #/$defs/realm_invite_link_id
pattern: ^ak:realm_invite_link:[A-Za-z0-9_-]{44}$
必填 realm_id · string · $ref ./common-ids.schema.json#/$defs/realm_id

Retyped ak.realm.create Event token. It therefore carries the same fixed current-v1 0x01/SHA-256 content-address identity and is not selected by Realm state.

pattern: ^ak:realm:[A-Za-z0-9_-]{44}$
必填 inviter_account_id · object · $ref ./common-ids.schema.json#/$defs/account_id

Complete protocol identity for a principal at one Station, including human, Organization and personal Agent accounts. It does not imply a human login, provisioning workflow, credential class or authorization. Equality is byte-for-byte equality of both canonical did_core_id components; neither component may be inferred from a DID Document, route, session audience, current service, handle, or local database key. Accounts with the same principal_id at different station_id values are permanently distinct. Principal equality MUST NOT establish account equivalence or any permission inheritance, merging, delegation, substitution or recovery relationship. Account-scoped authority requires independent authorization for the exact AccountId. Permanent loss of a Station does not permit its accounts or PCR lineages to migrate to or revive at another Station; Realm takeover and RealmCommit recovery do not waive this boundary. See models/common-fields.md section 4.2.

此对象的 required:principal_id, station_id

必填 principal_id · $ref #/$defs/did_core_id · $ref #/$defs/did_core_id
必填 station_id · $ref #/$defs/did_core_id · $ref #/$defs/did_core_id
必填 expires_at · string (date-time) · format=date-time · $ref ./time.schema.json#/$defs/timestamp

Canonical Arkret-owned absolute instant. UTC Z form with exactly three millisecond digits. Whole seconds MUST use .000Z; offsets, missing/finer fractions, lowercase separators, leap seconds, and invalid Gregorian calendar dates are forbidden. Shape validation by this pattern is supplemented by semantic date validation.

pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\.[0-9]{3}Z$
必填 max_use_count · integer
必填 use_count · integer
必填 status · string (enum) · $ref #/$defs/status
enum: "active" "revoked" "expired" "exhausted"
必填 create_event_id · string · $ref ./common-ids.schema.json#/$defs/event_id

Complete Arkret Event cryptographic identity. The suffix is the canonical unpadded Base64URL encoding of exactly 33 octets: fixed current-v1 suite code 0x01 followed by all 32 octets of the SHA-256 Event digest. Regex validation is only lexical; receivers MUST decode, require 33 octets, require byte 0 == 0x01, canonical re-encode, and verify the full digest before use. Other registered digest suites remain available only to the typed domains that explicitly select them and MUST NOT appear in Event IDs.

pattern: ^ak:event:[A-Za-z0-9_-]{44}$
必填 evaluated_at · string (date-time) · format=date-time · $ref ./time.schema.json#/$defs/timestamp

Canonical Arkret-owned absolute instant. UTC Z form with exactly three millisecond digits. Whole seconds MUST use .000Z; offsets, missing/finer fractions, lowercase separators, leap seconds, and invalid Gregorian calendar dates are forbidden. Shape validation by this pattern is supplemented by semantic date validation.

pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\.[0-9]{3}Z$
完整 JSON(格式化展示)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://arkret.org/v1/schemas/realm-invite-link.schema.json",
  "title": "Arkret Realm Invite Link",
  "$ref": "#/$defs/view",
  "$defs": {
    "realm_invite_link_id": {
      "type": "string",
      "pattern": "^ak:realm_invite_link:[A-Za-z0-9_-]{44}$"
    },
    "link_public_key": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{43}$",
      "description": "Canonical unpadded base64url of exactly 32 Ed25519 public-key bytes."
    },
    "proof": {
      "type": "object",
      "required": [
        "signature_algorithm",
        "transcript_digest",
        "signature"
      ],
      "properties": {
        "signature_algorithm": {
          "const": "Ed25519",
          "x-arkret-value-ownership": {
            "class": "external_literal",
            "authority": "https://www.rfc-editor.org/rfc/rfc8032#section-5.1",
            "owner": "realm-invite-link.schema.json#/$defs/proof/properties/signature_algorithm",
            "values": [
              "Ed25519"
            ]
          }
        },
        "transcript_digest": {
          "type": "string",
          "pattern": "^sha256:[0-9a-f]{64}$"
        },
        "signature": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{86}$"
        }
      },
      "additionalProperties": false
    },
    "limits": {
      "type": "object",
      "required": [
        "max_lifetime_seconds",
        "max_use_count_per_link"
      ],
      "properties": {
        "max_lifetime_seconds": {
          "type": "integer",
          "minimum": 60,
          "maximum": 4294967295,
          "default": 2592000
        },
        "max_use_count_per_link": {
          "type": "integer",
          "x-arkret-member-role": "count",
          "minimum": 1,
          "maximum": 4294967295,
          "default": 1000
        }
      },
      "additionalProperties": false
    },
    "lifecycle_value": {
      "type": "string",
      "enum": [
        "active",
        "revoked"
      ],
      "x-arkret-value-ownership": {
        "class": "owned_symbol",
        "authority": "realm-invite-link.schema.json#/$defs/lifecycle_value",
        "owner": "realm-invite-link.schema.json#/$defs/lifecycle_value",
        "values": [
          "active",
          "revoked"
        ]
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "revoked",
        "expired",
        "exhausted"
      ],
      "x-arkret-value-ownership": {
        "class": "owned_symbol",
        "authority": "realm-invite-link.schema.json#/$defs/status",
        "owner": "realm-invite-link.schema.json#/$defs/status",
        "values": [
          "active",
          "revoked",
          "expired",
          "exhausted"
        ]
      }
    },
    "create_payload": {
      "type": "object",
      "required": [
        "public_key",
        "expires_at",
        "max_use_count"
      ],
      "properties": {
        "public_key": {
          "$ref": "#/$defs/link_public_key"
        },
        "expires_at": {
          "$ref": "./time.schema.json#/$defs/timestamp"
        },
        "max_use_count": {
          "type": "integer",
          "x-arkret-member-role": "count",
          "minimum": 1,
          "maximum": 4294967295
        }
      },
      "additionalProperties": false
    },
    "revoke_payload": {
      "type": "object",
      "required": [
        "realm_invite_link_id"
      ],
      "properties": {
        "realm_invite_link_id": {
          "$ref": "#/$defs/realm_invite_link_id"
        }
      },
      "additionalProperties": false
    },
    "accept_payload": {
      "type": "object",
      "required": [
        "realm_invite_link_id",
        "subject_account_id",
        "request_id",
        "link_proof"
      ],
      "properties": {
        "realm_invite_link_id": {
          "$ref": "#/$defs/realm_invite_link_id"
        },
        "subject_account_id": {
          "$ref": "./common-ids.schema.json#/$defs/account_id"
        },
        "request_id": {
          "$ref": "./realm-join-intake.schema.json#/$defs/request_id"
        },
        "link_proof": {
          "$ref": "#/$defs/proof"
        }
      },
      "additionalProperties": false
    },
    "definition_value": {
      "type": "object",
      "required": [
        "public_key",
        "expires_at",
        "max_use_count",
        "create_event_id",
        "creator_actor_id"
      ],
      "properties": {
        "public_key": {
          "$ref": "#/$defs/link_public_key"
        },
        "expires_at": {
          "$ref": "./time.schema.json#/$defs/timestamp"
        },
        "max_use_count": {
          "type": "integer",
          "x-arkret-member-role": "count",
          "minimum": 1,
          "maximum": 4294967295
        },
        "create_event_id": {
          "$ref": "./common-ids.schema.json#/$defs/event_id"
        },
        "creator_actor_id": {
          "$ref": "./common-ids.schema.json#/$defs/actor_id"
        }
      },
      "additionalProperties": false
    },
    "use_record": {
      "type": "object",
      "required": [
        "realm_invite_link_id",
        "subject_account_id",
        "accept_event_id"
      ],
      "properties": {
        "realm_invite_link_id": {
          "$ref": "#/$defs/realm_invite_link_id"
        },
        "subject_account_id": {
          "$ref": "./common-ids.schema.json#/$defs/account_id"
        },
        "accept_event_id": {
          "$ref": "./common-ids.schema.json#/$defs/event_id"
        }
      },
      "additionalProperties": false,
      "description": "Create-locked accepted-use fact. Identity is exact link and complete account. Its enclosing typed-current source binds the actual Event/RealmCommit; membership leave and cache GC never remove it."
    },
    "view": {
      "type": "object",
      "required": [
        "realm_invite_link_id",
        "realm_id",
        "inviter_account_id",
        "expires_at",
        "max_use_count",
        "use_count",
        "status",
        "create_event_id",
        "evaluated_at"
      ],
      "properties": {
        "realm_invite_link_id": {
          "$ref": "#/$defs/realm_invite_link_id"
        },
        "realm_id": {
          "$ref": "./common-ids.schema.json#/$defs/realm_id"
        },
        "inviter_account_id": {
          "$ref": "./common-ids.schema.json#/$defs/account_id"
        },
        "expires_at": {
          "$ref": "./time.schema.json#/$defs/timestamp"
        },
        "max_use_count": {
          "type": "integer",
          "x-arkret-member-role": "count",
          "minimum": 1,
          "maximum": 4294967295
        },
        "use_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "create_event_id": {
          "$ref": "./common-ids.schema.json#/$defs/event_id"
        },
        "evaluated_at": {
          "$ref": "./time.schema.json#/$defs/timestamp",
          "x-arkret-member-role": "instant"
        }
      },
      "additionalProperties": false
    }
  }
}

查看 canonical 原件:spec/v1/artifacts/schemas/realm-invite-link.schema.json

Source