Function signature
Parameters
The Stacks address of the vault owner. Used to locate the correct vault and heir record.
The Stacks address of the heir to look up. If this address is not a registered heir for the specified vault, the function returns
ERR-NOT-HEIR.Return value
On success, returns(ok { ... }) with the following 2 fields:
The heir’s share of the vault in basis points, where
The actual token amount an heir receives is
10000 equals 100%. For example:split-bps value | Percentage |
|---|---|
u10000 | 100% (sole heir) |
u5000 | 50% |
u3334 | 33.34% |
u1000 | 10% |
floor(balance × split-bps / 10000). Splits across all heirs on a vault must sum to exactly 10000.Whether this heir has already called
claim for this vault. true means the heir has received their tokens and cannot claim again. false means their share is still available.This field defaults to false for heirs registered on a newly created vault, and is reset to false if the owner re-creates the vault after distribution.Basis points explained
Basis points (bps) are a unit where 1 bp = 0.01%, so 10,000 bps = 100%. They allow precise integer splits without floating-point arithmetic:Error codes
| Code | Constant | When returned |
|---|---|---|
| u101 | ERR-NOT-HEIR | The specified heir address is not registered on this vault |
| u103 | ERR-VAULT-NOT-FOUND | No vault exists for the specified owner address |
JavaScript example
Example JSON output from cvToJSON
A successful response for an heir with a 40% split who has not yet claimed:
Handling errors
get-heir-info is a read-only function and requires no wallet connection or transaction fee. The senderAddress in the wrapper is set to heirAddress by convention, but this has no effect on the result — read-only calls on Stacks do not use tx-sender.