Documentation ¶
Overview ¶
Package credentialquery allows querying credentials using presentation definition.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance implements querying credentials using presentation definition.
func NewInstance ¶
func NewInstance(documentLoader ld.DocumentLoader) *Instance
NewInstance returns new Instance.
func (*Instance) Query ¶
func (c *Instance) Query( query *presexch.PresentationDefinition, opts ...QueryOpt, ) (*verifiable.Presentation, error)
Query returns credentials that match PresentationDefinition.
type QueryOpt ¶
type QueryOpt func(opts *queryOpts)
QueryOpt is the query credential option.
func WithCredentialReader ¶
func WithCredentialReader(credentialReader api.CredentialReader) QueryOpt
WithCredentialReader sets credential reader that will be used to fetch credential.
func WithCredentialsArray ¶
func WithCredentialsArray(vcs []*verifiable.Credential) QueryOpt
WithCredentialsArray sets array of Verifiable Credentials. If specified, this takes precedence over the CredentialReader option.
Click to show internal directories.
Click to hide internal directories.