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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"bech32": "<bech32>"
},
"name": "nostr_decode"
}
}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. |