nostr_decode
Decode a NIP-19 bech32 identifier to its raw fields without network calls. Bars nsec decoding by default to prevent private key exposure.
Instructions
Decode a NIP-19 bech32-encoded identifier (npub / nsec / note / nevent / naddr / nprofile) into its raw fields. Local-only — no network call. Refuses nsec unless NOSTR_ALLOW_NSEC_DECODE=true; guards against accidentally surfacing a private key in tool output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bech32 | Yes | A NIP-19 bech32 string (npub / nsec / note / nevent / naddr / nprofile). Decoding nsec is REFUSED by default — set NOSTR_ALLOW_NSEC_DECODE=true to opt in. |