keeper

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendSignerIfNeed added in v0.0.2

func AppendSignerIfNeed(signers []types.Signer, controller string, msg *types.Did) []types.Signer

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func VerifyCredentialProofDates added in v0.0.6

func VerifyCredentialProofDates(credProof *types.CredentialProof, credRegistration bool) error

func VerifyCredentialStatusDates added in v0.0.6

func VerifyCredentialStatusDates(issuanceDate time.Time, expirationDate time.Time) error

func VerifyDidDeactivate added in v0.0.3

func VerifyDidDeactivate(metadata *types.Metadata, id string) error

Check the Deactivate status of DID

func VerifyIdentitySignature

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

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,
	ps paramtypes.Subspace,

) *Keeper

func (Keeper) AppendDID

func (k Keeper) AppendDID(ctx sdk.Context, didDoc *types.DidDocument) uint64

func (Keeper) AppendSchema

func (k Keeper) AppendSchema(ctx sdk.Context, schema types.Schema) uint64

func (Keeper) DidParam added in v0.0.3

func (Keeper) GetChainNamespace added in v0.0.7

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

Get the DID namespace

func (Keeper) GetCredential added in v0.0.6

func (k Keeper) GetCredential(ctx *sdk.Context, id string) (*types.Credential, error)

func (Keeper) GetCredentialCount added in v0.0.6

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

func (Keeper) GetDid

func (k Keeper) GetDid(ctx *sdk.Context, id string) (*types.DidDocument, error)

Retrieves the DID from the store

func (Keeper) GetDidCount

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

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetSchema

func (Keeper) GetSchemaCount

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

func (Keeper) GetSchemaFromStore added in v0.0.5

func (k Keeper) GetSchemaFromStore(ctx sdk.Context, schemaId string) (*types.Schema, error)

Get the schema from store

func (Keeper) HasCredential added in v0.0.6

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

Check whether the given Cred is already present in the store

func (Keeper) HasDid

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

Check whether the given DID is already present in the store

func (Keeper) HasSchema

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

Check whether the given Schema already exists in the store

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) QueryCredential added in v0.0.6

func (Keeper) QueryCredentials added in v0.0.6

func (Keeper) RegisterCred added in v0.0.6

func (k Keeper) RegisterCred(ctx sdk.Context, cred *types.Credential) uint64

func (Keeper) SchemaParam added in v0.0.5

func (Keeper) SetChainNamespace added in v0.0.7

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

Set the DID namespace

func (Keeper) SetCredentialCount added in v0.0.6

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

func (Keeper) SetCredentialStatusToExpired added in v0.0.6

func (k Keeper) SetCredentialStatusToExpired(ctx sdk.Context) error

func (Keeper) SetDid

func (k Keeper) SetDid(ctx sdk.Context, didDoc types.DidDocument) error

SetDid set a specific did in the store

func (Keeper) SetDidCount

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

func (Keeper) SetDidDeactivate added in v0.0.3

func (k Keeper) SetDidDeactivate(ctx sdk.Context, didDoc types.DidDocument, id string) error

SetDid set a specific did in the store

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetSchemaCount

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

func (*Keeper) ValidateController added in v0.0.2

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

func (*Keeper) VerifySchemaSignature added in v0.0.6

func (k *Keeper) VerifySchemaSignature(msg *types.SchemaDocument, didDoc *types.Did, signature string, verificationMethod string) error

func (*Keeper) VerifySignature

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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