auth

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/terra-project/core/x/auth/internal/types/

nolint

Index

Constants

View Source
const (
	ModuleName                    = auth.ModuleName
	StoreKey                      = auth.StoreKey
	FeeCollectorName              = auth.FeeCollectorName
	QuerierRoute                  = auth.QuerierRoute
	DefaultParamspace             = auth.DefaultParamspace
	DefaultMaxMemoCharacters      = auth.DefaultMaxMemoCharacters
	DefaultTxSigLimit             = auth.DefaultTxSigLimit
	DefaultTxSizeCostPerByte      = auth.DefaultTxSizeCostPerByte
	DefaultSigVerifyCostED25519   = auth.DefaultSigVerifyCostED25519
	DefaultSigVerifyCostSecp256k1 = auth.DefaultSigVerifyCostSecp256k1
	QueryAccount                  = auth.QueryAccount
)

Variables

View Source
var (
	// functions aliases
	RegisterCodec                      = types.RegisterCodec
	NewLazySchedule                    = types.NewLazySchedule
	NewVestingSchedule                 = types.NewVestingSchedule
	NewBaseLazyGradedVestingAccountRaw = types.NewBaseLazyGradedVestingAccountRaw
	NewBaseLazyGradedVestingAccount    = types.NewBaseLazyGradedVestingAccount

	// variable aliases
	ModuleCdc = types.ModuleCdc
)
View Source
var (
	// functions aliases
	NewBaseAccount                 = auth.NewBaseAccount
	ProtoBaseAccount               = auth.ProtoBaseAccount
	NewBaseAccountWithAddress      = auth.NewBaseAccountWithAddress
	NewBaseVestingAccount          = auth.NewBaseVestingAccount
	NewContinuousVestingAccountRaw = auth.NewContinuousVestingAccountRaw
	NewContinuousVestingAccount    = auth.NewContinuousVestingAccount
	NewDelayedVestingAccountRaw    = auth.NewDelayedVestingAccountRaw
	NewDelayedVestingAccount       = auth.NewDelayedVestingAccount
	NewGenesisState                = auth.NewGenesisState
	ValidateGenesis                = auth.ValidateGenesis
	AddressStoreKey                = auth.AddressStoreKey
	NewParams                      = auth.NewParams
	ParamKeyTable                  = auth.ParamKeyTable
	DefaultParams                  = auth.DefaultParams
	NewQueryAccountParams          = auth.NewQueryAccountParams
	NewStdTx                       = auth.NewStdTx
	CountSubKeys                   = auth.CountSubKeys
	NewStdFee                      = auth.NewStdFee
	StdSignBytes                   = auth.StdSignBytes
	DefaultTxDecoder               = auth.DefaultTxDecoder
	DefaultTxEncoder               = auth.DefaultTxEncoder
	NewTxBuilder                   = auth.NewTxBuilder
	NewTxBuilderFromCLI            = auth.NewTxBuilderFromCLI
	MakeSignature                  = auth.MakeSignature
	NewAccountRetriever            = auth.NewAccountRetriever
	NewAccountKeeper               = auth.NewAccountKeeper

	// variable aliases
	AddressStoreKeyPrefix     = auth.AddressStoreKeyPrefix
	GlobalAccountNumberKey    = auth.GlobalAccountNumberKey
	KeyMaxMemoCharacters      = auth.KeyMaxMemoCharacters
	KeyTxSigLimit             = auth.KeyTxSigLimit
	KeyTxSizeCostPerByte      = auth.KeyTxSizeCostPerByte
	KeySigVerifyCostED25519   = auth.KeySigVerifyCostED25519
	KeySigVerifyCostSecp256k1 = auth.KeySigVerifyCostSecp256k1
	CosmosModuleCdc           = auth.ModuleCdc
	NewCosmosAppModule        = auth.NewAppModule
)

Functions

func DeductFees

func DeductFees(supplyKeeper types.SupplyKeeper, ctx sdk.Context, 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 DefaultSigVerificationGasConsumer

func DefaultSigVerificationGasConsumer(
	meter sdk.GasMeter, sig []byte, pubkey crypto.PubKey, params Params,
) 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 EnsureSufficientMempoolFees

func EnsureSufficientMempoolFees(ctx sdk.Context, stdFee StdFee, taxes sdk.Coins) sdk.Result

EnsureSufficientMempoolFees verifies that the given transaction has supplied enough fees(gas + stability) 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, acc Account, genesis bool) []byte

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

func NewAnteHandler

func NewAnteHandler(ak AccountKeeper, supplyKeeper types.SupplyKeeper,
	treasuryKeeper TreasuryKeeper, sigGasConsumer SignatureVerificationGasConsumer) sdk.AnteHandler

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

func ProcessPubKey

func ProcessPubKey(acc Account, sig StdSignature, simulate bool) (crypto.PubKey, 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 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 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 = auth.Account

func GetSignerAcc

func GetSignerAcc(ctx sdk.Context, ak AccountKeeper, addr sdk.AccAddress) (Account, sdk.Result)

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

type AccountKeeper

type AccountKeeper = auth.AccountKeeper

type AppModule

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

AppModule implements an application module for the auth module.

func NewAppModule

func NewAppModule(accountKeeper AccountKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx sdk.Context, rbb abci.RequestBeginBlock)

BeginBlock returns the begin blocker for the auth module.

func (AppModule) EndBlock

func (am AppModule) EndBlock(ctx sdk.Context, rbb abci.RequestEndBlock) []abci.ValidatorUpdate

EndBlock returns the end blocker for the auth module.

func (AppModule) ExportGenesis

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

ExportGenesis returns the exported genesis state as raw bytes for the auth module.

func (AppModule) InitGenesis

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

InitGenesis performs genesis initialization for the auth module.

func (AppModule) Name

func (am AppModule) Name() string

Name returns the auth module's name.

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler returns an sdk.Handler for the auth module.

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns the auth module sdk.Querier.

func (AppModule) QuerierRoute

func (am AppModule) QuerierRoute() string

QuerierRoute returns the auth module's querier route name.

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

RegisterInvariants registers the auth module invariants.

func (AppModule) Route

func (am AppModule) Route() string

Route returns the message routing key for the auth module.

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic defines the basic application module used by the auth module.

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis returns default genesis state as raw bytes for the auth module.

func (AppModuleBasic) GetQueryCmd

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

GetQueryCmd returns the root query command for the auth module.

func (AppModuleBasic) GetTxCmd

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

GetTxCmd returns the root tx command for the auth module.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns the auth module's name

func (AppModuleBasic) RegisterCodec

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

RegisterCodec registers the auth module's types for the given codec.

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(cliCtx context.CLIContext, route *mux.Router)

RegisterRESTRoutes registers the REST routes for the auth module.

func (AppModuleBasic) ValidateGenesis

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

ValidateGenesis performs genesis state validation for the auth module.

type BaseAccount

type BaseAccount = auth.BaseAccount

type BaseLazyGradedVestingAccount

type BaseLazyGradedVestingAccount = types.BaseLazyGradedVestingAccount

type BaseVestingAccount

type BaseVestingAccount = auth.BaseVestingAccount

type ContinuousVestingAccount

type ContinuousVestingAccount = auth.ContinuousVestingAccount

type CosmosAppModule

type CosmosAppModule = auth.AppModule

type CosmosAppModuleBasic

type CosmosAppModuleBasic = auth.AppModuleBasic

type DelayedVestingAccount

type DelayedVestingAccount = auth.DelayedVestingAccount

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.Context, moduleName string) supply.ModuleAccountI

GetModuleAccount for dummy supply keeper

func (DummySupplyKeeper) GetModuleAddress

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

GetModuleAddress for dummy supply keeper

func (DummySupplyKeeper) SendCoinsFromAccountToModule

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

SendCoinsFromAccountToModule for the dummy supply keeper

type DummyTreasuryKeeper

type DummyTreasuryKeeper struct{}

DummyTreasuryKeeper no-lint

func NewDummyTreasuryKeeper

func NewDummyTreasuryKeeper() DummyTreasuryKeeper

NewDummyTreasuryKeeper no-lint

func (DummyTreasuryKeeper) GetTaxCap

func (tk DummyTreasuryKeeper) GetTaxCap(_ sdk.Context, _ string) (taxCap sdk.Int)

GetTaxCap for the dummy treasury keeper

func (DummyTreasuryKeeper) GetTaxRate

func (tk DummyTreasuryKeeper) GetTaxRate(_ sdk.Context) (rate sdk.Dec)

GetTaxRate for the dummy treasury keeper

func (DummyTreasuryKeeper) RecordEpochTaxProceeds

func (tk DummyTreasuryKeeper) RecordEpochTaxProceeds(_ sdk.Context, _ sdk.Coins)

RecordEpochTaxProceeds for the dummy treasury keeper

type GenesisState

type GenesisState = auth.GenesisState

type LazyGradedVestingAccount

type LazyGradedVestingAccount = types.LazyGradedVestingAccount

type LazySchedule

type LazySchedule = types.LazySchedule

type Params

type Params = auth.Params

type QueryAccountParams

type QueryAccountParams = auth.QueryAccountParams

type SignatureVerificationGasConsumer

type SignatureVerificationGasConsumer = func(meter sdk.GasMeter, sig []byte, pubkey crypto.PubKey, params Params) 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 StdFee

type StdFee = auth.StdFee

type StdSignDoc

type StdSignDoc = auth.StdSignDoc

type StdSignMsg

type StdSignMsg = auth.StdSignMsg

type StdSignature

type StdSignature = auth.StdSignature

type StdTx

type StdTx = auth.StdTx

type SupplyKeeper

type SupplyKeeper = types.SupplyKeeper

type TreasuryKeeper

type TreasuryKeeper = types.TreasuryKeeper

type TxBuilder

type TxBuilder = auth.TxBuilder

type VestingAccount

type VestingAccount = auth.VestingAccount

type VestingSchedule

type VestingSchedule = types.VestingSchedule

Directories

Path Synopsis
client
cli
internal

Jump to

Keyboard shortcuts

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