keeper

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

Types

type Keeper

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

func NewKeeper

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

func (Keeper) Delete

func (k Keeper) Delete(
	ctx sdk.Context,
	key []byte,
	prefix []byte,
)

Delete - deletes a value form the store

func (Keeper) DidDocument

DidDocument implements the DidDocument gRPC method

func (Keeper) DidDocuments

DidDocuments implements the DidDocuments gRPC method

func (Keeper) Get

func (k Keeper) Get(
	ctx sdk.Context,
	key []byte,
	prefix []byte,
	unmarshal UnmarshalFn,
) (i interface{}, found bool)

Get gets an item from the store by bytes

func (Keeper) GetAll

func (k Keeper) GetAll(
	ctx sdk.Context,
	prefix []byte,
) sdk.Iterator

GetAll values from with a prefix from the store

func (Keeper) GetAllDidDocuments

func (k Keeper) GetAllDidDocuments(ctx sdk.Context) []types.DidDocument

GetAllDidDocuments returns all the DidDocuments

func (Keeper) GetAllDidDocumentsWithCondition

func (k Keeper) GetAllDidDocumentsWithCondition(
	ctx sdk.Context,
	key []byte,
	didSelector func(did types.DidDocument) bool,
) (didDocs []types.DidDocument)

GetAllDidDocumentsWithCondition retrieve a list of did document by some arbitrary criteria. The selector filter has access to both the did and its metadata

func (Keeper) GetDidDocument

func (k Keeper) GetDidDocument(ctx sdk.Context, key []byte) (types.DidDocument, bool)

func (Keeper) GetDidDocumentsByPubKey

func (k Keeper) GetDidDocumentsByPubKey(ctx sdk.Context, pubkey cryptotypes.PubKey) (dids []types.DidDocument)

GetDidDocumentsByPubKey retrieve a did document using a pubkey associated to the DID TODO: this function is used only in the issuer module ante handler !

func (Keeper) GetDidMetadata

func (k Keeper) GetDidMetadata(ctx sdk.Context, key []byte) (types.DidMetadata, bool)

func (Keeper) Logger

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

func (Keeper) Marshal

func (k Keeper) Marshal(value interface{}) (bytes []byte)

func (Keeper) ResolveDid

func (k Keeper) ResolveDid(ctx sdk.Context, did types.DID) (doc types.DidDocument, meta types.DidMetadata, err error)

ResolveDid returning the did document and associated metadata

func (Keeper) Set

func (k Keeper) Set(ctx sdk.Context,
	key []byte,
	prefix []byte,
	i interface{},
	marshal MarshalFn,
)

Set sets a value in the db with a prefixed key

func (Keeper) SetDidDocument

func (k Keeper) SetDidDocument(ctx sdk.Context, key []byte, document types.DidDocument)

func (Keeper) SetDidMetadata

func (k Keeper) SetDidMetadata(ctx sdk.Context, key []byte, meta types.DidMetadata)

func (Keeper) Unmarshal

func (k Keeper) Unmarshal(data []byte, val codec.ProtoMarshaler) bool

Unmarshal unmarshal a byte slice to a struct, return false in case of errors

func (Keeper) UnmarshalDidDocument

func (k Keeper) UnmarshalDidDocument(value []byte) (interface{}, bool)

UnmarshalDidDocument unmarshall a did document= and check if it is empty ad DID document is empty if contains no context

func (Keeper) UnmarshalDidMetadata

func (k Keeper) UnmarshalDidMetadata(value []byte) (interface{}, bool)

type MarshalFn

type MarshalFn func(value interface{}) []byte

MarshalFn is a generic function to marshal bytes

type UnmarshalFn

type UnmarshalFn func(value []byte) (interface{}, bool)

UnmarshalFn is a generic function to unmarshal bytes

type VerificationRelationships

type VerificationRelationships []string

VerificationRelationships for did document manipulation

Jump to

Keyboard shortcuts

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