What the Heartbeat Is
A heartbeat is a signed transaction from the vault owner callingheartbeat() on the Heirloom contract. When the contract receives this call, it records the current block timestamp using Clarity 4’s stacks-block-time and resets the elapsed-time counter to zero.
There is no off-chain scheduler or cron job. The heartbeat is a standard Stacks transaction, settled with Bitcoin finality. The vault state is always computed live from stacks-block-time minus last-heartbeat — it is never stored as a flag that can go stale.
How to Send a Heartbeat
- Heirloom App
- Direct Contract Call
- TypeScript
The dashboard shows a real-time countdown to your next required heartbeat. Click the Send Heartbeat button to sign and broadcast the transaction with your connected wallet (Leather or Xverse).The countdown resets immediately once the transaction confirms on-chain.
The Heartbeat Timeline
The following diagram shows the relationship between heartbeats, the heartbeat interval, the grace period, and vault state:- Before interval expires: vault is
active— fully locked. - After interval, before interval + grace: vault is
grace— countdown visible to heirs. - After interval + grace: vault is
claimable— heirs can claim. - Heartbeat sent at any point before full distribution: vault returns to
active.
What Happens If You Miss a Heartbeat
Missing a single heartbeat does not immediately unlock the vault. The vault transitions through two stages:Grace period begins
Once
elapsed-seconds exceeds your configured heartbeat-interval, the vault enters the grace state. Heirs cannot claim yet. The guardian (if set) can use their one-time pause here.Vault becomes claimable
Once
elapsed-seconds exceeds heartbeat-interval + grace-period (plus any guardian pause bonus), the vault becomes claimable. Each heir can now call claim() independently.Recovery: Heartbeating From Grace or Claimable State
Theheartbeat() function works in all non-distributed states — including grace and claimable. This is intentional: if you were hospitalized, traveling without connectivity, or otherwise unable to send heartbeats for an extended period, you can still recover your vault as long as at least one heir has not yet claimed.
grace or claimable state resets last-heartbeat to the current block time, immediately returning the computed state to active.
If one heir has already claimed their share, their tokens are gone. A recovery heartbeat does not reverse completed claims. It only stops future claims by resetting the timer.
Choosing a Heartbeat Interval
The heartbeat interval is set when you create the vault and cannot be changed without creating a new vault. Choose an interval that matches your activity patterns and risk tolerance.| Interval | Best For | Risk |
|---|---|---|
| Daily (86,400 s) | High-value vaults, frequent travelers | Must check in every day; easy to miss |
| Weekly (604,800 s) | Most users | A week of inactivity starts the clock |
| Monthly (2,592,000 s) | Low-maintenance vaults | Up to a month of absence before grace begins |
| Quarterly (7,776,000 s) | Long-term storage vaults | Risk of forgotten vaults; not recommended without a guardian |
Heartbeat Interval vs. Grace Period
These are two separate configuration values:heartbeat-interval: How often you must prove liveness. The vault entersgraceif this window passes without a heartbeat.grace-period: A buffer after the missed heartbeat. Designed to absorb temporary outages (hospitalization, device loss, travel). The vault entersclaimableonly after both windows expire.
