guardian-pause-used flag on a vault to true, which adds 2,592,000 seconds (30 days) to the vault’s effective deadline. This gives an owner additional time to send a heartbeat if they are temporarily unable to access their account. Can only be called by the vault’s registered guardian, only during the grace period, and only once per vault lifetime.
Function signature
Parameters
The Stacks address of the vault owner whose vault should be paused. The guardian must call this function and pass the owner’s address — the vault is looked up by this principal, not by
tx-sender.Return value
Returns
(ok true) on success. The vault’s guardian-pause-used flag is set to true, extending the effective deadline by 30 days.Returns
(err uint) on failure. See error codes below.Error codes
| Code | Constant | When returned |
|---|---|---|
| u102 | ERR-NOT-GUARDIAN | The calling address is not the vault’s registered guardian |
| u103 | ERR-VAULT-NOT-FOUND | No vault exists for the specified vault-owner |
| u104 | ERR-VAULT-NOT-CLAIMABLE | The grace period has already expired — the vault is already claimable |
| u111 | ERR-GUARDIAN-PAUSE-USED | The guardian has already used their one-time pause for this vault |
| u112 | ERR-NOT-IN-GRACE | The vault is still active — the grace period has not started yet |
Valid window for guardian-pause
The function checks that elapsed time is within the grace window — past the heartbeat interval but before the full deadline:| Vault state | guardian-pause allowed? |
|---|---|
active | No — returns ERR-NOT-IN-GRACE |
grace | Yes — sets guardian-pause-used: true |
claimable | No — returns ERR-VAULT-NOT-CLAIMABLE |
distributed | No — returns ERR-VAULT-NOT-CLAIMABLE (if elapsed >= total) or ERR-NOT-IN-GRACE (if elapsed < interval) |
How the 30-day extension works
Theguardian-pause-used flag is not a separate timer — it is factored into the effective deadline each time state is computed. The get-effective-deadline private function adds GUARDIAN-PAUSE-BONUS (u2592000) when the flag is true:
guardian-pause-used is never reset to false except by creating a new vault via create-vault.
