{
  "name": "bap-identity-types-encryption",
  "type": "registry:component",
  "dependencies": [],
  "devDependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "components/bap-identity/types/encryption.ts",
      "type": "registry:component",
      "content": "import type { ExtendedBAP } from \"./identity.js\";\n\nexport type EncryptionMode = \"symmetric\" | \"asymmetric\";\nexport type EncryptionContentType = \"message\" | \"file\" | \"json\";\n\nexport interface EncryptedData {\n\tencrypted: string; // Base64 encoded\n\ttype: EncryptionContentType;\n\tmode: EncryptionMode;\n\trecipientPublicKey?: string;\n\ttimestamp: Date;\n\tmetadata?: Record<string, unknown>;\n}\n\nexport interface DecryptedData {\n\tcontent: string | ArrayBuffer;\n\ttype: EncryptionContentType;\n\tdecryptedAt: Date;\n\tsenderAddress?: string;\n\tmetadata?: Record<string, unknown>;\n}\n\nexport interface EncryptionKeyInfo {\n\tpublicKey: string;\n\taddress: string;\n\tidentityKey: string;\n}\n\nexport interface BapEncryptionSuiteProps {\n\t/**\n\t * The BAP instance for encryption/decryption\n\t */\n\tbapInstance: ExtendedBAP;\n\n\t/**\n\t * Optional recipient BAP instance for asymmetric encryption\n\t */\n\trecipientBapId?: ExtendedBAP;\n\n\t/**\n\t * Callback when content is encrypted\n\t */\n\tonEncrypted?: (result: EncryptedData) => void;\n\n\t/**\n\t * Callback when content is decrypted\n\t */\n\tonDecrypted?: (result: DecryptedData) => void;\n\n\t/**\n\t * Allowed content types\n\t */\n\tallowedTypes?: EncryptionContentType[];\n\n\t/**\n\t * Use Type 42 key derivation\n\t */\n\tuseType42?: boolean;\n\n\t/**\n\t * Theme variant\n\t */\n\tvariant?: \"surface\" | \"ghost\" | \"classic\";\n\n\t/**\n\t * Component size\n\t */\n\tsize?: \"1\" | \"2\" | \"3\";\n\n\t/**\n\t * Error handler\n\t */\n\tonError?: (error: Error) => void;\n\n\t/**\n\t * Initial content\n\t */\n\tinitialContent?: string;\n\n\t/**\n\t * Initial mode\n\t */\n\tinitialMode?: \"encrypt\" | \"decrypt\";\n\n\t/**\n\t * CSS class name\n\t */\n\tclassName?: string;\n}\n\nexport interface EncryptionResult {\n\tsuccess: boolean;\n\tdata?: EncryptedData;\n\terror?: Error;\n}\n\nexport interface DecryptionResult {\n\tsuccess: boolean;\n\tdata?: DecryptedData;\n\terror?: Error;\n}\n\n// Hook parameter types\nexport interface EncryptionOptions {\n\ttype?: EncryptionContentType;\n\tmode?: EncryptionMode;\n\trecipientPublicKey?: string;\n\tmetadata?: Record<string, unknown>;\n\tuseType42?: boolean;\n}\n\nexport interface DecryptionOptions {\n\ttype?: EncryptionContentType;\n\tmode?: EncryptionMode;\n\tsenderPublicKey?: string;\n\tuseType42?: boolean;\n}\n\nexport interface UseBapEncryptionOptions {\n\tuseType42?: boolean;\n}\n",
      "target": "<%- config.aliases.components %>/encryption.tsx"
    }
  ]
}