nostr_encode
Encode a raw NIP-19 record (npub, note, nevent, naddr, nprofile) into its bech32 form locally without network calls. Does not support nsec encoding for security.
Instructions
Encode a raw NIP-19 record (npub / note / nevent / naddr / nprofile) into its bech32 form. Local-only — no network call. Does NOT support nsec encoding (private keys must not transit the agent).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Event kind. Required for naddr; optional for nevent. | |
| type | Yes | NIP-19 type to encode. `nsec` is intentionally not encodable through this tool — private keys must never round-trip through the agent. | |
| relays | No | Optional relay hints (wss://...). | |
| author_hex | No | Optional author pubkey for nevent. | |
| identifier | No | Replaceable-event `d` tag value. Required for naddr. | |
| pubkey_hex | No | 32-byte (64 hex char) public key. Required for npub / naddr / nprofile. | |
| event_id_hex | No | 32-byte (64 hex char) event id. Required for note / nevent. |