heirs-data list passed to create-vault or the most recent call to update-heirs. Up to 10 heirs can be registered on a single vault.
Function signature
Parameters
The Stacks address of the vault owner whose heir list you want to retrieve. No wallet connection is required.
Return value
Returns
(ok (list 10 principal)) — an ordered list of up to 10 Stacks addresses that are registered as heirs. The list is in the same order as it was provided to create-vault or update-heirs.If no vault exists for the specified owner, the contract returns an empty list rather than an error (see behavior note below).Behavior note
Unlikeget-vault-status and get-heir-info, get-heir-list does not return ERR-VAULT-NOT-FOUND for an unknown owner. Instead, it uses default-to to return an empty list:
get-vault-status.
Error codes
| Code | Constant | When returned |
|---|---|---|
| u103 | ERR-VAULT-NOT-FOUND | Not returned by this function — an unknown owner produces an empty list |
get-heir-list always returns (ok ...). There is no error path. To detect a missing vault, call get-vault-status separately — it will return ERR-VAULT-NOT-FOUND (u103) for an address with no vault.JavaScript example
Example JSON output from cvToJSON
A vault with two heirs:
Combining with get-heir-info to build a full heir table
Call get-heir-list to discover all heir addresses, then call get-heir-info in parallel for each one to retrieve their allocation and claim status:
The list returned reflects the state at the last
create-vault or update-heirs call. If heirs have been updated, the list shows only the current heir set. Previous heirs that were removed are not included, though their heir-claimed records remain on-chain.