@cdr-kit/contracts/Conditions/DeadManSwitchCondition
DeadManSwitchCondition
Auto-unlock to heir(s) (or public) if the creator stops calling poke() within duration. The wallet-recovery / estate-planning / leak-on-disappearance primitive Story docs reference.
address = 0x37226f97e184843aB0b8d4f08A55969801B97766
Config shape
| Prop | Type | Default | Description |
|---|---|---|---|
| durationrequired | uint64 | — | Heartbeat window length (seconds OR blocks). Must be > 0. |
| heirsrequired | address[] | — | Allowed readers post-unlock if publicAfterUnlock = false. Empty array forces publicAfterUnlock to true. |
| blockBasedrequired | bool | — | true = interpret duration as block count. |
| creatorCanReadWhileLockedrequired | bool | — | Creator reads their own vault pre-unlock (default true via agent helper). |
| publicAfterUnlockrequired | bool | — | true = anyone reads post-unlock; false = restricted to heirs. |
The trapdoor
Post-unlock, the creator gets NO special treatment. If publicAfterUnlock = false AND the creator isn't in heirs, they lose read access permanently at unlock — by design. agent.createDeadManVault defaults creatorCanReadWhileLocked = true and recommends adding the creator to heirs for post-unlock access.
poke()
Creator-only. Cannot be called after unlockAt (one-way trapdoor — reviving would let a late-poking creator block heirs forever). Most operational risk is forgetting to poke; consider a self-hosted cron or Gelato Automate for long durations.