exported

package
v0.0.0-...-018dd44 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 3 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account interface {
	GetAddress() sdk.Address
	SetAddress(sdk.Address) error // errors if already set.

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

	GetCoins() sdk.Coins
	SetCoins(sdk.Coins) error

	// Calculates the amount of coins that can be sent to other accounts given
	// the current time.
	SpendableCoins(blockTime time.Time) sdk.Coins

	// Ensure that account implements stringer
	String() string
}

Account is an interface used to store coins at a given address within state. Many complex conditions can be used in the concrete struct which implements Account.

type ModuleAccountI

type ModuleAccountI interface {
	Account

	GetName() string
	GetPermissions() []string
	HasPermission(string) bool
}

ModuleAccountI defines an account interface for modules that hold tokens in an escrow

type SupplyI

type SupplyI interface {
	GetTotal() sdk.Coins
	SetTotal(total sdk.Coins) SupplyI

	Inflate(amount sdk.Coins) SupplyI
	Deflate(amount sdk.Coins) SupplyI

	String() string
	ValidateBasic() error
}

SupplyI defines an inflationary supply interface for modules that handle token supply.

Jump to

Keyboard shortcuts

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