elapsed-seconds, seconds-until-grace, and seconds-until-claimable — are computed against stacks-block-time at the moment the function is called, so the result is always current and never stale.
Function signature
Parameters
The Stacks address of the vault owner to query. This is a read-only call — no wallet signature is required, and the caller does not need to be the owner.
Return value
On success, returns(ok { ... }) with the following 15 fields:
The vault’s current lifecycle state. One of four values:
The
| Value | Condition |
|---|---|
"active" | elapsed-seconds < heartbeat-interval |
"grace" | heartbeat-interval <= elapsed-seconds < heartbeat-interval + grace-period + guardian-bonus |
"claimable" | elapsed-seconds >= heartbeat-interval + grace-period + guardian-bonus (and not distributed) |
"distributed" | is-distributed = true |
"distributed" check takes priority — a vault is "distributed" even if its timing would otherwise place it in "claimable".The vault’s current sBTC balance in satoshis. Divide by
10^8 to convert to BTC. Decreases as heirs claim their shares.The vault’s current USDCx balance in micro-units. Divide by
10^6 to convert to USD. Decreases as heirs claim their shares.The
stacks-block-time value recorded when the owner last called heartbeat, or the creation timestamp if no heartbeat has been sent since the vault was created. Used as the base for all elapsed-time calculations.The number of seconds of inactivity configured when the vault was created. The vault enters
"grace" state once elapsed-seconds reaches this value.Additional seconds after the heartbeat interval before the vault becomes claimable. Configured at vault creation.
Seconds elapsed since
last-heartbeat, computed as stacks-block-time - last-heartbeat at query time. This value increases with every new Stacks block.Seconds remaining before the vault enters the
"grace" state. Returns 0 once the vault is already in grace, claimable, or distributed state.Seconds remaining before heirs can call
claim. Returns 0 once the vault is already claimable or distributed.This accounts for the guardian pause bonus: if guardian-pause-used is true, an additional 2,592,000 seconds (30 days) is added to the effective deadline.The total number of registered heirs for this vault.
The number of heirs who have already claimed their share. When
claims-count = heir-count, the vault is automatically marked as distributed.The Stacks address of the guardian, or
none if no guardian was configured. The guardian can call guardian-pause once during the grace period to extend the vault’s effective deadline by 30 days.Whether the guardian has already used their one-time pause. If
true, the vault’s claimable deadline has been extended by 2,592,000 seconds (30 days) and the guardian cannot pause again.true if the vault has been fully distributed. This happens automatically when the last heir claims, or immediately when the owner calls emergency-withdraw. A distributed vault cannot receive deposits, heartbeats, or claims.The
stacks-block-time value recorded when the vault was created via create-vault.State computation
The contract derivesstate and all countdown fields in a single read against stacks-block-time. No stored state field exists on-chain — the value is always freshly computed:
get-effective-deadline helper adds the 30-day guardian bonus when guardian-pause-used is true:
Error codes
| Code | Constant | When returned |
|---|---|---|
| u103 | ERR-VAULT-NOT-FOUND | No vault exists for the specified owner address |
JavaScript example
Handling errors
get-vault-status is a read-only function. It does not require a wallet connection or any transaction fee. You can call it from any environment that can reach a Stacks node, including server-side code.