keeper

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendSignerIfNeed added in v0.2.7

func AppendSignerIfNeed(signers []v1.Signer, controller string, msg *v1.MsgUpdateDidPayload) []v1.Signer

func FindPublicKey added in v0.2.7

func FindPublicKey(signer v1.Signer, id string) (ed25519.PublicKey, error)

func FindVerificationMethod

func FindVerificationMethod(vms []*v1.VerificationMethod, id string) *v1.VerificationMethod

func GetDidIDBytes

func GetDidIDBytes(id string) []byte

GetDidIDBytes returns the byte representation of the ID

func NewMsgSercheqdpl added in v0.1.19

func NewMsgSercheqdpl(keeper Keeper) v1.MsgServer

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

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

func VerifyIdentitySignature added in v0.2.7

func VerifyIdentitySignature(signer v1.Signer, signatures []*v1.SignInfo, signingInput []byte) (bool, error)

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.Codec, storeKey sdk.StoreKey) *Keeper

func (Keeper) AppendDid

func (k Keeper) AppendDid(ctx sdk.Context, did v1.Did, metadata *v1.Metadata) (*string, error)

AppendDid appends a did in the store with a new id and updates the count

func (Keeper) Did

func (k Keeper) Did(c context.Context, req *v1.QueryGetDidRequest) (*v1.QueryGetDidResponse, error)

func (Keeper) EnsureDidIsNotUsed added in v0.2.7

func (k Keeper) EnsureDidIsNotUsed(ctx sdk.Context, did string) error

func (Keeper) GetAllDid

func (k Keeper) GetAllDid(ctx sdk.Context) (list []v1.StateValue)

GetAllDid returns all did

func (Keeper) GetDid

func (k Keeper) GetDid(ctx *sdk.Context, id string) (*v1.StateValue, error)

GetDid returns a did from its id

func (Keeper) GetDidCount

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

GetDidCount get the total number of did

func (Keeper) GetDidNamespace

func (k Keeper) GetDidNamespace(ctx sdk.Context) string

GetDidNamespace get the total number of did

func (*Keeper) GetDidPrefix added in v0.2.7

func (k *Keeper) GetDidPrefix(ctx sdk.Context) string

func (Keeper) HasDid

func (k Keeper) HasDid(ctx sdk.Context, id string) bool

HasDid checks if the did exists in the store

func (Keeper) IsDidUsed added in v0.2.7

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

IsDidUsed checks if the did is used by DIDDoc

func (Keeper) Logger

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

func (Keeper) SetDid

func (k Keeper) SetDid(ctx sdk.Context, did v1.Did, metadata *v1.Metadata) error

SetDid set a specific did in the store

func (Keeper) SetDidCount

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

SetDidCount set the total number of did

func (Keeper) SetDidNamespace

func (k Keeper) SetDidNamespace(ctx sdk.Context, namespace string)

SetDidNamespace set did namespace

func (*Keeper) ValidateController added in v0.2.7

func (k *Keeper) ValidateController(ctx *sdk.Context, id string, controller string) error

func (*Keeper) VerifySignature added in v0.2.7

func (k *Keeper) VerifySignature(ctx *sdk.Context, msg v1.IdentityMsg, signers []v1.Signer, signatures []*v1.SignInfo) error

Jump to

Keyboard shortcuts

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