Versions in this module Expand all Collapse all v1 v1.0.1 Dec 24, 2023 Changes in this version + const All + const Allowed + const AudienceOption + const BuilderEmptyError + const Disallowed + const JWT + const JWTRequest + const JWTVC + const JWTVP + const JWTVPTarget + const LDP + const LDPVC + const LDPVP + const Pick + const Preferred + const PresentationDefinitionKey + const PresentationSubmissionContext + const PresentationSubmissionType + const Required + func AreValidSubmissionRequirements(requirements []SubmissionRequirement) error + func BuildJWTPresentationRequest(signer jwx.Signer, def PresentationDefinition, audience []string) ([]byte, error) + func BuildPresentationRequest(signer any, pt PresentationRequestType, def PresentationDefinition, ...) ([]byte, error) + func BuildPresentationSubmission(signer any, requester string, def PresentationDefinition, ...) ([]byte, error) + func BuildPresentationSubmissionVP(submitter string, def PresentationDefinition, claims []NormalizedClaim) (*credential.VerifiablePresentation, error) + func IsSupportedEmbedTarget(et EmbedTarget) bool + func IsSupportedPresentationRequestType(rt PresentationRequestType) bool + func IsValidDefinitionClaimFormatDesignation(format ClaimFormat) error + func IsValidPresentationDefinition(definition PresentationDefinition) error + func IsValidPresentationDefinitionEnvelope(definition PresentationDefinitionEnvelope) error + func IsValidPresentationSubmission(submission PresentationSubmission) error + func IsValidSubmissionRequirement(requirement SubmissionRequirement) error + type ClaimFormat struct + JWT *JWTType + JWTVC *JWTType + JWTVP *JWTType + LDP *LDPType + LDPVC *LDPType + LDPVP *LDPType + func (cf *ClaimFormat) AlgOrProofTypePerFormat() []string + func (cf *ClaimFormat) FormatValues() []string + func (cf *ClaimFormat) IsEmpty() bool + func (cf *ClaimFormat) IsValid() error + type Constraints struct + Fields []Field + IsHolder []RelationalConstraint + LimitDisclosure *Preference + SameSubject []RelationalConstraint + Statuses *CredentialStatus + SubjectIsIssuer *Preference + type CredentialFormat string + func SupportedClaimFormats() []CredentialFormat + type CredentialStatus struct + Active ... + Revoked ... + Suspended ... + type EmbedTarget string + func GetSupportedEmbedTargets() []EmbedTarget + type Field struct + Filter *Filter + ID string + IntentToRetain bool + Name string + Optional bool + Path []string + Predicate *Preference + Purpose string + type Filter struct + AdditionalProperties bool + AllOf any + Const any + Enum []any + ExclusiveMaximum any + ExclusiveMinimum any + Format string + MaxLength int + Maximum any + MinLength int + Minimum any + Not any + OneOf any + Pattern string + Properties any + Required []string + Type string + func (f Filter) ToJSON() (string, error) + type FromOption struct + From string + FromNested []SubmissionRequirement + type InputDescriptor struct + Constraints *Constraints + Format *ClaimFormat + Group []string + ID string + Name string + Purpose string + func (id *InputDescriptor) IsEmpty() bool + func (id *InputDescriptor) IsValid() error + type InputDescriptorBuilder struct + func NewInputDescriptorBuilder() InputDescriptorBuilder + func (idb *InputDescriptorBuilder) Build() (*InputDescriptor, error) + func (idb *InputDescriptorBuilder) IsEmpty() bool + func (idb *InputDescriptorBuilder) SetClaimFormat(format ClaimFormat) error + func (idb *InputDescriptorBuilder) SetConstraints(constraints Constraints) error + func (idb *InputDescriptorBuilder) SetGroup(group []string) error + func (idb *InputDescriptorBuilder) SetName(name string) error + func (idb *InputDescriptorBuilder) SetPurpose(purpose string) error + type JWTFormat CredentialFormat + func (f JWTFormat) CredentialFormat() CredentialFormat + func (f JWTFormat) Ptr() *JWTFormat + func (f JWTFormat) String() string + type JWTType struct + Alg []crypto.SignatureAlgorithm + type LDPType struct + ProofType []cryptosuite.SignatureType + type LinkedDataFormat CredentialFormat + func (f LinkedDataFormat) CredentialFormat() CredentialFormat + func (f LinkedDataFormat) Ptr() *LinkedDataFormat + func (f LinkedDataFormat) String() string + type NormalizedClaim struct + AlgOrProofType string + Data map[string]any + Format string + ID string + RawClaim any + type Preference string + func (p Preference) Ptr() *Preference + type PresentationClaim struct + Credential *credential.VerifiableCredential + JWTFormat *JWTFormat + LDPFormat *LinkedDataFormat + Presentation *credential.VerifiablePresentation + SignatureAlgorithmOrProofType string + Token *string + func (pc *PresentationClaim) GetClaim() any + func (pc *PresentationClaim) GetClaimFormat() (string, error) + func (pc *PresentationClaim) GetClaimJSON() (map[string]any, error) + func (pc *PresentationClaim) GetClaimValue() (any, error) + func (pc *PresentationClaim) IsEmpty() bool + type PresentationDefinition struct + Format *ClaimFormat + Frame any + ID string + InputDescriptors []InputDescriptor + Name string + Purpose string + SubmissionRequirements []SubmissionRequirement + func VerifyJWTPresentationRequest(verifier jwx.Verifier, request []byte) (*PresentationDefinition, error) + func VerifyPresentationRequest(verifier any, pt PresentationRequestType, request []byte) (*PresentationDefinition, error) + func (pd *PresentationDefinition) IsEmpty() bool + func (pd *PresentationDefinition) IsValid() error + type PresentationDefinitionBuilder struct + func NewPresentationDefinitionBuilder() PresentationDefinitionBuilder + func (pdb *PresentationDefinitionBuilder) Build() (*PresentationDefinition, error) + func (pdb *PresentationDefinitionBuilder) IsEmpty() bool + func (pdb *PresentationDefinitionBuilder) SetClaimFormat(format ClaimFormat) error + func (pdb *PresentationDefinitionBuilder) SetFrame(frame any) error + func (pdb *PresentationDefinitionBuilder) SetInputDescriptors(descriptors []InputDescriptor) error + func (pdb *PresentationDefinitionBuilder) SetName(name string) error + func (pdb *PresentationDefinitionBuilder) SetPurpose(purpose string) error + func (pdb *PresentationDefinitionBuilder) SetSubmissionRequirements(requirements []SubmissionRequirement) error + type PresentationDefinitionEnvelope struct + type PresentationRequestOption struct + Type PresentationRequestOptionType + Value any + type PresentationRequestOptionType string + type PresentationRequestType string + func GetSupportedPresentationRequestTypes() []PresentationRequestType + type PresentationSubmission struct + DefinitionID string + DescriptorMap []SubmissionDescriptor + ID string + func (ps *PresentationSubmission) IsEmpty() bool + func (ps *PresentationSubmission) IsValid() error + type PresentationSubmissionBuilder struct + func NewPresentationSubmissionBuilder(definitionID string) PresentationSubmissionBuilder + func (psb *PresentationSubmissionBuilder) Build() (*PresentationSubmission, error) + func (psb *PresentationSubmissionBuilder) IsEmpty() bool + func (psb *PresentationSubmissionBuilder) SetDescriptorMap(descriptors []SubmissionDescriptor) error + type RelationalConstraint struct + Directive *Preference + FieldID []string + type Selection string + type SubmissionDescriptor struct + Format string + ID string + Path string + PathNested *SubmissionDescriptor + type SubmissionRequirement struct + Count int + Maximum int + Minimum int + Name string + Purpose string + Rule Selection + func (sr *SubmissionRequirement) IsEmpty() bool + func (sr *SubmissionRequirement) IsValid() error + type VerifiedSubmissionData struct + Claim any + FilteredData any + InputDescriptorID string + func VerifyPresentationSubmission(ctx context.Context, verifier any, resolver resolution.Resolver, ...) ([]VerifiedSubmissionData, error) + func VerifyPresentationSubmissionVP(def PresentationDefinition, vp credential.VerifiablePresentation) ([]VerifiedSubmissionData, error)