keeper

package
v0.6.28-beta.8 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: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClaimableWalletIDBytes added in v0.6.19

func GetClaimableWalletIDBytes(id uint64) []byte

GetClaimableWalletIDBytes returns the byte representation of the ID

func GetClaimableWalletIDFromBytes added in v0.6.19

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,

	accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, groupKeeper types.GroupKeeper,
	vaultKeeper types.VaultKeeper,
	authenticator gateway.Authenticator,
) *Keeper

func (Keeper) AliasAvailable added in v0.6.10

func (Keeper) AppendClaimableWallet added in v0.6.19

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) AssignIdentity added in v0.6.26

func (k Keeper) AssignIdentity(credential *identity.VerificationMethod, primary vault.Account, alias string, accounts ...vault.Account) (*identity.DIDDocument, error)

AssignIdentity creates a new DIDDocument from a given credential verification relationship, account interface, and alias. It then broadcasts the DIDDocument to the network

func (Keeper) CheckAlsoKnownAs added in v0.6.26

func (k Keeper) CheckAlsoKnownAs(ctx sdk.Context, alias string) error

CheckAlsoKnownAs checks if an alias is already used

func (Keeper) CreateAccountForIdentity added in v0.6.26

func (k Keeper) CreateAccountForIdentity(ctx sdk.Context, identity_did string, account_name string, coinType crypto.CoinType) (*identity.DIDDocument, *vault.AccountInfo, error)

CreateAccountForIdentity creates a new account for the given identity

func (Keeper) CreateWallet added in v0.6.27

func (Keeper) DidAll

func (Keeper) DidAllBtc added in v0.6.27

func (Keeper) DidAllEth added in v0.6.27

func (Keeper) DidByAlsoKnownAs added in v0.4.0

func (Keeper) DidByOwner added in v0.6.16

func (Keeper) GetAllAssertion added in v0.6.26

func (k Keeper) GetAllAssertion(ctx sdk.Context) (list []types.VerificationRelationship)

GetAllAssertion returns all Relationship

func (Keeper) GetAllAuthentication added in v0.6.26

func (k Keeper) GetAllAuthentication(ctx sdk.Context) (list []types.VerificationRelationship)

GetAllAuthentication returns all Relationship

func (Keeper) GetAllCapabilityDelegations added in v0.6.26

func (k Keeper) GetAllCapabilityDelegations(ctx sdk.Context) (list []types.VerificationRelationship)

GetAllCapabilityDelegations returns all capability delegation relationships

func (Keeper) GetAllCapabilityInvocations added in v0.6.26

func (k Keeper) GetAllCapabilityInvocations(ctx sdk.Context) (list []types.VerificationRelationship)

GetAllCapabilityInvocations returns all capability invocation relationships

func (Keeper) GetAllClaimableWallet added in v0.6.19

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

GetAllClaimableWallet returns all claimableWallet

func (Keeper) GetAllIdentities added in v0.6.26

func (k Keeper) GetAllIdentities(ctx sdk.Context) (list []types.Identification)

GetAllDidDocument returns all didDocument

func (Keeper) GetAllKeyAgreements added in v0.6.26

func (k Keeper) GetAllKeyAgreements(ctx sdk.Context) (list []types.VerificationRelationship)

GetAllKeyAgreements returns all key agreement relationships

func (Keeper) GetAssertion added in v0.6.26

func (k Keeper) GetAssertion(ctx sdk.Context, reference string) (val types.VerificationRelationship, found bool)

GetAssertion returns a Service from its index

func (Keeper) GetAuthentication added in v0.6.26

func (k Keeper) GetAuthentication(ctx sdk.Context, reference string) (val types.VerificationRelationship, found bool)

GetAuthentication returns a Service from its index

func (Keeper) GetCapabilityDelegation added in v0.6.26

func (k Keeper) GetCapabilityDelegation(ctx sdk.Context, reference string) (delegation types.VerificationRelationship, found bool)

GetCapabilityDelegation returns a capability delegation relationship from its reference

func (Keeper) GetCapabilityInvocation added in v0.6.26

func (k Keeper) GetCapabilityInvocation(ctx sdk.Context, reference string) (invocation types.VerificationRelationship, found bool)

GetCapabilityInvocation returns a capability invocation relationship from its reference

func (Keeper) GetClaimableWallet added in v0.6.19

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.19

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

GetClaimableWalletCount get the total number of claimableWallet

func (Keeper) GetIdentity added in v0.6.26

func (k Keeper) GetIdentity(ctx sdk.Context, did string) (val types.Identification, found bool)

GetIdentity returns the identity from the store

func (Keeper) GetIdentityByPrimaryAlias added in v0.6.26

func (k Keeper) GetIdentityByPrimaryAlias(
	ctx sdk.Context,
	alias string,
) (val types.Identification, found bool)

GetDidDocumentByAlsoKnownAs returns a didDocument from its index

func (Keeper) GetKeyAgreement added in v0.6.26

func (k Keeper) GetKeyAgreement(ctx sdk.Context, reference string) (agreement types.VerificationRelationship, found bool)

GetKeyAgreement returns a key agreement relationship from its reference

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetWallet added in v0.6.27

GetWallet returns an individual account for the given identity by resolving all capability invocations

func (Keeper) HasAssertion added in v0.6.26

func (k Keeper) HasAssertion(ctx sdk.Context, reference string) bool

! ||--------------------------------------------------------------------------------|| ! || Relationships - Assertion Keeper Functions || ! ||--------------------------------------------------------------------------------|| HasAssertion checks if the element exists in the store

func (Keeper) HasAuthentication added in v0.6.26

func (k Keeper) HasAuthentication(ctx sdk.Context, reference string) bool

! ||--------------------------------------------------------------------------------|| ! || Relationships - Authentication Keeper Functions || ! ||-------------------------------------------------------------------------------- || HasAuthentication checks if the element exists in the store

func (Keeper) HasCapabilityDelegation added in v0.6.26

func (k Keeper) HasCapabilityDelegation(ctx sdk.Context, reference string) bool

HasCapabilityDelegation checks if the capability delegation relationship exists in the store

func (Keeper) HasCapabilityInvocation added in v0.6.26

func (k Keeper) HasCapabilityInvocation(ctx sdk.Context, reference string) bool

HasCapabilityInvocation checks if the capability invocation relationship exists in the store

func (Keeper) HasIdentity added in v0.6.26

func (k Keeper) HasIdentity(ctx sdk.Context, did string) bool

HasIdentity checks if an identity exists in the store across all did methods

func (Keeper) HasKeyAgreement added in v0.6.26

func (k Keeper) HasKeyAgreement(ctx sdk.Context, reference string) bool

! ||--------------------------------------------------------------------------------|| ! || Relationships - Key Agreement Keeper Functions || ! ||--------------------------------------------------------------------------------|| HasKeyAgreement checks if the key agreement relationship exists in the store

func (Keeper) ListAccountsForIdentity added in v0.6.26

func (k Keeper) ListAccountsForIdentity(ctx sdk.Context, identity_did string) (*identity.DIDDocument, []*vault.AccountInfo, error)

ListAccountsForIdentity lists all accounts for the given identity by resolving all capability invocations

func (Keeper) ListWallets added in v0.6.27

ListWalllets lists all accounts for the given identity by resolving all capability invocations

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) RegisterIdentity added in v0.6.26

RegisterIdentity registers a new identity with the provided Identity and Verification Relationships. Fails if not at least one Authentication relationship is provided.

func (Keeper) RemoveClaimableWallet added in v0.6.19

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

RemoveClaimableWallet removes a claimableWallet from the store

func (Keeper) ResolveIdentity added in v0.6.26

func (k Keeper) ResolveIdentity(ctx sdk.Context, did string) (val types.DIDDocument, err error)

ResolveIdentity resolves a DID to a DIDDocument and returns it

func (Keeper) ResolveIdentityByPrimaryAlias added in v0.6.27

func (k Keeper) ResolveIdentityByPrimaryAlias(ctx sdk.Context, alias string) (val types.DIDDocument, err error)

ResolveIdentityByPrimaryAlias resolves a DID to a DIDDocument and returns it based off its primary alias Identification

func (Keeper) SetAssertion added in v0.6.26

func (k Keeper) SetAssertion(ctx sdk.Context, VerificationRelationship types.VerificationRelationship)

SetAssertion set a specific Service in the store from its index

func (Keeper) SetAuthentication added in v0.6.26

func (k Keeper) SetAuthentication(ctx sdk.Context, VerificationRelationship types.VerificationRelationship)

SetAuthentication set a specific Service in the store from its index

func (Keeper) SetCapabilityDelegation added in v0.6.26

func (k Keeper) SetCapabilityDelegation(ctx sdk.Context, delegation types.VerificationRelationship)

SetCapabilityDelegation sets a specific capability delegation relationship in the store from its reference

func (Keeper) SetCapabilityInvocation added in v0.6.26

func (k Keeper) SetCapabilityInvocation(ctx sdk.Context, invocation types.VerificationRelationship)

SetCapabilityInvocation sets a specific capability invocation relationship in the store from its reference

func (Keeper) SetClaimableWallet added in v0.6.19

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.19

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

SetClaimableWalletCount set the total number of claimableWallet

func (Keeper) SetIdentity added in v0.6.26

func (k Keeper) SetIdentity(ctx sdk.Context, identity types.Identification) error

SetIdentity checks the validity of the identity and set it in the store based off its did method

func (Keeper) SetKeyAgreement added in v0.6.26

func (k Keeper) SetKeyAgreement(ctx sdk.Context, agreement types.VerificationRelationship)

SetKeyAgreement sets a specific key agreement relationship in the store from its reference

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SignWallet added in v0.6.27

SignWallet signs a message with the given account

func (Keeper) SignWithIdentity added in v0.6.26

func (k Keeper) SignWithIdentity(ctx sdk.Context, identity_did string, account_did string, message []byte) (*identity.DIDDocument, []byte, error)

SignWithIdentity signs the given message with the given identity and an account did

func (Keeper) VerifyWallet added in v0.6.27

VerifyWallet verifies a signature with the given account

func (Keeper) VerifyWithIdentity added in v0.6.26

func (k Keeper) VerifyWithIdentity(ctx sdk.Context, identity_did string, account_did string, message []byte, sig []byte) (*identity.DIDDocument, bool, *vault.AccountInfo, error)

VerifyWithIdentity signs the given message with the given identity and an account did

Jump to

Keyboard shortcuts

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