cosmos-sdk: github.com/cosmos/cosmos-sdk/x/auth/exported Index | Files

package exported

import "github.com/cosmos/cosmos-sdk/x/auth/exported"

Index

Package Files

exported.go

type Account Uses

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

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

    GetAccountNumber() uint64
    SetAccountNumber(uint64) error

    GetSequence() uint64
    SetSequence(uint64) 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. It presumes a notion of sequence numbers for replay protection, a notion of account numbers for replay protection for previously pruned accounts, and a pubkey for authentication purposes.

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

type GenesisAccount Uses

type GenesisAccount interface {
    Account
    Validate() error
}

GenesisAccount defines a genesis account that embeds an Account with validation capabilities.

type GenesisAccounts Uses

type GenesisAccounts []GenesisAccount

GenesisAccounts defines a slice of GenesisAccount objects

func (GenesisAccounts) Contains Uses

func (ga GenesisAccounts) Contains(addr sdk.Address) bool

Contains returns true if the given address exists in a slice of GenesisAccount objects.

Package exported imports 3 packages (graph) and is imported by 38 packages. Updated 2019-10-17. Refresh now. Tools for package owners.