Expand description
Message sending — NIP-17 gift-wrapped DMs (text and file attachments).
This is the core send pipeline used by all Vector interfaces (GUI, CLI, SDK).
Clients provide a SendCallback for status notifications (pending/sent/failed/progress)
and a SendConfig for retry/cancel behavior.
Structs§
- NoOp
Send Callback - No-op callback for headless/CLI/test use.
- Send
Config - Configuration for a send operation.
- Send
Result - Result of sending a message.
Constants§
- NIP59_
RANDOM_ TIMESTAMP_ TWEAK - NIP-59’s gift-wrap backdating window (0 to 2 days).
Traits§
- Send
Callback - Callbacks invoked during the DM send pipeline.
Functions§
- clear_
wrap_ confirms - Clear on session swap — entries carry per-account chat/message ids.
- note_
relay_ ok - Feed a relay
OKfor an outbound event back into the send pipeline. - resend_
failed_ dm - Manually retry a failed DM by republishing the EXACT retained recipient wrap. Same outer event id → relays no-op the duplicate, so a first send that silently landed can never double-post, regardless of the recipient’s client.
- send_dm
- Send a NIP-17 gift-wrapped text DM.
- send_
file_ dm - Send a NIP-17 gift-wrapped file attachment DM.
- send_
rumor_ dm - Send a pre-built rumor via NIP-17 gift-wrap.
- tweaked_
timestamp Timestamp::now()backdated by a random offset inside the NIP-59 window.