keeper

package
v25.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const FirstAuthenticatorId = 1

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	CircuitBreakerGovernor sdk.AccAddress

	AuthenticatorManager *authenticator.AuthenticatorManager
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	StoreKey storetypes.StoreKey,
	govModuleAddr sdk.AccAddress,
	ps paramtypes.Subspace,
	authenticatorManager *authenticator.AuthenticatorManager,
) Keeper

func (Keeper) AddAuthenticator

func (k Keeper) AddAuthenticator(ctx sdk.Context, account sdk.AccAddress, authenticatorType string, config []byte) (uint64, error)

AddAuthenticator adds an authenticator to an account, this function is used to add multiple authenticators such as SignatureVerifications and AllOfs

func (Keeper) AddAuthenticatorWithId

func (k Keeper) AddAuthenticatorWithId(ctx sdk.Context, account sdk.AccAddress, authenticatorType string, config []byte, id uint64) error

AddAuthenticatorWithId adds an authenticator to an account, this function is used in genesis import

func (Keeper) GetAllAuthenticatorData

func (k Keeper) GetAllAuthenticatorData(ctx sdk.Context) ([]types.AuthenticatorData, error)

GetAllAuthenticatorData is used in genesis export to export all the authenticator for all accounts

func (Keeper) GetAuthenticator

func (k Keeper) GetAuthenticator(
	ctx context.Context,
	request *types.GetAuthenticatorRequest,
) (*types.GetAuthenticatorResponse, error)

func (Keeper) GetAuthenticatorDataForAccount

func (k Keeper) GetAuthenticatorDataForAccount(
	ctx sdk.Context,
	account sdk.AccAddress,
) ([]*types.AccountAuthenticator, error)

GetAuthenticatorDataForAccount gets all authenticators AccAddressFromBech32 with an account from the store, the data is prefixed by 2|<accAddr|

func (Keeper) GetAuthenticatorExtension

func (k Keeper) GetAuthenticatorExtension(exts []*codectypes.Any) types.AuthenticatorTxOptions

GetAuthenticatorExtension unpacks the extension for the transaction, this is used with transactions specify an authenticator to use

func (Keeper) GetAuthenticators

func (k Keeper) GetAuthenticators(
	ctx context.Context,
	request *types.GetAuthenticatorsRequest,
) (*types.GetAuthenticatorsResponse, error)

func (Keeper) GetInitializedAuthenticatorForAccount

func (k Keeper) GetInitializedAuthenticatorForAccount(
	ctx sdk.Context,
	account sdk.AccAddress,
	selectedAuthenticator int,
) (authenticator.InitializedAuthenticator, error)

GetSelectedAuthenticatorForAccountFromStore returns a single authenticator for the account this function relies in GetAuthenticationDataForAccount, this function calls Initialise on the specific authenticator

func (*Keeper) GetIsSmartAccountActive

func (k *Keeper) GetIsSmartAccountActive(ctx sdk.Context) bool

GetIsSmartAccountActive returns the value of the isSmartAccountActive parameter. If the value has not been set, it will return false. If there is an error unmarshalling the value, it will return false.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams get all parameters as types.Params

func (Keeper) GetSelectedAuthenticatorData

func (k Keeper) GetSelectedAuthenticatorData(
	ctx sdk.Context,
	account sdk.AccAddress,
	selectedAuthenticator int,
) (*types.AccountAuthenticator, error)

GetSelectedAuthenticatorDataForAccount gets all authenticators from an account from the store, the data is prefixed by 2|<accAddr|<keyId>

func (Keeper) InitializeOrGetNextAuthenticatorId added in v25.0.3

func (k Keeper) InitializeOrGetNextAuthenticatorId(ctx sdk.Context) uint64

InitializeOrGetNextAuthenticatorId returns the next authenticator id. If it is not set, it initializes it to 1.

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) Params

func (Keeper) RemoveAuthenticator

func (k Keeper) RemoveAuthenticator(ctx sdk.Context, account sdk.AccAddress, authenticatorId uint64) error

RemoveAuthenticator removes an authenticator from an account

func (Keeper) SetActiveState

func (k Keeper) SetActiveState(ctx sdk.Context, active bool)

func (Keeper) SetNextAuthenticatorId

func (k Keeper) SetNextAuthenticatorId(ctx sdk.Context, authenticatorId uint64)

SetNextAuthenticatorId sets next authenticator id.

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

Jump to

Keyboard shortcuts

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