Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/natureloved/DeadMan-Vault/llms.txt

Use this file to discover all available pages before exploring further.

A heartbeat check-in is how you prove to the Deadman Vault system that you are still alive and in control. Each check-in extends your vault’s on-chain deadline by one full heartbeat interval. The mechanism is elegantly simple: you sign a 0.01 USDCx transfer to your vault’s keeper address, the server detects the incoming funds, decrypts the keeper key, and calls setRoutingRules with a new deadlineBlock followed by deposit() on the FlowVault contract. Your vault timer resets, and the check-in is written to the heartbeats table with the block height and transaction ID. Missing a check-in is the only thing that triggers vault succession — so make it a habit.

Heartbeat page

The check-in UI lives at /heartbeat?vaultId=[id]. You can reach it directly from any vault card on your dashboard — each card links to the heartbeat page for that vault. The page requires your Stacks wallet to be connected; if it isn’t, you’ll see a Connect Wallet prompt.
1

Navigate to /heartbeat and select your vault

Open /heartbeat?vaultId=[vaultId] from your dashboard. The page resolves the vault ID from the URL query parameter and immediately fetches vault state from GET /api/vaults/[vaultId]?address=[yourAddress].If no vaultId is provided in the URL, the page shows a prompt directing you back to your dashboard to select a vault.
2

Review your current deadline status

Once loaded, the page shows a BlockCounter with three key numbers:
  • Current block height — fetched live from the Hiro Stacks API
  • Deadline block — the heartbeat_deadline_block stored for your vault
  • Time remaining — computed as (deadlineBlock − currentBlock) × ~10 minutes per block
The page also shows an animated status indicator (DeadmanAnimation) that reflects your current vault status. Block data refreshes automatically every 30 seconds while the page is open.
If your vault is still in funding status (on-chain activation not yet complete), the page shows a yellow notice. Wait a few seconds and click Refresh — activation typically completes within one block confirmation.
3

Initiate check-in

Click Check In Now. The button is disabled if:
  • Your vault status is triggered or claimed (succession already ran)
  • Your vault is still in funding state
  • The keeper address could not be loaded
While the wallet prompt is opening, the button label changes to Confirm in wallet…
4

Sign the 0.01 USDCx transfer in your wallet

Your wallet extension opens with a pre-built SIP-010 transfer transaction:
  • Amount: 0.01 USDCx (the constant HEARTBEAT_AMOUNT)
  • Recipient: your vault’s keeper address
  • Contract: usdcx at ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
Confirm the transaction in your wallet. After confirmation, the wallet returns a txId.If your wallet doesn’t respond within 45 seconds, the app surfaces an error. This is usually caused by multiple Stacks wallet extensions installed simultaneously — disable all but one in chrome://extensions and refresh.
5

App calls POST /api/heartbeat

With the txId in hand, the app immediately posts to POST /api/heartbeat with:
{
  "vaultId": "your-vault-id",
  "fundingTxId": "txId-from-wallet"
}
No action field is sent — the endpoint treats requests without an action field as heartbeat check-ins.
6

Server extends the deadline on-chain

The server performs the following sequence:
  1. Looks up the vault record and verifies its status allows a heartbeat.
  2. Decrypts the keeper private key from the stored ciphertext.
  3. Instantiates a FlowVault client with the keeper as signer.
  4. Reads the current block height.
  5. Computes the new deadline: newDeadlineBlock = currentBlock + heartbeatIntervalDays × 144.
  6. Calls setRoutingRules on the FlowVault contract with the updated lockUntilBlock.
  7. Calls deposit() to register the 0.01 USDCx heartbeat payment.
  8. Updates heartbeat_deadline_block in the database.
  9. Inserts a row in the heartbeats table with block_height and tx_id.
On success, the API returns { newDeadlineBlock } and the BlockCounter on the page updates immediately.
7

Verify the updated deadline

After a successful check-in, the BlockCounter displays the new deadline block and the updated time remaining. The vault status returns to active if it had degraded to warning.You can also confirm the check-in on the /status/[vaultId] page — it lists every heartbeat event in the On-Chain Activity log with timestamps, block heights, and transaction links.

What happens if you miss a check-in

The keeper cron job runs periodically and monitors all active vaults. Two thresholds are defined in constants.ts:
ConstantBlocksApprox. time
WARNING_BLOCKS432~3 days before deadline
GRACE_PERIOD_BLOCKS288~2 days after deadline
  • At 432 blocks before deadline — vault status transitions to warning; a warning email is sent to your registered email address.
  • At the deadline block — vault status transitions to grace_period; a critical last-chance email is sent.
  • 288 blocks after the deadline — the vault is considered triggered; status moves to triggered and the keeper begins settling payouts to beneficiaries.
Check in with meaningful buffer time — don’t wait until the last day. If you have a 30-day interval, aim to check in every 20–25 days. A missed check-in due to travel, illness, or an inactive device cannot be undone once the vault triggers.

Heartbeat records

Every successful check-in is persisted in the heartbeats table with:
heartbeats
├── id           (UUID)
├── vault_id     (FK → vaults.id)
├── block_height (Stacks block at time of check-in)
├── tx_id        (on-chain transaction ID)
├── deposited_amount ("0.01")
└── created_at   (server timestamp)
The full history is visible on the vault status page at /status/[vaultId].

Create a Vault

Set up a new Deadman Vault with beneficiaries and a heartbeat interval.

Claim Inheritance

How beneficiaries claim their share from a triggered vault.

Build docs developers (and LLMs) love