Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
feat: create DI options aliases (#3623)
Browse files Browse the repository at this point in the history
Signed-off-by: Mykhailo Sizov <mykhailo.sizov@securekey.com>
  • Loading branch information
mishasizov-SK authored Aug 22, 2023
1 parent 5b00069 commit 6911901
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/doc/verifiable/verifiable.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/hyperledger/aries-framework-go/spi/kms"
"github.com/hyperledger/aries-framework-go/spi/vdr"

"github.com/hyperledger/aries-framework-go/component/models/dataintegrity"
"github.com/hyperledger/aries-framework-go/component/models/did"
"github.com/hyperledger/aries-framework-go/component/models/sdjwt/common"
"github.com/hyperledger/aries-framework-go/component/models/sdjwt/holder"
Expand Down Expand Up @@ -127,6 +128,20 @@ func WithBaseContextValidation() CredentialOpt {
return verifiable.WithBaseContextValidation()
}

// WithDataIntegrityVerifier provides the Data Integrity verifier to use when
// the credential being processed has a Data Integrity proof.
func WithDataIntegrityVerifier(v *dataintegrity.Verifier) CredentialOpt {
return verifiable.WithDataIntegrityVerifier(v)
}

// WithExpectedDataIntegrityFields validates that a Data Integrity proof has the
// given purpose, domain, and challenge. Empty purpose means the default,
// assertionMethod, will be expected. Empty domain and challenge will mean they
// are not checked.
func WithExpectedDataIntegrityFields(purpose, domain, challenge string) CredentialOpt {
return verifiable.WithExpectedDataIntegrityFields(purpose, domain, challenge)
}

// WithBaseContextExtendedValidation validates that fields that are specified in base context are as specified.
// Additional fields are allowed.
func WithBaseContextExtendedValidation(customContexts, customTypes []string) CredentialOpt {
Expand Down

0 comments on commit 6911901

Please sign in to comment.