auth

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = types.ModuleName
	RouterKey  = types.RouterKey
	StoreKey   = types.StoreKey

	Vendor              = types.Vendor
	TestHouse           = types.TestHouse
	CertificationCenter = types.CertificationCenter
	Trustee             = types.Trustee
	NodeAdmin           = types.NodeAdmin
)

Variables

View Source
var (
	NewKeeper     = keeper.NewKeeper
	NewQuerier    = keeper.NewQuerier
	NewAccount    = types.NewAccount
	ModuleCdc     = types.ModuleCdc
	RegisterCodec = types.RegisterCodec
	Roles         = types.Roles
)

Functions

func AccountApprovalsCount

func AccountApprovalsCount(ctx sdk.Context, keeper keeper.Keeper) int

func DefaultSigVerificationGasConsumer

func DefaultSigVerificationGasConsumer(meter sdk.GasMeter, pubkey crypto.PubKey) sdk.Result

DefaultSigVerificationGasConsumer is the default implementation of SignatureVerificationGasConsumer. It consumes gas for signature verification based upon the public key type. The cost is fetched from the given params and is matched by the concrete type.

func GetSignBytes

func GetSignBytes(chainID string, stdTx auth.StdTx, acc types.Account, genesis bool) []byte

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

func GetSignerAcc

func GetSignerAcc(ctx sdk.Context, keeper Keeper, address sdk.AccAddress) (acc types.Account, res sdk.Result)

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

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)

func NewAnteHandler

func NewAnteHandler(ak Keeper, sigGasConsumer SignatureVerificationGasConsumer) sdk.AnteHandler

NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers.

func NewHandler

func NewHandler(keeper keeper.Keeper) sdk.Handler

func SetGasMeter

func SetGasMeter(simulate bool, ctx sdk.Context, gasLimit uint64) sdk.Context

SetGasMeter returns a new context with a gas meter set from a given context.

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

func ValidateMemo

func ValidateMemo(stdTx auth.StdTx) sdk.Result

ValidateMemo validates the memo size.

Types

type Account

type Account = types.Account

type AccountRole

type AccountRole = types.AccountRole

type AccountRoles

type AccountRoles = types.AccountRoles

type AppModule

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

func NewAppModule

func NewAppModule(keeper Keeper) AppModule

func (AppModule) BeginBlock

func (a AppModule) BeginBlock(sdk.Context, abci.RequestBeginBlock)

func (AppModule) EndBlock

func (AppModule) ExportGenesis

func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

func (AppModule) InitGenesis

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

func (AppModule) NewHandler

func (a AppModule) NewHandler() sdk.Handler

func (AppModule) NewQuerierHandler

func (a AppModule) NewQuerierHandler() sdk.Querier

func (AppModule) QuerierRoute

func (a AppModule) QuerierRoute() string

func (AppModule) RegisterInvariants

func (a AppModule) RegisterInvariants(sdk.InvariantRegistry)

func (AppModule) Route

func (a AppModule) Route() string

type AppModuleBasic

type AppModuleBasic struct{}

app module Basics object.

func (AppModuleBasic) DefaultGenesis

func (a AppModuleBasic) DefaultGenesis() json.RawMessage

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

Get the root query command of this module.

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

Get the root tx command of this module.

func (AppModuleBasic) Name

func (a AppModuleBasic) Name() string

func (AppModuleBasic) RegisterCodec

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

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)

Register rest routes.

func (AppModuleBasic) ValidateGenesis

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

type GenesisState

type GenesisState struct {
	Accounts                  []Account                  `json:"accounts"`
	PendingAccounts           []PendingAccount           `json:"pending_accounts"`
	PendingAccountRevocations []PendingAccountRevocation `json:"pending_account_revocations"`
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState

func NewGenesisState

func NewGenesisState() GenesisState

type Keeper

type Keeper = keeper.Keeper

type ListAccounts

type ListAccounts = types.ListAccounts

type ListPendingAccountRevocations

type ListPendingAccountRevocations = types.ListPendingAccountRevocations

type ListPendingAccounts

type ListPendingAccounts = types.ListPendingAccounts

type PendingAccount

type PendingAccount = types.PendingAccount

type PendingAccountRevocation

type PendingAccountRevocation = types.PendingAccountRevocation

type SignatureVerificationGasConsumer

type SignatureVerificationGasConsumer = func(meter sdk.GasMeter, pubkey crypto.PubKey) sdk.Result

SignatureVerificationGasConsumer is the type of function that is used to both consume gas when verifying signatures and also to accept or reject different types of PubKey's. This is where apps can define their own PubKey.

type TestSetup

type TestSetup struct {
	Cdc     *amino.Codec
	Ctx     sdk.Context
	Keeper  Keeper
	Handler sdk.Handler
	Querier sdk.Querier
}

func Setup

func Setup() TestSetup

Directories

Path Synopsis
client
cli
internal

Jump to

Keyboard shortcuts

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