Function signature
Parameters
A list of up to 10
{ heir: principal, split-bps: uint } tuples that will replace the current heir list entirely. The same validation rules as create-vault apply:- The list must contain at least one entry.
- The sum of all
split-bpsvalues must equal exactly10000.
Return value
Returns
(ok true) on success. The heir-list map is updated, all heirs map entries for the new heirs are updated, and heir-count is set to the length of the new list.Returns
(err uint) on failure. See error codes below.Error codes
| Code | Constant | When returned |
|---|---|---|
| u103 | ERR-VAULT-NOT-FOUND | The calling address has no vault |
| u106 | ERR-INVALID-SPLITS | The new heir list is empty, or split-bps values do not sum to 10000 |
| u110 | ERR-VAULT-DISTRIBUTED | The vault has been distributed or cancelled |
What gets updated
The function updates three data structures:update-heirs does not reset existing heir-claimed entries. Old split-bps entries for heirs who are removed from the list are not explicitly deleted — they remain in the heirs map but are unreachable because the new heir list no longer includes those addresses.
Interaction with partial claims
JavaScript example
Verify that all
splitBps values sum to exactly 10000 before submitting. Use the same integer-arithmetic approach as create-vault — compute splits as integers and validate the sum client-side before calling the contract.