github.com/cosmos/cosmos-sdk@v0.50.10/x/auth/vesting/exported/exported.go (about)

     1  package exported
     2  
     3  import (
     4  	"time"
     5  
     6  	sdk "github.com/cosmos/cosmos-sdk/types"
     7  )
     8  
     9  // VestingAccount defines an account type that vests coins via a vesting schedule.
    10  type VestingAccount interface {
    11  	sdk.AccountI
    12  
    13  	// LockedCoins returns the set of coins that are not spendable (i.e. locked),
    14  	// defined as the vesting coins that are not delegated.
    15  	//
    16  	// To get spendable coins of a vesting account, first the total balance must
    17  	// be retrieved and the locked tokens can be subtracted from the total balance.
    18  	// Note, the spendable balance can be negative.
    19  	LockedCoins(blockTime time.Time) sdk.Coins
    20  
    21  	// TrackDelegation performs internal vesting accounting necessary when
    22  	// delegating from a vesting account. It accepts the current block time, the
    23  	// delegation amount and balance of all coins whose denomination exists in
    24  	// the account's original vesting balance.
    25  	TrackDelegation(blockTime time.Time, balance, amount sdk.Coins)
    26  
    27  	// TrackUndelegation performs internal vesting accounting necessary when a
    28  	// vesting account performs an undelegation.
    29  	TrackUndelegation(amount sdk.Coins)
    30  
    31  	GetVestedCoins(blockTime time.Time) sdk.Coins
    32  	GetVestingCoins(blockTime time.Time) sdk.Coins
    33  
    34  	GetStartTime() int64
    35  	GetEndTime() int64
    36  
    37  	GetOriginalVesting() sdk.Coins
    38  	GetDelegatedFree() sdk.Coins
    39  	GetDelegatedVesting() sdk.Coins
    40  }