Summary
Kind 62 (Request to Vanish) triggers the VanishEventStrategy, which deletes all stored events for the sender's pubkey (except kind 62 itself) and marks the user as vanished. This is a destructive, irreversible flow with zero integration test coverage.
What to test
- After sending kind 62, a subsequent REQ for that pubkey's events returns only the kind 62 vanish event (all others deleted)
- After vanishing, any new events published by that pubkey must be rejected
- The kind 62 event itself is stored and retrievable
Relevant code
src/handlers/event-strategies/vanish-event-strategy.ts
src/factories/event-strategy-factory.ts
src/repositories/event-repository.ts — deleteByPubkeyExceptKinds
src/repositories/user-repository.ts — setVanished
Suggested location
test/integration/features/nip-62/nip-62.feature (or a dedicated vanish feature file)
Summary
Kind 62 (Request to Vanish) triggers the
VanishEventStrategy, which deletes all stored events for the sender's pubkey (except kind 62 itself) and marks the user as vanished. This is a destructive, irreversible flow with zero integration test coverage.What to test
Relevant code
src/handlers/event-strategies/vanish-event-strategy.tssrc/factories/event-strategy-factory.tssrc/repositories/event-repository.ts—deleteByPubkeyExceptKindssrc/repositories/user-repository.ts—setVanishedSuggested location
test/integration/features/nip-62/nip-62.feature(or a dedicated vanish feature file)