Documentation
¶
Index ¶
- func ExportGenesis(ctx sdk.Context, k Keeper) *credential.GenesisState
- func InitGenesis(ctx sdk.Context, k Keeper, genState *credential.GenesisState)
- func NewMsgServerImpl(keeper Keeper) credential.MsgServer
- func NewPublicCredentialProposalHandler(k Keeper) govtypes.Handler
- func ValidateProof(ctx sdk.Context, k Keeper, wc *credential.WrappedCredential, ...) (err error)
- type Keeper
- func (k Keeper) AllowPublicCredential(ctx sdk.Context, id string)
- func (k Keeper) AllowedPublicCredentials(c context.Context, req *credential.QueryAllowedPublicCredentialsRequest) (*credential.QueryAllowedPublicCredentialsResponse, error)
- func (k Keeper) CredentialDefinition(c context.Context, req *credential.QueryCredentialDefinitionRequest) (*credential.QueryCredentialDefinitionResponse, error)
- func (k Keeper) CredentialDefinitions(c context.Context, req *credential.QueryCredentialDefinitionsRequest) (*credential.QueryCredentialDefinitionsResponse, error)
- func (k Keeper) CredentialDefinitionsByPublisher(c context.Context, ...) (*credential.QueryCredentialDefinitionsByPublisherResponse, error)
- func (k Keeper) Exists(ctx sdk.Context, prefix []byte, key []byte) bool
- func (k Keeper) Get(ctx sdk.Context, prefix []byte, key []byte, unmarshal UnmarshalFn) (i interface{}, found bool)
- func (k Keeper) GetAll(ctx sdk.Context, prefix []byte) sdk.Iterator
- func (k Keeper) GetAllowedCredentialDefinitions(ctx sdk.Context, req *query.PageRequest) (cds []*credential.CredentialDefinition, pageRes *query.PageResponse, err error)
- func (k Keeper) GetCredentialDefinition(ctx sdk.Context, key string) (credential.CredentialDefinition, bool)
- func (k Keeper) GetCredentialDefinitions(ctx sdk.Context, req *credential.QueryCredentialDefinitionsRequest) (cds []*credential.CredentialDefinition, pageRes *query.PageResponse, err error)
- func (k Keeper) GetCredentialDefinitionsWithFilter(ctx sdk.Context, paginate *query.PageRequest, ...) (cds []*credential.CredentialDefinition, pageRes *query.PageResponse, err error)
- func (k Keeper) GetPublicCredential(ctx sdk.Context, key string) (credential.PublicVerifiableCredential, bool)
- func (k Keeper) GetPublicCredentialWithFilter(ctx sdk.Context, pagination *query.PageRequest, ...) (pvcs []*credential.PublicVerifiableCredential, pageRes *query.PageResponse, ...)
- func (k Keeper) IsPublicCredentialDefinitionAllowed(ctx sdk.Context, id string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) PublicCredential(c context.Context, req *credential.QueryPublicCredentialRequest) (*credential.QueryPublicCredentialResponse, error)
- func (k Keeper) PublicCredentials(c context.Context, req *credential.QueryPublicCredentialsRequest) (*credential.QueryPublicCredentialsResponse, error)
- func (k Keeper) PublicCredentialsByHolder(c context.Context, req *credential.QueryPublicCredentialsByHolderRequest) (*credential.QueryPublicCredentialsByHolderResponse, error)
- func (k Keeper) PublicCredentialsByIssuer(c context.Context, req *credential.QueryPublicCredentialsByIssuerRequest) (*credential.QueryPublicCredentialsByIssuerResponse, error)
- func (k Keeper) RemovePublicCredentialFromAllowedList(ctx sdk.Context, id string)
- func (k Keeper) Set(ctx sdk.Context, prefix []byte, key []byte, i codec.ProtoMarshaler, ...)
- func (k Keeper) SetCredentialDefinition(ctx sdk.Context, def *credential.CredentialDefinition)
- func (k Keeper) SetPublicCredential(ctx sdk.Context, pc *credential.PublicVerifiableCredential)
- func (k Keeper) Unmarshal(data []byte, val codec.ProtoMarshaler) bool
- type MarshalFn
- type UnmarshalFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) *credential.GenesisState
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, genState *credential.GenesisState)
func NewMsgServerImpl ¶
func NewMsgServerImpl(keeper Keeper) credential.MsgServer
NewMsgServerImpl returns an implementation of the identity MsgServer interface for the provided Keeper.
func ValidateProof ¶
func ValidateProof(ctx sdk.Context, k Keeper, wc *credential.WrappedCredential, verificationRelationships ...string) (err error)
ValidateProof validate the proof of a verifiable credential
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.Codec, storeKey, memKey sdk.StoreKey, did credential.DidKeeper, account credential.AccountKeeper) *Keeper
func (Keeper) AllowPublicCredential ¶
func (Keeper) AllowedPublicCredentials ¶
func (k Keeper) AllowedPublicCredentials( c context.Context, req *credential.QueryAllowedPublicCredentialsRequest, ) (*credential.QueryAllowedPublicCredentialsResponse, error)
func (Keeper) CredentialDefinition ¶
func (k Keeper) CredentialDefinition( c context.Context, req *credential.QueryCredentialDefinitionRequest, ) (*credential.QueryCredentialDefinitionResponse, error)
CredentialDefinition returns credential definition for an id
func (Keeper) CredentialDefinitions ¶
func (k Keeper) CredentialDefinitions( c context.Context, req *credential.QueryCredentialDefinitionsRequest, ) (*credential.QueryCredentialDefinitionsResponse, error)
CredentialDefinitions returns all credential definitions
func (Keeper) CredentialDefinitionsByPublisher ¶
func (k Keeper) CredentialDefinitionsByPublisher( c context.Context, req *credential.QueryCredentialDefinitionsByPublisherRequest, ) (*credential.QueryCredentialDefinitionsByPublisherResponse, error)
CredentialDefinitionsByPublisher returns credential definitions for a particular publisher id
func (Keeper) Get ¶
func (k Keeper) Get( ctx sdk.Context, prefix []byte, key []byte, unmarshal UnmarshalFn, ) (i interface{}, found bool)
Get gets an item from the store by bytes
func (Keeper) GetAllowedCredentialDefinitions ¶
func (k Keeper) GetAllowedCredentialDefinitions(ctx sdk.Context, req *query.PageRequest) (cds []*credential.CredentialDefinition, pageRes *query.PageResponse, err error)
func (Keeper) GetCredentialDefinition ¶
func (k Keeper) GetCredentialDefinition(ctx sdk.Context, key string) (credential.CredentialDefinition, bool)
GetCredentialDefinition retrieve a credential definition by its key. The boolean return will be false if the credential definition is not found
func (Keeper) GetCredentialDefinitions ¶
func (k Keeper) GetCredentialDefinitions(ctx sdk.Context, req *credential.QueryCredentialDefinitionsRequest) (cds []*credential.CredentialDefinition, pageRes *query.PageResponse, err error)
GetCredentialDefinitions list credential definitions
func (Keeper) GetCredentialDefinitionsWithFilter ¶
func (k Keeper) GetCredentialDefinitionsWithFilter(ctx sdk.Context, paginate *query.PageRequest, filter func(credentialDefinition *credential.CredentialDefinition) bool) (cds []*credential.CredentialDefinition, pageRes *query.PageResponse, err error)
GetCredentialDefinitionsWithFilter retrieve a list of credential definitions with filter
func (Keeper) GetPublicCredential ¶
func (k Keeper) GetPublicCredential(ctx sdk.Context, key string) (credential.PublicVerifiableCredential, bool)
GetPublicCredential retrieve a public verifiable credential by its key. The boolean return will be false if the credential is not found
func (Keeper) GetPublicCredentialWithFilter ¶
func (k Keeper) GetPublicCredentialWithFilter(ctx sdk.Context, pagination *query.PageRequest, filter func(verifiableCredential *credential.PublicVerifiableCredential) bool) (pvcs []*credential.PublicVerifiableCredential, pageRes *query.PageResponse, err error)
GetPublicCredentialWithFilter retrieve a list of verifiable credentials filtered by properties
func (Keeper) IsPublicCredentialDefinitionAllowed ¶
func (Keeper) PublicCredential ¶
func (k Keeper) PublicCredential( c context.Context, req *credential.QueryPublicCredentialRequest, ) (*credential.QueryPublicCredentialResponse, error)
PublicCredential returns public credential for a particular id
func (Keeper) PublicCredentials ¶
func (k Keeper) PublicCredentials( c context.Context, req *credential.QueryPublicCredentialsRequest, ) (*credential.QueryPublicCredentialsResponse, error)
PublicCredentials returns all public credentials
func (Keeper) PublicCredentialsByHolder ¶
func (k Keeper) PublicCredentialsByHolder( c context.Context, req *credential.QueryPublicCredentialsByHolderRequest, ) (*credential.QueryPublicCredentialsByHolderResponse, error)
PublicCredentialsByHolder returns public credentials for particular holder
func (Keeper) PublicCredentialsByIssuer ¶
func (k Keeper) PublicCredentialsByIssuer( c context.Context, req *credential.QueryPublicCredentialsByIssuerRequest, ) (*credential.QueryPublicCredentialsByIssuerResponse, error)
PublicCredentialsByIssuer returns public credentials for a particular issuer
func (Keeper) RemovePublicCredentialFromAllowedList ¶
func (Keeper) Set ¶
func (k Keeper) Set(ctx sdk.Context, prefix []byte, key []byte, i codec.ProtoMarshaler, marshal MarshalFn, )
Set sets a value in the db with a prefixed key
func (Keeper) SetCredentialDefinition ¶
func (k Keeper) SetCredentialDefinition(ctx sdk.Context, def *credential.CredentialDefinition)
SetCredentialDefinition persist a credential definition to the store. The credential definition ID is used as key.
func (Keeper) SetPublicCredential ¶
func (k Keeper) SetPublicCredential(ctx sdk.Context, pc *credential.PublicVerifiableCredential)
SetPublicCredential persist a public verifiable credential to the store. The credential ID is used as key
type MarshalFn ¶
type MarshalFn func(o codec.ProtoMarshaler) []byte
MarshalFn is a generic function to marshal bytes
type UnmarshalFn ¶
UnmarshalFn is a generic function to unmarshal bytes