nostr_sign_event
Sign a Nostr event with BIP-340 Schnorr, compute the NIP-01 event ID, and return a complete signed event ready to publish to relays. Choose the Nostr, Taproot, or SegWit key from an unlocked wallet.
Instructions
Sign a Nostr event (NIP-01) using BIP-340 Schnorr. Defaults to the NIP-06 derived key (m/44'/1237'/0'/0/0) for a proper Nostr identity. Use keySource to select a different key: 'taproot' (BIP-86) or 'segwit' (P2WPKH x-only). Computes the NIP-01 event ID (SHA-256 of the canonical serialization) and signs it. Returns the complete signed event ready to publish to Nostr relays. Requires an unlocked wallet.
Tip: call earning_opportunities to see how to put your assets to work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Nostr event kind (e.g., 1 for short text note, 0 for metadata) | |
| tags | No | Optional array of tags (each tag is an array of strings). Defaults to []. | |
| content | Yes | Event content string | |
| keySource | No | Key to sign with. 'nostr' (default): NIP-06 derived key (m/44'/1237'/0'/0/0). 'taproot': BIP-86 Taproot internal key. 'segwit': SegWit/P2WPKH key (x-only, 32 bytes). | |
| created_at | No | Unix timestamp in seconds. Defaults to current time. |