Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func ValidateProof(ctx sdk.Context, k Keeper, vc types.VerifiableCredential, ...) error
- type Keeper
- func (k Keeper) Delete(ctx sdk.Context, key []byte, prefix []byte)
- func (q Keeper) DeleteVerifiableCredentialFromStore(ctx sdk.Context, credentialID []byte, issuerAddress string) error
- func (k Keeper) Get(ctx sdk.Context, key []byte, prefix []byte, unmarshal UnmarshalFn) (i interface{}, found bool)
- func (k Keeper) GetAll(ctx sdk.Context, prefix []byte) sdk.Iterator
- func (q Keeper) GetAllVerifiableCredentials(ctx sdk.Context) []types.VerifiableCredential
- func (q Keeper) GetAllVerifiableCredentialsByIssuer(ctx sdk.Context, issuerDID string) []types.VerifiableCredential
- func (q Keeper) GetAllVerifiableCredentialsWithCondition(ctx sdk.Context, key []byte, ...) (vcs []types.VerifiableCredential)
- func (q Keeper) GetVerifiableCredential(ctx sdk.Context, key []byte) (types.VerifiableCredential, bool)
- func (q Keeper) GetVerifiableCredentialWithType(ctx sdk.Context, subjectDID, vcType string) (vcs []types.VerifiableCredential)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (q Keeper) MarshalVerifiableCredential(value interface{}) []byte
- func (k Keeper) Set(ctx sdk.Context, key []byte, prefix []byte, i interface{}, marshal MarshalFn)
- func (q Keeper) SetVerifiableCredential(ctx sdk.Context, key []byte, vc types.VerifiableCredential) (err error)
- func (q Keeper) UnmarshalVerifiableCredential(value []byte) (interface{}, bool)
- func (q Keeper) VerifiableCredential(c context.Context, req *types.QueryVerifiableCredentialRequest) (*types.QueryVerifiableCredentialResponse, error)
- func (q Keeper) VerifiableCredentials(c context.Context, req *types.QueryVerifiableCredentialsRequest) (*types.QueryVerifiableCredentialsResponse, error)
- type MarshalFn
- type UnmarshalFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func ValidateProof ¶
func ValidateProof(ctx sdk.Context, k Keeper, vc types.VerifiableCredential, verificationRelationships ...string) error
ValidateProof validate the proof of a verifiable credential
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper holds the application data
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeKey, memKey sdk.StoreKey, didKeeper types.DidKeeper, accountKeeper types.AccountKeeper, ) *Keeper
NewKeeper create a new instance of a Keeper
func (Keeper) DeleteVerifiableCredentialFromStore ¶
func (q Keeper) DeleteVerifiableCredentialFromStore(ctx sdk.Context, credentialID []byte, issuerAddress string) error
DeleteVerifiableCredentialFromStore deletes a verifiable credential from the store, it performs the necessary proof validation before executing the deletion
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) GetAllVerifiableCredentials ¶
func (q Keeper) GetAllVerifiableCredentials(ctx sdk.Context) []types.VerifiableCredential
func (Keeper) GetAllVerifiableCredentialsByIssuer ¶
func (q Keeper) GetAllVerifiableCredentialsByIssuer(ctx sdk.Context, issuerDID string) []types.VerifiableCredential
GetAllVerifiableCredentialsByIssuer returns all verifiable credentials issued by an issuer
func (Keeper) GetAllVerifiableCredentialsWithCondition ¶
func (q Keeper) GetAllVerifiableCredentialsWithCondition( ctx sdk.Context, key []byte, vcSelector func(votes types.VerifiableCredential) bool, ) (vcs []types.VerifiableCredential)
func (Keeper) GetVerifiableCredential ¶
func (q Keeper) GetVerifiableCredential(ctx sdk.Context, key []byte) (types.VerifiableCredential, bool)
GetVerifiableCredential regurns the verifiable credentials associated with an key
func (Keeper) GetVerifiableCredentialWithType ¶
func (q Keeper) GetVerifiableCredentialWithType(ctx sdk.Context, subjectDID, vcType string) (vcs []types.VerifiableCredential)
GetVerifiableCredentialWithType returns the list of verifiable credential of a certain type for an holder (the subject of the credential)
func (Keeper) MarshalVerifiableCredential ¶
func (Keeper) SetVerifiableCredential ¶
func (q Keeper) SetVerifiableCredential(ctx sdk.Context, key []byte, vc types.VerifiableCredential) (err error)
SetVerifiableCredential commit a verifiable credential to the storage
func (Keeper) UnmarshalVerifiableCredential ¶
func (Keeper) VerifiableCredential ¶
func (q Keeper) VerifiableCredential( c context.Context, req *types.QueryVerifiableCredentialRequest, ) (*types.QueryVerifiableCredentialResponse, error)
VerifiableCredential queries verifiable credentials info for given verifiable credentials id
func (Keeper) VerifiableCredentials ¶
func (q Keeper) VerifiableCredentials( c context.Context, req *types.QueryVerifiableCredentialsRequest, ) (*types.QueryVerifiableCredentialsResponse, error)
VerifiableCredentials implements the VerifiableCredentials gRPC method
type MarshalFn ¶
type MarshalFn func(value interface{}) []byte
MarshalFn is a generic function to marshal interfaces
type UnmarshalFn ¶
UnmarshalFn is a generic function to unmarshal bytes