{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentry-com/json-schema/agentry-com-nostr-key-registration-schema.json",
  "title": "NostrKeyRegistration",
  "description": "Register a Nostr identity for an agent.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentry-com-identity-api-openapi.yml#/components/schemas/NostrKeyRegistration",
  "properties": {
    "agent_id": {
      "type": "string",
      "title": "Agent Id",
      "description": "Agentry agent ID to bind identity to"
    },
    "pubkey": {
      "type": "string",
      "title": "Pubkey",
      "description": "Nostr public key — npub1... bech32 or 64-char hex"
    },
    "nip05_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Nip05 Name",
      "description": "Desired NIP-05 name (e.g. 'myagent' → myagent@agentry.com). Auto-generated from agent name if not provided."
    },
    "proof_event": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Proof Event",
      "description": "Signed Nostr event (kind 27235 / NIP-98) proving key ownership"
    }
  },
  "type": "object",
  "required": [
    "agent_id",
    "pubkey"
  ]
}