Documentation ¶
Index ¶
- Constants
- Variables
- func AccountApprovalsCount(ctx sdk.Context, keeper keeper.Keeper) int
- func DefaultSigVerificationGasConsumer(meter sdk.GasMeter, pubkey crypto.PubKey) sdk.Result
- func GetSignBytes(chainID string, stdTx auth.StdTx, acc types.Account, genesis bool) []byte
- func GetSignerAcc(ctx sdk.Context, keeper Keeper, address sdk.AccAddress) (acc types.Account, res sdk.Result)
- func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)
- func NewAnteHandler(ak Keeper, sigGasConsumer SignatureVerificationGasConsumer) sdk.AnteHandler
- func NewHandler(keeper keeper.Keeper) sdk.Handler
- func SetGasMeter(simulate bool, ctx sdk.Context, gasLimit uint64) sdk.Context
- func ValidateGenesis(data GenesisState) error
- func ValidateMemo(stdTx auth.StdTx) sdk.Result
- type Account
- type AccountRole
- type AccountRoles
- type AppModule
- func (a AppModule) BeginBlock(sdk.Context, abci.RequestBeginBlock)
- func (a AppModule) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate
- func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (a AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (a AppModule) NewHandler() sdk.Handler
- func (a AppModule) NewQuerierHandler() sdk.Querier
- func (a AppModule) QuerierRoute() string
- func (a AppModule) RegisterInvariants(sdk.InvariantRegistry)
- func (a AppModule) Route() string
- type AppModuleBasic
- func (a AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (a AppModuleBasic) Name() string
- func (a AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (a AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type GenesisState
- type Keeper
- type ListAccounts
- type ListPendingAccountRevocations
- type ListPendingAccounts
- type PendingAccount
- type PendingAccountRevocation
- type SignatureVerificationGasConsumer
- type TestSetup
Constants ¶
Variables ¶
var ( NewKeeper = keeper.NewKeeper NewQuerier = keeper.NewQuerier NewAccount = types.NewAccount ModuleCdc = types.ModuleCdc RegisterCodec = types.RegisterCodec Roles = types.Roles )
Functions ¶
func DefaultSigVerificationGasConsumer ¶
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 ¶
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 SetGasMeter ¶
SetGasMeter returns a new context with a gas meter set from a given context.
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
Types ¶
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 (AppModule) BeginBlock ¶
func (a AppModule) BeginBlock(sdk.Context, abci.RequestBeginBlock)
func (AppModule) EndBlock ¶
func (a AppModule) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate
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 (AppModule) NewQuerierHandler ¶
func (AppModule) QuerierRoute ¶
func (AppModule) RegisterInvariants ¶
func (a AppModule) RegisterInvariants(sdk.InvariantRegistry)
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 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 ¶
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.