Documentation ¶
Index ¶
- Constants
- func ValidateProofPurpose(proofPurpose, method string, didDoc *did.Doc) error
- type Crypto
- type SigningOpts
- func WithChallenge(challenge string) SigningOpts
- func WithCreated(created *time.Time) SigningOpts
- func WithDomain(domain string) SigningOpts
- func WithPurpose(purpose string) SigningOpts
- func WithSignatureType(signatureType string) SigningOpts
- func WithSigningRepresentation(representation string) SigningOpts
- func WithVerificationMethod(verificationMethod string) SigningOpts
Constants ¶
View Source
const ( // Ed25519Signature2018 ed25519 signature suite. Ed25519Signature2018 = "Ed25519Signature2018" // JSONWebSignature2020 json web signature suite. JSONWebSignature2020 = "JsonWebSignature2020" // BbsBlsSignature2020 signature suite. BbsBlsSignature2020 = "BbsBlsSignature2020" // Ed25519VerificationKey2018 ed25119 verification key. Ed25519VerificationKey2018 = "Ed25519VerificationKey2018" // JSONWebKey2020 type. JSONWebKey2020 = "JsonWebKey2020" )
View Source
const ( // Ed25519KeyType ed25519 key type. Ed25519KeyType = "Ed25519" // P256KeyType EC P-256 key type. P256KeyType = "P256" )
View Source
const ( // AssertionMethod assertionMethod. AssertionMethod = "assertionMethod" // Authentication authentication. Authentication = "authentication" // CapabilityDelegation capabilityDelegation. CapabilityDelegation = "capabilityDelegation" // CapabilityInvocation capabilityInvocation. CapabilityInvocation = "capabilityInvocation" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Crypto ¶
type Crypto struct {
// contains filtered or unexported fields
}
Crypto to sign credential.
func New ¶
func New(keyManager kms.KeyManager, c ariescrypto.Crypto, vdr vdrapi.Registry, loader ld.DocumentLoader) *Crypto
New return new instance of vc crypto.
func (*Crypto) SignCredential ¶
func (c *Crypto) SignCredential(dataProfile *vcprofile.DataProfile, vc *verifiable.Credential, opts ...SigningOpts, ) (*verifiable.Credential, error)
SignCredential sign vc.
func (*Crypto) SignPresentation ¶
func (c *Crypto) SignPresentation(profile *vcprofile.HolderProfile, vp *verifiable.Presentation, opts ...SigningOpts, ) (*verifiable.Presentation, error)
SignPresentation signs a presentation.
type SigningOpts ¶
type SigningOpts func(opts *signingOpts)
SigningOpts is signing credential option.
func WithChallenge ¶
func WithChallenge(challenge string) SigningOpts
WithChallenge proof challenge.
func WithCreated ¶
func WithCreated(created *time.Time) SigningOpts
WithCreated is an option to pass created time option for signing.
func WithPurpose ¶
func WithPurpose(purpose string) SigningOpts
WithPurpose is an option to pass proof purpose option for signing.
func WithSignatureType ¶
func WithSignatureType(signatureType string) SigningOpts
WithSignatureType is an option to pass signature type for signing.
func WithSigningRepresentation ¶
func WithSigningRepresentation(representation string) SigningOpts
WithSigningRepresentation is an option to pass representation for signing.
func WithVerificationMethod ¶
func WithVerificationMethod(verificationMethod string) SigningOpts
WithVerificationMethod is an option to pass verification method for signing.
Click to show internal directories.
Click to hide internal directories.