mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
Nip46PermissionAuthorizer implements the quartz Nip46RequestAuthorizer by routing every remote-signer request through the shared Connected Apps permission ledger (NostrSignerPermissionLedger). A NIP-46 client becomes a connected app under the coordinate `nip46:<clientPubKey>`, so it reuses the same per-app trust levels and per-op overrides as napplets and web origins: - sign/encrypt/decrypt requests map to NostrSignerOp and are allowed only when the ledger's standing decision is ALLOW (ASK/DENY are refused — a background signer cannot prompt, so access is granted ahead of time in the UI). - connect validates the pairing secret, then registers the app at a default REASONABLE policy (never downgrading a level the user already set) and echoes the secret back. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015FHr2mu5SiHwYNR7evYUuF