Package Exports
- @digitalbazaar/http-signature-zcap-verify
- @digitalbazaar/http-signature-zcap-verify/index.js
- @digitalbazaar/http-signature-zcap-verify/main.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@digitalbazaar/http-signature-zcap-verify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
http-signature-zcap-verify
A library for verifying Authorization Capability (ZCAP) invocations via HTTP signatures
Example "getVerifier" for "verifyCapabilityInvocation"
import {CryptoLD} from 'crypto-ld';
import {Ed25519VerificationKey2020} from
'@digitalbazaar/ed25519-verification-key-2020';
const cryptoLd = new CryptoLD();
cryptoLd.use(Ed25519VerificationKey2020);
async function getVerifier({keyId, documentLoader}) {
const key = await cryptoLd.fromKeyId({id: keyId, documentLoader});
const verificationMethod = await key.export(
{publicKey: true, includeContext: true});
const verifier = key.verifier();
return {verifier, verificationMethod};
}