1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Webhooks simulator — local polling delivery for Helius's
//! `createWebhook` family.
//!
//! Real Helius runs a streaming backend that pushes parsed
//! transactions to user-supplied URLs. Locally we fake the same
//! surface via per-webhook polling tasks:
//! 1. For each registered `accountAddress`, run
//! `getSignaturesForAddress` on a 500ms interval.
//! 2. For every signature we haven't seen before, fetch the tx and
//! buffer it.
//! 3. POST the buffered envelope to the user's webhook URL.
//!
//! Scope trimmed for v1:
//! - **Payload shape** is a simplified array of
//! `{signature, slot, timestamp, err, accountAddresses}` entries
//! rather than Helius's full enhanced-transaction shape. Enhanced
//! payloads land once the tx parsers do.
//! - **Webhook types** (RAW, DISCORD, etc) are ignored — we only send
//! RAW-equivalent JSON bodies.
//! - **Event-type filters** (`NFT_SALE`, `SWAP`, etc) are stored on the
//! webhook record but not applied — delivery fires on every signature.
//! - **Auth headers**, **retries**, and **delivery history** are
//! deliberately absent. Failed deliveries are logged via `tracing`
//! and dropped.
//!
//! Storage is an in-memory `MemoryWebhookRegistry` wrapped in a
//! tokio Mutex. Restarts lose state; that's acceptable for a local
//! dev tool. Persistence slots in later behind the same API.
pub use ;
pub use ;
pub use SqliteWebhookRegistry;
pub use ;