auth

package
v0.0.0-...-3ea6778 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

Package auth nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/pokt-network/posmint/x/auth/types

Package auth nolint

Index

Constants

View Source
const (
	ModuleName        = types.ModuleName
	StoreKey          = types.StoreKey
	FeeCollectorName  = types.FeeCollectorName
	QuerierRoute      = types.QuerierRoute
	DefaultParamspace = types.DefaultParamspace
	QueryAccount      = types.QueryAccount
)

Const Constants

Variables

View Source
var (
	ProtoBaseAccount          = types.ProtoBaseAccount
	NewBaseAccountWithAddress = types.NewBaseAccountWithAddress
	RegisterCodec             = types.RegisterCodec
	NewGenesisState           = types.NewGenesisState
	DefaultGenesisState       = types.DefaultGenesisState
	CountSubKeys              = types.CountSubKeys
	StdSignBytes              = types.StdSignBytes
	DefaultTxDecoder          = types.DefaultTxDecoder
	DefaultTxEncoder          = types.DefaultTxEncoder
	NewTxBuilder              = types.NewTxBuilder
	NewAccountRetriever       = types.NewAccountRetriever
	ModuleCdc                 = types.ModuleCdc
)

Functions

func DeductFees

func DeductFees(supplyKeeper types.SupplyKeeper, ctx sdk.Ctx, acc Account, fees sdk.Coins) sdk.Result

DeductFees deducts fees from the given account.

NOTE: We could use the CoinKeeper (in addition to the AccountKeeper, because the CoinKeeper doesn't give us accounts), but it seems easier to do this.

func EnsureSufficientMempoolFees

func EnsureSufficientMempoolFees(ctx sdk.Ctx, stdFee sdk.Coins) sdk.Result

EnsureSufficientMempoolFees verifies that the given transaction has supplied enough fees to cover a proposer's minimum fees. A result object is returned indicating success or failure.

Contract: This should only be called during CheckTx as it cannot be part of consensus.

func GetSignBytes

func GetSignBytes(chainID string, stdTx StdTx) []byte

GetSignBytes returns a slice of bytes to sign over for a given transaction and an account.

func InitGenesis

func InitGenesis(ctx sdk.Ctx, ak AccountKeeper, data GenesisState)

InitGenesis - Init store state from genesis data

CONTRACT: old coins from the FeeCollectionKeeper need to be transferred through a genesis port script to the new fee collector account

func NewAnteHandler

func NewAnteHandler(ak AccountKeeper, supplyKeeper types.SupplyKeeper) sdk.AnteHandler

NewAnteHandler returns an AnteHandler that checks signatures and deducts fees from the first signer.

func NewQuerier

func NewQuerier(keeper AccountKeeper) sdk.Querier

NewQuerier creates a querier for auth REST endpoints

func ProcessPubKey

func ProcessPubKey(acc Account, sig StdSignature) (posCrypto.PublicKey, sdk.Result)

ProcessPubKey verifies that the given account address matches that of the StdSignature. In addition, it will set the public key of the account if it has not been set.

func ValidateMemo

func ValidateMemo(stdTx StdTx, params Params) sdk.Result

ValidateMemo validates the memo size.

func ValidateSigCount

func ValidateSigCount(stdTx StdTx, params Params) sdk.Result

ValidateSigCount validates that the transaction has a valid cumulative total amount of signatures.

Types

type Account

type Account = exported.Account

Type exported types

func GetSignerAcc

func GetSignerAcc(ctx sdk.Ctx, ak AccountKeeper, addr sdk.Address) (Account, sdk.Result)

GetSignerAcc returns an account for a given address that is expected to sign a transaction.

type AccountKeeper

type AccountKeeper struct {
	// contains filtered or unexported fields
}

AccountKeeper encodes/decodes accounts using the go-amino (binary) encoding/decoding library.

func NewAccountKeeper

func NewAccountKeeper(
	cdc *codec.Codec, key sdk.StoreKey, paramstore sdk.Subspace, proto func() exported.Account,
) AccountKeeper

NewAccountKeeper returns a new sdk.AccountKeeper that uses go-amino to (binary) encode and decode concrete sdk.Accounts. nolint

func (AccountKeeper) GetAccount

func (ak AccountKeeper) GetAccount(ctx sdk.Ctx, addr sdk.Address) exported.Account

GetAccount implements sdk.AccountKeeper.

func (AccountKeeper) GetAllAccounts

func (ak AccountKeeper) GetAllAccounts(ctx sdk.Ctx) []exported.Account

GetAllAccounts returns all accounts in the accountKeeper.

func (AccountKeeper) GetParams

func (ak AccountKeeper) GetParams(ctx sdk.Ctx) (params types.Params)

GetParams gets the auth module's parameters.

func (AccountKeeper) GetPubKey

func (ak AccountKeeper) GetPubKey(ctx sdk.Ctx, addr sdk.Address) (crypto.PublicKey, sdk.Error)

GetPubKey Returns the PublicKey of the account at address

func (AccountKeeper) IterateAccounts

func (ak AccountKeeper) IterateAccounts(ctx sdk.Ctx, process func(exported.Account) (stop bool))

IterateAccounts implements sdk.AccountKeeper.

func (AccountKeeper) Logger

func (ak AccountKeeper) Logger(ctx sdk.Ctx) log.Logger

Logger returns a module-specific logger.

func (AccountKeeper) NewAccount

func (ak AccountKeeper) NewAccount(ctx sdk.Ctx, acc exported.Account) exported.Account

NewAccount creates a new account

func (AccountKeeper) NewAccountWithAddress

func (ak AccountKeeper) NewAccountWithAddress(ctx sdk.Ctx, addr sdk.Address) exported.Account

NewAccountWithAddress implements sdk.AccountKeeper.

func (AccountKeeper) RemoveAccount

func (ak AccountKeeper) RemoveAccount(ctx sdk.Ctx, acc exported.Account)

RemoveAccount removes an account for the account mapper store. NOTE: this will cause supply invariant violation if called

func (AccountKeeper) SetAccount

func (ak AccountKeeper) SetAccount(ctx sdk.Ctx, acc exported.Account)

SetAccount implements sdk.AccountKeeper.

func (AccountKeeper) SetParams

func (ak AccountKeeper) SetParams(ctx sdk.Ctx, params types.Params)

SetParams sets the auth module's parameters.

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule app module object ___________________________

func NewAppModule

func NewAppModule(accountKeeper AccountKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (AppModule) BeginBlock(_ sdk.Ctx, _ abci.RequestBeginBlock)

BeginBlock module begin-block

func (AppModule) EndBlock

EndBlock module end-block

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Ctx) json.RawMessage

ExportGenesis module export genesis

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Ctx, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis module init-genesis

func (AppModule) Name

func (AppModule) Name() string

Name module name

func (AppModule) NewHandler

func (AppModule) NewHandler() sdk.Handler

NewHandler module handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler module querier

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute module querier route name

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

RegisterInvariants register invariants

func (AppModule) Route

func (AppModule) Route() string

Route module message route name

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic app module basics object

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis default genesis state

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name module name

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

RegisterCodec register module codec

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

ValidateGenesis module validate genesis

type BaseAccount

type BaseAccount = types.BaseAccount

Type exported types

type DummySupplyKeeper

type DummySupplyKeeper struct {
	// contains filtered or unexported fields
}

DummySupplyKeeper defines a supply keeper used only for testing to avoid circle dependencies

func NewDummySupplyKeeper

func NewDummySupplyKeeper(ak AccountKeeper) DummySupplyKeeper

NewDummySupplyKeeper creates a DummySupplyKeeper instance

func (DummySupplyKeeper) GetModuleAccount

func (sk DummySupplyKeeper) GetModuleAccount(ctx sdk.Ctx, moduleName string) exported.ModuleAccountI

GetModuleAccount for dummy supply keeper

func (DummySupplyKeeper) GetModuleAddress

func (sk DummySupplyKeeper) GetModuleAddress(moduleName string) sdk.Address

GetModuleAddress for dummy supply keeper

func (DummySupplyKeeper) SendCoinsFromAccountToModule

func (sk DummySupplyKeeper) SendCoinsFromAccountToModule(ctx sdk.Ctx, fromAddr sdk.Address, recipientModule string, amt sdk.Coins) sdk.Error

SendCoinsFromAccountToModule for the dummy supply keeper

type GenesisState

type GenesisState = types.GenesisState

Type exported types

func ExportGenesis

func ExportGenesis(ctx sdk.Ctx, ak AccountKeeper) GenesisState

ExportGenesis returns a GenesisState for a given context and keeper

type Params

type Params = types.Params

Type exported types

type QueryAccountParams

type QueryAccountParams = types.QueryAccountParams

Type exported types

type StdSignDoc

type StdSignDoc = types.StdSignDoc

Type exported types

type StdSignature

type StdSignature = types.StdSignature

Type exported types

type StdTx

type StdTx = types.StdTx

Type exported types

type TxBuilder

type TxBuilder = types.TxBuilder

Type exported types

Directories

Path Synopsis
nolint noalias
nolint noalias

Jump to

Keyboard shortcuts

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