exported

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustodianUnit

type CustodianUnit interface {
	GetAddress() sdk.CUAddress
	SetAddress(sdk.CUAddress) error // errors if already set.

	GetPubKey() crypto.PubKey // can return nil.
	SetPubKey(crypto.PubKey) error

	GetSequence() uint64
	SetSequence(uint64) error

	String() string

	GetCUType() sdk.CUType

	SetCUType(sdk.CUType) error
	// for Operation CU
	SetSymbol(symbol string) error
	GetSymbol() string

	Validate() error
}

CustodianUnit is an interface used to store coins at a given address within state. It presumes a notion of sequence numbers for replay protection, a notion of CustodianUnit numbers for replay protection for previously pruned CUs, and a pubkey for authentication purposes.

Many complex conditions can be used in the concrete struct which implements CustodianUnit.

type VestingCU

type VestingCU interface {
	CustodianUnit

	// Delegation and undelegation accounting that returns the resulting base
	// coins amount.
	TrackDelegation(blockTime time.Time, amount sdk.Coins)
	TrackUndelegation(amount sdk.Coins)

	GetVestedCoins(blockTime time.Time) sdk.Coins
	GetVestingCoins(blockTime time.Time) sdk.Coins

	GetStartTime() int64
	GetEndTime() int64

	GetOriginalVesting() sdk.Coins
	GetDelegatedFree() sdk.Coins
	GetDelegatedVesting() sdk.Coins
}

VestingCU defines an CustodianUnit type that vests coins via a vesting schedule.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL