auth

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: Apache-2.0 Imports: 9 Imported by: 2,907

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSigners added in v0.2.0

func GetSigners(ctx types.Context) []types.Account

func NewAccountMapper added in v0.2.0

func NewAccountMapper(key sdk.StoreKey, proto sdk.Account) accountMapper

NewAccountMapper returns a new sdk.AccountMapper that uses go-wire to (binary) encode and decode concrete sdk.Accounts.

func NewAccountMapperSealed added in v0.2.0

func NewAccountMapperSealed(key sdk.StoreKey, proto sdk.Account) sealedAccountMapper

Create and return a sealed account mapper

func NewAnteHandler

func NewAnteHandler(accountMapper sdk.AccountMapper) sdk.AnteHandler

NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures, and deducts fees from the first signer.

func RegisterWireBaseAccount added in v0.2.0

func RegisterWireBaseAccount(cdc *wire.Codec)

func WithSigners added in v0.2.0

func WithSigners(ctx types.Context, accounts []types.Account) types.Context

Types

type BaseAccount

type BaseAccount struct {
	Address  sdk.Address   `json:"address"`
	Coins    sdk.Coins     `json:"coins"`
	PubKey   crypto.PubKey `json:"public_key"`
	Sequence int64         `json:"sequence"`
}

BaseAccount - base account structure. Extend this by embedding this in your AppAccount. See the examples/basecoin/types/account.go for an example.

func NewBaseAccountWithAddress

func NewBaseAccountWithAddress(addr sdk.Address) BaseAccount

func (BaseAccount) Get added in v0.2.0

func (acc BaseAccount) Get(key interface{}) (value interface{}, err error)

Implements sdk.Account.

func (BaseAccount) GetAddress added in v0.2.0

func (acc BaseAccount) GetAddress() sdk.Address

Implements sdk.Account.

func (*BaseAccount) GetCoins added in v0.2.0

func (acc *BaseAccount) GetCoins() sdk.Coins

Implements sdk.Account.

func (BaseAccount) GetPubKey added in v0.2.0

func (acc BaseAccount) GetPubKey() crypto.PubKey

Implements sdk.Account.

func (*BaseAccount) GetSequence added in v0.2.0

func (acc *BaseAccount) GetSequence() int64

Implements sdk.Account.

func (*BaseAccount) Set added in v0.2.0

func (acc *BaseAccount) Set(key interface{}, value interface{}) error

Implements sdk.Account.

func (*BaseAccount) SetAddress added in v0.2.0

func (acc *BaseAccount) SetAddress(addr sdk.Address) error

Implements sdk.Account.

func (*BaseAccount) SetCoins added in v0.2.0

func (acc *BaseAccount) SetCoins(coins sdk.Coins) error

Implements sdk.Account.

func (*BaseAccount) SetPubKey added in v0.2.0

func (acc *BaseAccount) SetPubKey(pubKey crypto.PubKey) error

Implements sdk.Account.

func (*BaseAccount) SetSequence added in v0.2.0

func (acc *BaseAccount) SetSequence(seq int64) error

Implements sdk.Account.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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