Expand description
Wrapper tracking — NIP-59 gift wrap dedup + NIP-77 negentropy.
Constants§
- TRANSPORT_
CONCORD - TRANSPORT_
NIP17 - Transport carriers for the shared outer-event ledger — stored as a small INTEGER discriminator (cheaper than a per-row string, and the ledger can grow large). Never renumber an existing value.
Functions§
- load_
negentropy_ items - Load all processed wrappers as (EventId, Timestamp) pairs for negentropy (NIP-77).
- load_
processed_ wrappers - Load all processed wrapper IDs as raw bytes for the dedup cache.
- load_
recent_ wrapper_ ids - Load recent wrapper IDs from events table (last N days) as raw bytes.
- processed_
wrapper_ exists - Sync existence check against the ledger (any transport) — the DB half of the outer-event dedup
for callers that can’t reach the async
WRAPPER_ID_CACHE(e.g. the synchronous Concord ingest). Returns false on a missing/closed DB so a dedup failure never drops a genuinely-new event. - save_
processed_ wrapper - Persist an outer-event id for cross-session dedup (INSERT OR IGNORE), tagged by
transportso the ledger is shared across transports while negentropy stays NIP-17-scoped. - update_
wrapper_ timestamp - Upsert a wrapper timestamp (backfill for pre-migration-17 wrappers).