User Metadata
Functions to fetch user-specific vault data, such as shares and unlock times, requiring a connected wallet address.
Introduction
These are functions that requires a user to be connected to the dapp with their address exposed via useAddress from wagmi and provide user specific information.
fetchUserShares
This function provides the decimal adjusted (human readable) numerical value of vault shares that a user owns in their account.
Inputs
- userAddress: the address of the user in the vault you'd like to get the shares for
Outputs
- A promise that returns the decimal adjusted (human readable) total numerical value of all shares of a vault a user owns
Example
fetchUserUnlockTime
This function provides the unlock time for when a user may transfer or withdraw their shares.
Inputs
- userAddress: the address of the user in the vault you'd like to get the unlock time for
Outputs
- A promise that returns the Unix Seconds timestamp for when a user may transfer or withdraw their shares from the vault