keeper

package
v1.0.0-develop.8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const UpdatedPostfix string = "-updated"

Variables

This section is empty.

Functions

func DuplicateSignatures

func DuplicateSignatures(signatures []*types.SignInfo, didToDuplicate string, newDid string) []*types.SignInfo

func FindDidDoc

func FindDidDoc(k *Keeper, ctx *sdk.Context, inMemoryDIDs map[string]types.DidDocWithMetadata, did string) (res types.DidDocWithMetadata, found bool, err error)

func FindVerificationMethod

func FindVerificationMethod(k *Keeper, ctx *sdk.Context, inMemoryDIDs map[string]types.DidDocWithMetadata, didUrl string) (res types.VerificationMethod, found bool, err error)

func GetSignerDIDsForDIDCreation

func GetSignerDIDsForDIDCreation(did types.DidDoc) []string

func GetSignerDIDsForDIDUpdate

func GetSignerDIDsForDIDUpdate(existingDidDoc types.DidDoc, updatedDidDoc types.DidDoc) []string

func GetSignerIdForErrorMessage

func GetSignerIdForErrorMessage(signerId string, existingVersionId string, updatedVersionId string) interface{}

func MustFindDidDoc

func MustFindDidDoc(k *Keeper, ctx *sdk.Context, inMemoryDIDDocs map[string]types.DidDocWithMetadata, did string) (res types.DidDocWithMetadata, err error)

func MustFindVerificationMethod

func MustFindVerificationMethod(k *Keeper, ctx *sdk.Context, inMemoryDIDs map[string]types.DidDocWithMetadata, didUrl string) (res types.VerificationMethod, err error)

func NewHandler

func NewHandler(k Keeper) sdk.Handler

func NewMsgServer

func NewMsgServer(keeper Keeper) types.MsgServer

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

func NewQuerier

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

func NewQueryServer

func NewQueryServer(keeper Keeper) types.QueryServer

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

func VerifyAllSignersHaveAllValidSignatures

func VerifyAllSignersHaveAllValidSignatures(k *Keeper, ctx *sdk.Context, inMemoryDIDs map[string]types.DidDocWithMetadata, message []byte, signers []string, signatures []*types.SignInfo) error

func VerifyAllSignersHaveAtLeastOneValidSignature

func VerifyAllSignersHaveAtLeastOneValidSignature(k *Keeper, ctx *sdk.Context, inMemoryDIDs map[string]types.DidDocWithMetadata,
	message []byte, signers []string, signatures []*types.SignInfo, DIDToBeUpdated string, updatedDID string,
) error

VerifyAllSignersHaveAtLeastOneValidSignature verifies that all signers have at least one valid signature. Omit DIDtoBeUpdated and updatedDID if not updating a DID. Otherwise those values will be used to better format error messages.

func VerifySignature

func VerifySignature(k *Keeper, ctx *sdk.Context, inMemoryDIDs map[string]types.DidDocWithMetadata, message []byte, signature types.SignInfo) error

Types

type Keeper

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

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey) *Keeper

func (Keeper) GetAllDidDocs

func (k Keeper) GetAllDidDocs(ctx *sdk.Context) (list []types.DidDocWithMetadata)

GetAllDidDocs returns all did Loads all DIDs in memory. Use only for genesis export.

func (Keeper) GetDidDoc

func (k Keeper) GetDidDoc(ctx *sdk.Context, id string) (types.DidDocWithMetadata, error)

GetDid returns a did from its id

func (Keeper) GetDidDocCount

func (k Keeper) GetDidDocCount(ctx *sdk.Context) uint64

GetDidCount get the total number of did

func (Keeper) GetDidNamespace

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

GetDidNamespace get did namespace

func (Keeper) HasDidDoc

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

HasDid checks if the did exists in the store

func (Keeper) Logger

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

func (Keeper) SetDidDoc

func (k Keeper) SetDidDoc(ctx *sdk.Context, value *types.DidDocWithMetadata) error

SetDid set a specific did in the store. Updates DID counter if the DID is new.

func (Keeper) SetDidDocCount

func (k Keeper) SetDidDocCount(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

type MsgServer

type MsgServer struct {
	Keeper
}

func (MsgServer) CreateDidDoc

func (MsgServer) DeactivateDidDoc

func (MsgServer) UpdateDidDoc

type QueryServer

type QueryServer struct {
	Keeper
}

Jump to

Keyboard shortcuts

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