Adds a methodFor convenience function (as a replacement for the did:key-specific verificationKeyPair and keyAgreementKeyPair return properties), based on conversation with @mattcollier and @dlongley.
Usage:
const {didDocument, keyPairs, methodFor} = await didKeyDriver.generate();
// For signing Verifiable Credentials
const verificationKeyPair = methodFor({purpose: 'assertionMethod'});
// For Authorization Capabilities (zCaps)
const invocationKeyPair = methodFor({purpose: 'capabilityInvocation'});
// For Encryption using `@digitalbazaar/minimal-cipher`
const keyAgreementPair = methodFor({purpose: 'keyAgreement'});
Adds a
methodFor
convenience function (as a replacement for the did:key-specificverificationKeyPair
andkeyAgreementKeyPair
return properties), based on conversation with @mattcollier and @dlongley.Usage: