Linear Vesting Wallet
Creates a Wallet that allows the holder to claim coins linearly.
Structs
Wallet
balance - Amount of tokens to give to the holder of the wallet.
start - The holder can start claiming tokens after this date.
released - Total amount of `Coin<T>` released so far.
duration - The duration of the vesting.
Interface
new
It creates a new Wallet.
@param token: A
sui::coin::Coin<T>
.@param c: The shared object
sui::clock::Clock
@param start: Dictate when the vesting schedule starts.
@param duration: Dictate when the vesting schedule starts.
@return Wallet.
Aborts
start
is in the past.
balance
Returns the current amount of tokens in the self
.
@param self: A Wallet.
@return u64.
start
Returns the vesting schedule start time.
@param self: A Wallet.
@return u64.
released
Returns the current amount of total released tokens from the self
.
@param self: A Wallet.
@return u64.
duration
Returns the duration of the vesting schedule.
@param self: A Wallet.
@return u64.
vesting_status
Returns the current amount of coins available to the caller based on the linear schedule.
@param self: A Wallet.
@param c: The
sui::clock::Clock
shared object.@return u64. A portion of the amount that can be claimed by the user.
claim
Releases the current amount of coins available to the caller based on the linear schedule.
@param self: A Wallet.
@param c: The
sui::clock::Clock
shared object.@return Coin.
destroy_zero
Destroys a Wallet with no balance.
@param self: A Wallet.
Last updated