encryptNip04
Encrypt plaintext messages with the NIP-04 legacy standard for Nostr encrypted DMs. Requires recipient's public key and optionally your private key; can use remote signing if configured.
Instructions
Encrypt text with NIP-04 (legacy)
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": {
"plaintext": "<plaintext>",
"recipientPubkey": "<recipientPubkey>"
},
"name": "encryptNip04"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plaintext | Yes | Text to encrypt | |
| recipientPubkey | Yes | Recipient pubkey (hex or npub) | |
| privateKey | No | Private key (nsec or hex). Optional when NOSTR_BUNKER_URI is configured. |