Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Ed25519Signature2018 ed25519 signature suite Ed25519Signature2018 = "Ed25519Signature2018" // Ed25519VerificationKey2018 ed25119 verification key Ed25519VerificationKey2018 = "Ed25519VerificationKey2018" )
View Source
const ( // AssertionMethod assertionMethod AssertionMethod = "assertionMethod" // Authentication authentication Authentication = "authentication" )
Variables ¶
This section is empty.
Functions ¶
func GetDIDFromVerificationMethod ¶
GetDIDFromVerificationMethod fetches did from the verification method.
func GetKeyIDFromVerificationMethod ¶
GetKeyIDFromVerificationMethod fetches keyid from the verification method.
func GetVerificationMethodFromDID ¶
GetVerificationMethodFromDID returns the first verification method found with the given relationship.
Types ¶
type Crypto ¶
type Crypto struct {
// contains filtered or unexported fields
}
Crypto vc crypto.
func New ¶
func New(keyManager kms.KeyManager, c ariescrypto.Crypto, vdri vdriapi.Registry, dl ld.DocumentLoader) *Crypto
New returns new instance of vc crypto.
func (*Crypto) SignCredential ¶
func (c *Crypto) SignCredential(vc *verifiable.Credential, signingKeyID string) (*verifiable.Credential, error)
SignCredential signs a credential.
func (*Crypto) SignPresentation ¶
func (c *Crypto) SignPresentation(vp *verifiable.Presentation, signingKeyID string) (*verifiable.Presentation, error)
SignPresentation signs a presentation. TODO should inject jsonld document loader: https://github.com/trustbloc/edge-adapter/issues/306
Click to show internal directories.
Click to hide internal directories.