keeper

package
v0.6.28-beta.14 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ChallengeLength = 32

! ||--------------------------------------------------------------------------------|| ! || Helper Utility Functions || ! ||--------------------------------------------------------------------------------|| ChallengeLength - Length of bytes to generate for a challenge.¡¡

Variables

This section is empty.

Functions

func GetClaimableWalletIDBytes added in v0.6.27

func GetClaimableWalletIDBytes(id uint64) []byte

GetClaimableWalletIDBytes returns the byte representation of the ID

func GetClaimableWalletIDFromBytes added in v0.6.27

func GetClaimableWalletIDFromBytes(bz []byte) uint64

GetClaimableWalletIDFromBytes returns ID in uint64 format from a byte array

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 {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,

) *Keeper

func (Keeper) AppendClaimableWallet added in v0.6.27

func (k Keeper) AppendClaimableWallet(
	ctx sdk.Context,
	claimableWallet types.ClaimableWallet,
) uint64

AppendClaimableWallet appends a claimableWallet in the store with a new id and update the count

func (Keeper) AssignVault added in v0.6.27

func (k Keeper) AssignVault(ctx sdk.Context, ucwId uint64, cred *servicetypes.WebauthnCredential) ([]types.Account, error)

AssignIdentity verifies that a credential is valid and assigns an Unclaimed Wallet to the credential's owner. This creates the initial DID document for the user, containing authentication and capability delegation relationships.

func (Keeper) ClaimableWallet added in v0.6.27

func (Keeper) ClaimableWalletAll added in v0.6.27

func (Keeper) GetAccount

func (k Keeper) GetAccount(accDid string) (types.Account, error)

The function retrieves an account from a key store table using the account's DID and returns it as a model.

func (Keeper) GetAccountInfo added in v0.6.28

func (k Keeper) GetAccountInfo(accDid string) (*types.AccountInfo, error)

GetAccountInfo returns the account info for the given account DID

func (Keeper) GetAllClaimableWallet added in v0.6.27

func (k Keeper) GetAllClaimableWallet(ctx sdk.Context) (list []types.ClaimableWallet)

GetAllClaimableWallet returns all claimableWallet

func (Keeper) GetClaimableWallet added in v0.6.27

func (k Keeper) GetClaimableWallet(ctx sdk.Context, id uint64) (val types.ClaimableWallet, found bool)

GetClaimableWallet returns a claimableWallet from its id

func (Keeper) GetClaimableWalletCount added in v0.6.27

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

GetClaimableWalletCount get the total number of claimableWallet

func (Keeper) GetKeyshare

func (k Keeper) GetKeyshare(keyDid string) (types.KeyShare, error)

The function retrieves a keyshare from a vault based on a given key DID.

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) InsertAccount

func (k Keeper) InsertAccount(acc types.Account) error

The function inserts an account and its associated key shares into a vault.

func (Keeper) InsertKeyshare

func (k Keeper) InsertKeyshare(ks types.KeyShare) error

The function inserts a keyshare into a table and returns an error if there is one.

func (Keeper) Logger

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

func (Keeper) NextUnclaimedWallet added in v0.6.27

func (k Keeper) NextUnclaimedWallet(ctx sdk.Context) (*types.ClaimableWallet, protocol.URLEncodedBase64, error)

NextUnclaimedWallet returns the next unclaimed wallet and its challenge. If no unclaimed wallets exist, an error is

func (Keeper) Params

func (Keeper) ReadInbox

func (k Keeper) ReadInbox(accDid string) ([]*types.WalletMail, error)

ReadInbox reads the inbox for the account

func (Keeper) ReadWalletMail added in v0.6.27

`func (k Keeper) ReadWalletMails(goCtx context.Context, req *types.ReadWalletMailsRequest) (*types.ReadWalletMailsResponse, error)` is a function in the `keeper` package that reads all the inbox messages of a specified recipient. It takes in a context and a `ReadWalletMailsRequest` object as input, and returns a `ReadWalletMailsResponse` object and an error (if any) as output. The function reads the messages from the recipient's inbox using the `ReadInbox` function of the `Keeper` struct, and returns a response with all the messages in the inbox.

func (Keeper) RemoveClaimableWallet added in v0.6.27

func (k Keeper) RemoveClaimableWallet(ctx sdk.Context, id uint64)

RemoveClaimableWallet removes a claimableWallet from the store

func (Keeper) SendWalletMail added in v0.6.27

This is a function in the `keeper` package that sends an inbox message to a specified recipient. It takes in a context and a `SendWalletMailRequest` object as input, and returns a `SendWalletMailResponse` object and an error (if any) as output. The function writes the message to the recipient's inbox using the `WriteInbox` function of the `Keeper` struct, and returns a success response with a message ID.

func (Keeper) SetClaimableWallet added in v0.6.27

func (k Keeper) SetClaimableWallet(ctx sdk.Context, claimableWallet types.ClaimableWallet)

SetClaimableWallet set a specific claimableWallet in the store

func (Keeper) SetClaimableWalletCount added in v0.6.27

func (k Keeper) SetClaimableWalletCount(ctx sdk.Context, count uint64)

SetClaimableWalletCount set the total number of claimableWallet

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) WriteInbox

func (k Keeper) WriteInbox(toDid string, msg *types.WalletMail) error

WriteInbox writes a message to the inbox for the account

Jump to

Keyboard shortcuts

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