Documentation ¶
Index ¶
- Constants
- func GetClaimableWalletIDBytes(id uint64) []byte
- func GetClaimableWalletIDFromBytes(bz []byte) uint64
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AppendClaimableWallet(ctx sdk.Context, claimableWallet types.ClaimableWallet) uint64
- func (k Keeper) AssignVault(ctx sdk.Context, ucwId uint64, cred *servicetypes.WebauthnCredential) ([]types.Account, error)
- func (k Keeper) ClaimableWallet(goCtx context.Context, req *types.QueryGetClaimableWalletRequest) (*types.QueryGetClaimableWalletResponse, error)
- func (k Keeper) ClaimableWalletAll(goCtx context.Context, req *types.QueryAllClaimableWalletRequest) (*types.QueryAllClaimableWalletResponse, error)
- func (k Keeper) GetAccount(accDid string) (types.Account, error)
- func (k Keeper) GetAccountInfo(accDid string) (*types.AccountInfo, error)
- func (k Keeper) GetAllClaimableWallet(ctx sdk.Context) (list []types.ClaimableWallet)
- func (k Keeper) GetClaimableWallet(ctx sdk.Context, id uint64) (val types.ClaimableWallet, found bool)
- func (k Keeper) GetClaimableWalletCount(ctx sdk.Context) uint64
- func (k Keeper) GetKeyshare(keyDid string) (types.KeyShare, error)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) InsertAccount(acc types.Account) error
- func (k Keeper) InsertKeyshare(ks types.KeyShare) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) NextUnclaimedWallet(ctx sdk.Context) (*types.ClaimableWallet, protocol.URLEncodedBase64, error)
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ReadInbox(accDid string) ([]*types.WalletMail, error)
- func (k Keeper) ReadWalletMail(goCtx context.Context, req *types.ReadWalletMailRequest) (*types.ReadWalletMailResponse, error)
- func (k Keeper) RemoveClaimableWallet(ctx sdk.Context, id uint64)
- func (k Keeper) SendWalletMail(goCtx context.Context, req *types.SendWalletMailRequest) (*types.SendWalletMailResponse, error)
- func (k Keeper) SetClaimableWallet(ctx sdk.Context, claimableWallet types.ClaimableWallet)
- func (k Keeper) SetClaimableWalletCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) WriteInbox(toDid string, msg *types.WalletMail) error
Constants ¶
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
GetClaimableWalletIDBytes returns the byte representation of the ID
func GetClaimableWalletIDFromBytes ¶ added in v0.6.27
GetClaimableWalletIDFromBytes returns ID in uint64 format from a byte array
func NewMsgServerImpl ¶
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 (k Keeper) ClaimableWallet(goCtx context.Context, req *types.QueryGetClaimableWalletRequest) (*types.QueryGetClaimableWalletResponse, error)
func (Keeper) ClaimableWalletAll ¶ added in v0.6.27
func (k Keeper) ClaimableWalletAll(goCtx context.Context, req *types.QueryAllClaimableWalletRequest) (*types.QueryAllClaimableWalletResponse, error)
func (Keeper) GetAccount ¶
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
GetClaimableWalletCount get the total number of claimableWallet
func (Keeper) GetKeyshare ¶
The function retrieves a keyshare from a vault based on a given key DID.
func (Keeper) InsertAccount ¶
The function inserts an account and its associated key shares into a vault.
func (Keeper) InsertKeyshare ¶
The function inserts a keyshare into a table and returns an error if there is one.
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 (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
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) ReadWalletMail(goCtx context.Context, req *types.ReadWalletMailRequest) (*types.ReadWalletMailResponse, error)
`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
RemoveClaimableWallet removes a claimableWallet from the store
func (Keeper) SendWalletMail ¶ added in v0.6.27
func (k Keeper) SendWalletMail(goCtx context.Context, req *types.SendWalletMailRequest) (*types.SendWalletMailResponse, error)
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
SetClaimableWalletCount set the total number of claimableWallet
func (Keeper) WriteInbox ¶
func (k Keeper) WriteInbox(toDid string, msg *types.WalletMail) error
WriteInbox writes a message to the inbox for the account