Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Ed25519Signature2018 ed25519 signature suite. Ed25519Signature2018 = "Ed25519Signature2018" // Ed25519Signature2020 ed25519 signature suite. Ed25519Signature2020 = "Ed25519Signature2020" // JSONWebSignature2020 json web signature suite. JSONWebSignature2020 = "JsonWebSignature2020" // CtxJWS is the JWS context. CtxJWS = "https://w3id.org/security/suites/jws-2020/v1" // CtxEd25519Signature2018 is the ED25519-2018 context. CtxEd25519Signature2018 = "https://w3id.org/security/suites/ed25519-2018/v1" // CtxEd25519Signature2020 is the ED25519-2020 context. CtxEd25519Signature2020 = "https://w3id.org/security/suites/ed25519-2020/v1" // AssertionMethod assertionMethod. AssertionMethod = "assertionMethod" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶
type Opt func(*verifiable.LinkedDataProofContext)
Opt represents option for Sign fn.
func WithCreated ¶
WithCreated allows providing time when signing credentials.
func WithDomain ¶
WithDomain allows providing domain when signing credentials.
func WithSignatureRepresentation ¶
func WithSignatureRepresentation(signature verifiable.SignatureRepresentation) Opt
WithSignatureRepresentation allows providing signature representation when signing credentials.
type Providers ¶
type Providers struct { DocLoader ld.DocumentLoader KeyManager keyManager Crypto crypto Metrics metricsProvider }
Providers contains all of the providers required by verifiable credential signer.
type Signer ¶
type Signer struct { *Providers // contains filtered or unexported fields }
Signer to sign verifiable credential.
func New ¶
func New(providers *Providers, params SigningParams) (*Signer, error)
New returns new instance of VC signer.
func (*Signer) Sign ¶
func (s *Signer) Sign(vc *verifiable.Credential, opts ...Opt) (*verifiable.Credential, error)
Sign will sign verifiable credential.
type SigningParams ¶
SigningParams contains required parameters for signing anchored credential.
Click to show internal directories.
Click to hide internal directories.