{"_id":"@mattrglobal/vc-cwt-verifier","_rev":"34-bdab9a7b15bef16c149204ee1bc43da0","name":"@mattrglobal/vc-cwt-verifier","dist-tags":{"unstable":"1.0.4-unstable.fa1a48d","latest":"1.0.4"},"versions":{"1.0.0":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.0","author":{"name":"MATTR"},"license":"SEE LICENCE IN Licence.pdf","_id":"@mattrglobal/vc-cwt-verifier@1.0.0","maintainers":[{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"}],"dist":{"shasum":"ef085491153b45f7e38b65180dc896f7e8021409","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.0.tgz","fileCount":87,"integrity":"sha512-s3DziRhV/9IkLFON+0tfg7drgc/rAiQzjvjGJWoMh2MELwLGlwa+RK+TSw4a/ClbLcCw5EyFqs+3lJ3gkzrYkQ==","signatures":[{"sig":"MEUCIDzvZecnosVlceqLVsmXnr4F64RgQ7m995+QbQ65eF6rAiEAs/jmhjHyGubLWmib/UgF2Ndsb9rjjv1wBnOrEzltGgM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216907},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.0","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","cz-conventional-changelog":"3.3.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.0_1636580826300_0.8908385203224807","host":"s3://npm-registry-packages"}},"1.0.1-unstable.c838b36":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.1-unstable.c838b36","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.1-unstable.c838b36","maintainers":[{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"}],"dist":{"shasum":"961ea21c99b32577b886ff784ca5af2ffad383f9","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.1-unstable.c838b36.tgz","fileCount":85,"integrity":"sha512-tB83ET4J1m+50Cg5x/NrNiYyDnQ2tmkJi3x5o4pHzK4vRZpF2aKfFX40g1TP6BkDJR9QQJH334Z5JFux/wZ+LQ==","signatures":[{"sig":"MEUCIQDwsezWoBHZzAJ/1RUrOQOd+ZjipIRXsIS/X28GLFHAjAIgVpvz4Uizb0fkiRa3MovbVAnMfOIozDNBNfEPmJ9nqLc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109762},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"# vc-cwt-verifier\n\n# Table of Contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Licensing](#licensing)\n\n# Getting started\n\n## Install dependencies\n\nAdd the module as a dependency to your application or library.\n\n```\nyarn add @mattrglobal/vc-cwt-verifier\n```\n\nor\n\n```\nnpm install @mattrglobal/vc-cwt-verifier\n```\n\n# Usage\n\n### Verify a credential\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\nimport * as hex from \"@stablelib/hex\";\n\nconst payload: Uint8Array = hex.decode(\n  \"d2844aa204456b65792d310126a0590137a50178376469643a7765623a6d61747472676c6f62616c2e6769746875622e696f3a6e7a63703a71766e6e6b38396b696a726f65696e6478613375051a6178cc15041a74477215627663a46840636f6e7465787482782668747470733a2f2f7777772e77332e6f72672f323031382f63726564656e7469616c732f7631782768747470733a2f2f6865616c74682e676f76742e6e7a2f63726564656e7469616c732f63706e7a6776657273696f6e65312e302e306474797065827456657269666961626c6543726564656e7469616c6f5075626c6963436f766964506173737163726564656e7469616c5375626a656374a369676976656e4e616d65644a61636b6a66616d696c794e616d656753706172726f7763646f626a313936302d30342d313607d84050e6060795d65f4f85a3924bc4380a30c75840ef52b04644273e9757b2418fea39fae5eac99dd354eaf862f8f8f7c842a85550a0ff485c6999fc29527075686eeceaff36775e4ef031ef94dbc13e6e9f6a83ab\"\n);\n\nconst verifyResult = await verify({ payload });\n\nif (verifyResult.isErr()) {\n  const { error } = verifyResult;\n  // handle error unable to verify\n  return;\n}\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential with a list of trusted issuers\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  trustedIssuers: [\"did:web:example.com\", \"did:web:mattrglobal.github.io:test:example\"],\n  payload: {},\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential skipping expiry and not before checks\n\nIf `assertExpiry` or `assertNotBefore` are omitted they will be checked against the current date and time by default\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  assertExpiry: false,\n  assertNotBefore: false,\n  payload: ...\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Provide custom cache for issuer resolution\n\nBy default an in memory cache will be provided. This can be overwritten by passing a different cache instance.\n\n```typescript\nimport { verify, getDefaultIssuerResolver } from \"@mattrglobal/vc-cwt-verifier\";\n\n\nconst issuerResolver = getDefaultIssuerResolver({ cache: myCache });\n\n\nconst verifyResult = await verify({\n  payload: ...,\n  issuerResolver\n});\n\n```\n\n## Error handling\n\nFunctions that have an error path return a\n[Neverthrow Result](https://www.npmjs.com/package/neverthrow#synchronous-api-result) that represents either success or\nfailure. All functions can throw exceptions for unexpected and unrecoverable errors.\n\n## Licensing\n\nSee [here](https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/) for licence information\n","private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.0","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","cz-conventional-changelog":"3.3.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.1-unstable.c838b36_1636606218421_0.9813350649416941","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.1","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.1","maintainers":[{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"}],"dist":{"shasum":"fb318f82ca106f71164e44f89d155be59bec652a","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.1.tgz","fileCount":85,"integrity":"sha512-c/Z37HD0BwCzPjcPEl0cCbwZV99o5RQG4eY+oFsCqdjpn33URQ5qkhF5QDmIsUxu8lMX6MjXOQflUOrM6Gz5iw==","signatures":[{"sig":"MEQCIDi35WV9r5LO+6USgQ+jDi82XAGfVs78KVJAiH5PveeoAiAWNs/TKD15s7yX0rgky7sHcatzWNR1aeZ3CJsozQ3lxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109745},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.0","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","cz-conventional-changelog":"3.3.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.1_1636616324598_0.09153037660628072","host":"s3://npm-registry-packages"}},"1.0.2-unstable.b39b73e":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.2-unstable.b39b73e","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.2-unstable.b39b73e","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"dist":{"shasum":"cff43b8f49fad15465e41c8998fe9bff9a06bec2","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.2-unstable.b39b73e.tgz","fileCount":85,"integrity":"sha512-Iu0RqD8/UHbzf8LLgHmE66Xm4OeDKEFmkfoWglZ9BrnaiEblY5EWetiq6ovZdvKZRh1/Bzb86RteVkDvQDMToQ==","signatures":[{"sig":"MEQCIAc03FzivpbkTqHcWHji4oe3Y4w5X3Y7TWsVbevWkjsaAiAmbCCmS3t3+e3wd9Fn/LzrVk0KY0ZAt7ozOb2HFiatCw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmCIkCRA9TVsSAnZWagAAQuwP/RjfqrWPrJvL45chsXcz\nmLFDTPUNREg3elXBzQW/F9oecm2HK4HP43tgpkYF6njYyBk/IdmABZSlxs+w\nQD0IR9NqWLhlshZ50XQFZM+gr9SmSWbeK4D6NmqsxcPqwyAFMsz9KxzyqCAp\nwdJ8F9WDUOggv1PboW89Om+2Gb6eZf/fqSrbsU34yZsOMhbGQcT8IYM97o/A\nj7MgdXMLXaKW5NHNUpQn3WwKMGJ0AxvAtSfnjJQEnhNIKEvC2wuqBYkM5QRS\nBzN3rZnWfqAb9Evd9+8MwTzw9JjepysEiav5K8YDpWWHbFXGb1TC9X7JP6Ok\nZBaSw4/5UHAQlgPeNinIrjjh7Ax0A/pcc3/8GdhFkZ0NqueA7siYz1idzB4l\niAymzQ0EzR7nbADafAsBvPr0VhX1g+rkED+lYAngVkR6boP3q28RqDPPh8VM\nUlwXyVzXc98+fz6SKdFEE+0Ykrd4gfrUFFJzeTxz+GqQlL7amaA/r0rCgLht\nwSRod+h/JAcuL6EX3+jWZIX2MaxXfmrmBpwMPMWoqS8yJF+9keZ7wRi2LiGS\nUxH46a7RPXVvv8O6jEW0WaB0wAukvOufwlHbcokIBOL4RgKFxFo/ES1iHV06\ndZVF47mE3RQ+0EJ0iX5tUI+SnWt3BqsrvdYPlbisUDRe9G8GjsAJU74aIlLn\njJYE\r\n=e3Qd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"# vc-cwt-verifier\n\n# Table of Contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Licensing](#licensing)\n\n# Getting started\n\n## Install dependencies\n\nAdd the module as a dependency to your application or library.\n\n```\nyarn add @mattrglobal/vc-cwt-verifier\n```\n\nor\n\n```\nnpm install @mattrglobal/vc-cwt-verifier\n```\n\n# Usage\n\n### Verify a credential\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\nimport * as hex from \"@stablelib/hex\";\n\nconst payload: Uint8Array = hex.decode(\n  \"d2844aa204456b65792d310126a0590137a50178376469643a7765623a6d61747472676c6f62616c2e6769746875622e696f3a6e7a63703a71766e6e6b38396b696a726f65696e6478613375051a6178cc15041a74477215627663a46840636f6e7465787482782668747470733a2f2f7777772e77332e6f72672f323031382f63726564656e7469616c732f7631782768747470733a2f2f6865616c74682e676f76742e6e7a2f63726564656e7469616c732f63706e7a6776657273696f6e65312e302e306474797065827456657269666961626c6543726564656e7469616c6f5075626c6963436f766964506173737163726564656e7469616c5375626a656374a369676976656e4e616d65644a61636b6a66616d696c794e616d656753706172726f7763646f626a313936302d30342d313607d84050e6060795d65f4f85a3924bc4380a30c75840ef52b04644273e9757b2418fea39fae5eac99dd354eaf862f8f8f7c842a85550a0ff485c6999fc29527075686eeceaff36775e4ef031ef94dbc13e6e9f6a83ab\"\n);\n\nconst verifyResult = await verify({ payload });\n\nif (verifyResult.isErr()) {\n  const { error } = verifyResult;\n  // handle error unable to verify\n  return;\n}\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential with a list of trusted issuers\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  trustedIssuers: [\"did:web:example.com\", \"did:web:mattrglobal.github.io:test:example\"],\n  payload: {},\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential skipping expiry and not before checks\n\nIf `assertExpiry` or `assertNotBefore` are omitted they will be checked against the current date and time by default\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  assertExpiry: false,\n  assertNotBefore: false,\n  payload: ...\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Provide custom cache for issuer resolution\n\nBy default an in memory cache will be provided. This can be overwritten by passing a different cache instance.\n\n```typescript\nimport { verify, getDefaultIssuerResolver } from \"@mattrglobal/vc-cwt-verifier\";\n\n\nconst issuerResolver = getDefaultIssuerResolver({ cache: myCache });\n\n\nconst verifyResult = await verify({\n  payload: ...,\n  issuerResolver\n});\n\n```\n\n## Error handling\n\nFunctions that have an error path return a\n[Neverthrow Result](https://www.npmjs.com/package/neverthrow#synchronous-api-result) that represents either success or\nfailure. All functions can throw exceptions for unexpected and unrecoverable errors.\n\n## Licensing\n\nSee [here](https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/) for licence information\n","private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.0","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","cz-conventional-changelog":"3.3.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.2-unstable.b39b73e_1637360164406_0.9432774162687305","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.2","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.2","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"dist":{"shasum":"d34862a34b72d516ed9ca363b0c99329d8b1b769","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.2.tgz","fileCount":85,"integrity":"sha512-XkkCLnfqNYm6vLZwYyG9DPv7AzooRVwGpM/lIw3esETRLIhpZJ5WqEK7kIQ3gNZ6y+bl+h7J+fHiZUuT601/cA==","signatures":[{"sig":"MEUCICfHYRSSjAyrma/bcCD3j3U1d2mVeAt5kuC8hneVlmRkAiEAylcJU+3eac3si13lPfGUehfhpjBoU9pdzoBmtdZunv4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmqQ4CRA9TVsSAnZWagAAPZAP/j0/utYF3jZJdTf4M7QD\nYHoIARReqW+l9OfDn9qoHePFIOGxNCZE7ODkNoTb950stYnbOa84oXKfu49d\nJQxI1B6/KOqmte2vh1nP7da5HIRBmaKlqOjN57fjS2j60TNW/fCaMzwjGB2v\nc/MaKxgB9I1m7RyzWWOsWr6ha48E5yyq9pQOe/ao+tSChrSOP0k+r9lVVMK/\nccljHGZD9XcDUImwhonfh1cGXlyEAmLrtA2Vz9IGgMsY6WBtCxATEpOHC+Ue\nAeJ0LdBTbOVGR/nZAsu8JlmocvU/gVRawbP4EIQ+QdMEYI4qbfxuUf+9cp8l\n51zRvwK1AzFa4tUNOTsVNqIwJCfPB7iLGY1eAfhuMP2BaR70fMD2dTY1wTcZ\nPTKNKgAMjOEp3Z1TPMHdAH9IErNIYoaqxg+tdYs1tUErfEDdGlNGOzg1Z0AV\nQrQT5R/4IJzlwXYkWA3Bv3EvgfJmGMHeK9rb2cJMuYUXqutoV1M0+roPXEQO\ntKeqGCki7cwNZZejDPcaJpgUC2Y9dTXDCwX5sxr/S2Wakdc7aMG5t/qtw/tS\ncqcQE+xyyOzbJJAaENR1Ea9N6OSqwj0vx8+Xc4eFXT4/ZpmLqMnPY8Rg4Wyz\nH1+ojopDiy+A5cSgTZgNq2eCQTWwbS2zftNnj9K712bXmZq9QrpzPfwPRhZC\nPSaE\r\n=oDsK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.0","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","cz-conventional-changelog":"3.3.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.2_1637524536036_0.5027447901805697","host":"s3://npm-registry-packages"}},"1.0.3-unstable.e285dff":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.3-unstable.e285dff","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.3-unstable.e285dff","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"dist":{"shasum":"2b91b342bf84f67397f861b7a3055a5e43622a7c","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.3-unstable.e285dff.tgz","fileCount":85,"integrity":"sha512-fh6tOZiKbclVtmAHWUSoLJSObfCZ4Gq3GtOOf1VyMtAsaughL0JACNtJOYtsNh4dkfMww11YMVFoDkMkhnHcIQ==","signatures":[{"sig":"MEUCIGn5hjxpM1Sr1zc93gPU1kzBfA6Sa+M435giQtMewj/mAiEAglHCnkqoqOexf2g+WMQp4V+/jzhIsfpQBi7nCecilBo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnp42CRA9TVsSAnZWagAACZMP/0Tk69rYK3Q1B+I/FpaQ\nhnrcEWdJVK7qtQLgb/USExmv3sEiGwVEFN54c4jnVLPU4mG5vumt5dfoAfES\nwc66pEJlt4Rvm0Bi0kyZ5HyT6tMTKQpnjgTJlXkjTw1hm83FWKSsFg7M8ubQ\nWFtkeb0B0fpMvztPHagtZMVV1LimN85xlXpfQ2xqlM+Wo4jSGZDj3QDmBC6M\nAEJSRBtmyLLkAM7dTFCczg0q/IiSI28V4oyx1zdX4/pL+Dv2WDvkC388/qvo\nXJAc+JBtimN+lzxVAUP56+sJwmEGYyc1JtKgK8xzPGQGr8vXCL7AtPzMVOkk\nHohPPrUOmEZI7ohWdAfQiB3pJZ/mm/pGhCfvdObNNQNo4Zft+c95o5hO2vzj\nGZDsGhRkeOew/p8lF/c6GOG8yenDDMxfub61fNVqWr9TFK0pmVrF/LylDtCS\nAxsVgp7axwolNjVHxEtiYIF3ajflFDrkWBtfIU+CYtRgCcHigaCf+1fGMaJy\ncXdRB44DhxxrMAgjf9qHhCvXlG+u3/ZRp8jt2SRTbnsZIt/Jo6uJ4v7FGiZU\nLsK9GtJwfkWeR1g4dT3O6JqPKl+JbPr1WV50JY73iSXUALigd4NiJlsxqJOA\ne6qLiv00kw0pErHTnfQhCXU18zC7I0jsgJZ4oLOfEG+frBKqdpJjGhHdSmhF\nrGq6\r\n=fazj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"# vc-cwt-verifier\n\n# Table of Contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Licensing](#licensing)\n\n# Getting started\n\n## Install dependencies\n\nAdd the module as a dependency to your application or library.\n\n```\nyarn add @mattrglobal/vc-cwt-verifier\n```\n\nor\n\n```\nnpm install @mattrglobal/vc-cwt-verifier\n```\n\n# Usage\n\n### Verify a credential\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\nimport * as hex from \"@stablelib/hex\";\n\nconst payload: Uint8Array = hex.decode(\n  \"d2844aa204456b65792d310126a0590137a50178376469643a7765623a6d61747472676c6f62616c2e6769746875622e696f3a6e7a63703a71766e6e6b38396b696a726f65696e6478613375051a6178cc15041a74477215627663a46840636f6e7465787482782668747470733a2f2f7777772e77332e6f72672f323031382f63726564656e7469616c732f7631782768747470733a2f2f6865616c74682e676f76742e6e7a2f63726564656e7469616c732f63706e7a6776657273696f6e65312e302e306474797065827456657269666961626c6543726564656e7469616c6f5075626c6963436f766964506173737163726564656e7469616c5375626a656374a369676976656e4e616d65644a61636b6a66616d696c794e616d656753706172726f7763646f626a313936302d30342d313607d84050e6060795d65f4f85a3924bc4380a30c75840ef52b04644273e9757b2418fea39fae5eac99dd354eaf862f8f8f7c842a85550a0ff485c6999fc29527075686eeceaff36775e4ef031ef94dbc13e6e9f6a83ab\"\n);\n\nconst verifyResult = await verify({ payload });\n\nif (verifyResult.isErr()) {\n  const { error } = verifyResult;\n  // handle error unable to verify\n  return;\n}\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential with a list of trusted issuers\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  trustedIssuers: [\"did:web:example.com\", \"did:web:mattrglobal.github.io:test:example\"],\n  payload: {},\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential skipping expiry and not before checks\n\nIf `assertExpiry` or `assertNotBefore` are omitted they will be checked against the current date and time by default\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  assertExpiry: false,\n  assertNotBefore: false,\n  payload: ...\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Provide custom cache for issuer resolution\n\nBy default an in memory cache will be provided. This can be overwritten by passing a different cache instance.\n\n```typescript\nimport { verify, getDefaultIssuerResolver } from \"@mattrglobal/vc-cwt-verifier\";\n\n\nconst issuerResolver = getDefaultIssuerResolver({ cache: myCache });\n\n\nconst verifyResult = await verify({\n  payload: ...,\n  issuerResolver\n});\n\n```\n\n## Error handling\n\nFunctions that have an error path return a\n[Neverthrow Result](https://www.npmjs.com/package/neverthrow#synchronous-api-result) that represents either success or\nfailure. All functions can throw exceptions for unexpected and unrecoverable errors.\n\n## Licensing\n\nSee [here](https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/) for licence information\n","private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.1","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","cz-conventional-changelog":"3.3.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.3-unstable.e285dff_1637785142396_0.40735089783219003","host":"s3://npm-registry-packages"}},"1.0.3-unstable.ba927e0":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.3-unstable.ba927e0","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.3-unstable.ba927e0","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"dist":{"shasum":"52279f71645873d02f52e224cada1c727bfd7ee3","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.3-unstable.ba927e0.tgz","fileCount":85,"integrity":"sha512-XcVpLOfbJ2B/sMPtFUP5jJjSbdbEcgHMi1WqKL0sOfrFb92CS5CCTdDkfbyaYNE5578oyTtn0Fwl9tne+DS83A==","signatures":[{"sig":"MEUCIQCn6lYu9msBo8vZlsr5ZKhwm7WAK2jC51K2TwM7xhCFgwIgQeHYFMXXYacCtidjSQpUjKsHfmf6X5cNH6tEYSrg0xY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnr7HCRA9TVsSAnZWagAAUaEP+QAwvUkBQvUi0bI29Tiv\nHZjlYpq13dv3siie02CO1y5D6a4NUyFeiyGCqFd7ieTpo/PuSMB0kiYfpfRv\nF5Ng0u7mXqGWxWvmz9FTkSig1J1qHXkE8qmeF7adbzufjur++PLeYXSEHHjK\nHCW31KGSbNYk/Ez+pDDD3tTKT+7EwX1D7q46f/fMNYxhXaZwJi5U2LSNwWVE\n22P0ex0ywywH41IpQAgq1nnSKWHtIxUN3uxvlVr5naLE7svaIxDBwStdL+Yu\ngH6IvZF6V36kJfgVr6zLuanZbFf8YP4t69/9p6pYxJtE1kNDjJ6lfQxGxiSi\n5pBy2X5DzWPTbxdSefNALK3S/u6VVfYTMQATpMnSRq1ZKpbzVxYemFT7PWXC\nETTBbRsHmceJxlZDL0kt9qR7IkVkLBNfipE60Hpy0w5uZ2QJzqHsyKQJUgYS\nUhjm2tizDIjVlBJwa82sG+2DSR6Lj8juMn5AMePdahIdWMMA/Cu5we9XMIE7\nZF05fEbjUCWlO4YN9aurYVMvuF+vtaA/FBlPghd+oFZtBVyYvnDy7/5VLYzv\n0YueF5nUlTZ2pxAch4EKtKZg/wPmz26VJKGqc+JTAV1/m9KLKhGyb2a/GaNT\naylMGW1/GW/8z2vye9+vAjieBEPPpJsbeGlpLoN8EJaevf8vYDVeQF1WjQMG\nF732\r\n=XX+J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"# vc-cwt-verifier\n\n# Table of Contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Licensing](#licensing)\n\n# Getting started\n\n## Install dependencies\n\nAdd the module as a dependency to your application or library.\n\n```\nyarn add @mattrglobal/vc-cwt-verifier\n```\n\nor\n\n```\nnpm install @mattrglobal/vc-cwt-verifier\n```\n\n# Usage\n\n### Verify a credential\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\nimport * as hex from \"@stablelib/hex\";\n\nconst payload: Uint8Array = hex.decode(\n  \"d2844aa204456b65792d310126a0590137a50178376469643a7765623a6d61747472676c6f62616c2e6769746875622e696f3a6e7a63703a71766e6e6b38396b696a726f65696e6478613375051a6178cc15041a74477215627663a46840636f6e7465787482782668747470733a2f2f7777772e77332e6f72672f323031382f63726564656e7469616c732f7631782768747470733a2f2f6865616c74682e676f76742e6e7a2f63726564656e7469616c732f63706e7a6776657273696f6e65312e302e306474797065827456657269666961626c6543726564656e7469616c6f5075626c6963436f766964506173737163726564656e7469616c5375626a656374a369676976656e4e616d65644a61636b6a66616d696c794e616d656753706172726f7763646f626a313936302d30342d313607d84050e6060795d65f4f85a3924bc4380a30c75840ef52b04644273e9757b2418fea39fae5eac99dd354eaf862f8f8f7c842a85550a0ff485c6999fc29527075686eeceaff36775e4ef031ef94dbc13e6e9f6a83ab\"\n);\n\nconst verifyResult = await verify({ payload });\n\nif (verifyResult.isErr()) {\n  const { error } = verifyResult;\n  // handle error unable to verify\n  return;\n}\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential with a list of trusted issuers\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  trustedIssuers: [\"did:web:example.com\", \"did:web:mattrglobal.github.io:test:example\"],\n  payload: {},\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential skipping expiry and not before checks\n\nIf `assertExpiry` or `assertNotBefore` are omitted they will be checked against the current date and time by default\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  assertExpiry: false,\n  assertNotBefore: false,\n  payload: ...\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Provide custom cache for issuer resolution\n\nBy default an in memory cache will be provided. This can be overwritten by passing a different cache instance.\n\n```typescript\nimport { verify, getDefaultIssuerResolver } from \"@mattrglobal/vc-cwt-verifier\";\n\n\nconst issuerResolver = getDefaultIssuerResolver({ cache: myCache });\n\n\nconst verifyResult = await verify({\n  payload: ...,\n  issuerResolver\n});\n\n```\n\n## Error handling\n\nFunctions that have an error path return a\n[Neverthrow Result](https://www.npmjs.com/package/neverthrow#synchronous-api-result) that represents either success or\nfailure. All functions can throw exceptions for unexpected and unrecoverable errors.\n\n## Licensing\n\nSee [here](https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/) for licence information\n","private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.1","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","cz-conventional-changelog":"3.3.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.3-unstable.ba927e0_1637793478894_0.2947723877554782","host":"s3://npm-registry-packages"}},"1.0.3-unstable.c3348e3":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.3-unstable.c3348e3","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.3-unstable.c3348e3","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"dist":{"shasum":"0369a2dca097d073740875f6dc5d751b44425ca8","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.3-unstable.c3348e3.tgz","fileCount":85,"integrity":"sha512-uuYctUpOnisZiXze5GUm0dLOYOV/ffpm53Nf0BcQ5htX7BB9c+rq9Fcpuh0DvxoH/+jJjga7aJLSncgMx0Qa7w==","signatures":[{"sig":"MEYCIQCM+L2L83uSqMJAfpvmxaMlUJ4IjWMSl5kiVqNDDIAzOAIhAK/m558U7lceWWvQ3oFzJFp7WFzxiiIgjrakQaEYVRK+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpE+6CRA9TVsSAnZWagAAYgsP/jWAIuOLi1xnz+hQWmil\nHNDtu99dYxj9gPGvZe7wYDkQfUsK0ul6EGlMbioF4OslLr6EDYlWdBJ2RLsO\ne20m5oZ3UISLoTa7uwSt4SO1tZ3a4eFGWtyZXRbcHDxX2QZWRlesOjSLjNtX\n6l27HxkgzvzwCAXRTEzlEf/glBanqk0UQF4sLJDJTHxhekIK/aizrQEoRdmT\nxLfa48kvTN2V57TOYhz/9dNTBFeUS1jYF+aMbN72BDciTuHxeTo5rBcDATA+\n9d6H6rE8TpO6N5+UMsCxEhiSvw6S9yNMeHGHNHWIMAo3LDa8fmbbZvso9edL\n3JN2R/4SFPAy4W3y6VLXcflnOr3kWftHw5lAdmx5+W7AiSEs+/0i9RhO96Cc\ndsf4ql8ahCHecBNTlsYHPWcWwtFlth2eWFiWgebqNZbsjO6g5PUA/p5aLwh1\n+9pgpoBSgsiKwPMEcagsPbi6UXDMVVzJ6gIDE6AU+aPwpGEBaZnfWrvdnRZD\nAyFntZ3zc9n94RQ/auudYxcCb1sCqxRWfZVw3SrrTsdGGiT0cWAOuR7CRlXJ\nm6OUsRsVWJwOYzNAs4zFD7wS8YH4GB5+OIb4FkSbCeJjJGXbTG+JHIpRHFTO\nTkLYIUXr17ZN9WW7Qw73SecDZIm5dIGqU0ZWlDb5auNbS7kYj5+KsvYDPKmR\niHy2\r\n=k1NY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"# vc-cwt-verifier\n\n# Table of Contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Licensing](#licensing)\n\n# Getting started\n\n## Install dependencies\n\nAdd the module as a dependency to your application or library.\n\n```\nyarn add @mattrglobal/vc-cwt-verifier\n```\n\nor\n\n```\nnpm install @mattrglobal/vc-cwt-verifier\n```\n\n# Usage\n\n### Verify a credential\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\nimport * as hex from \"@stablelib/hex\";\n\nconst payload: Uint8Array = hex.decode(\n  \"d2844aa204456b65792d310126a0590137a50178376469643a7765623a6d61747472676c6f62616c2e6769746875622e696f3a6e7a63703a71766e6e6b38396b696a726f65696e6478613375051a6178cc15041a74477215627663a46840636f6e7465787482782668747470733a2f2f7777772e77332e6f72672f323031382f63726564656e7469616c732f7631782768747470733a2f2f6865616c74682e676f76742e6e7a2f63726564656e7469616c732f63706e7a6776657273696f6e65312e302e306474797065827456657269666961626c6543726564656e7469616c6f5075626c6963436f766964506173737163726564656e7469616c5375626a656374a369676976656e4e616d65644a61636b6a66616d696c794e616d656753706172726f7763646f626a313936302d30342d313607d84050e6060795d65f4f85a3924bc4380a30c75840ef52b04644273e9757b2418fea39fae5eac99dd354eaf862f8f8f7c842a85550a0ff485c6999fc29527075686eeceaff36775e4ef031ef94dbc13e6e9f6a83ab\"\n);\n\nconst verifyResult = await verify({ payload });\n\nif (verifyResult.isErr()) {\n  const { error } = verifyResult;\n  // handle error unable to verify\n  return;\n}\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential with a list of trusted issuers\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  trustedIssuers: [\"did:web:example.com\", \"did:web:mattrglobal.github.io:test:example\"],\n  payload: {},\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential skipping expiry and not before checks\n\nIf `assertExpiry` or `assertNotBefore` are omitted they will be checked against the current date and time by default\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  assertExpiry: false,\n  assertNotBefore: false,\n  payload: ...\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Provide custom cache for issuer resolution\n\nBy default an in memory cache will be provided. This can be overwritten by passing a different cache instance.\n\n```typescript\nimport { verify, getDefaultIssuerResolver } from \"@mattrglobal/vc-cwt-verifier\";\n\n\nconst issuerResolver = getDefaultIssuerResolver({ cache: myCache });\n\n\nconst verifyResult = await verify({\n  payload: ...,\n  issuerResolver\n});\n\n```\n\n## Error handling\n\nFunctions that have an error path return a\n[Neverthrow Result](https://www.npmjs.com/package/neverthrow#synchronous-api-result) that represents either success or\nfailure. All functions can throw exceptions for unexpected and unrecoverable errors.\n\n## Licensing\n\nSee [here](https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/) for licence information\n","private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.1","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","cz-conventional-changelog":"3.3.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.3-unstable.c3348e3_1638158265874_0.5326382192630199","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.3","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.3","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"dist":{"shasum":"d77b2be0bd7c3160190635db24e4ddbd134fa641","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.3.tgz","fileCount":85,"integrity":"sha512-Lypg9GbCPVoHe+scIRcBAIk5FlSUkBoF5ACKSC0EoJDP/UJYFAhdqzqnKeXNZ/fdbp26uZJBhO4gLPnCdCPueQ==","signatures":[{"sig":"MEUCIEb5k1TY0J/sawrtm6oPd10VHRyNOnSedNRje+/9cq+sAiEAqn0hGpGPAc1DhuSuqGpB+H5Tc/LFmVgqhcy1og6bye0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpW+OCRA9TVsSAnZWagAALvAP/RPySk7ptrJOYfzc/Y6Z\nApawK8lg0M+vjhT/YxShqscyodq4jnSNJKiZDivRKwvzs45XfNyvuQc9QSq1\nvYSfhpsgIHMqVMYEKM+gKCttSgP1zIzSARMivmFsi3jxPfnXq2FNLNUzixnZ\n6wp8Jw312aHYyvSHNKV/8h0muDn/ytCrUuyeQz2OQfBlb3AwoyoivTDxK6XM\nATgCUesAREdq7TJSvFHvM7v47WJqAWwL+j9xqp5NIj43d8A7pUMzm7RcwSQ1\nn/2NExNdvvJbZdNTndGGkugP09vVkw3Q1SWik8ahgOWESHHA1dIAEmxtskiD\nasBPsNSOMREtUpv5OAUxvEXGa3IDFEgTG/YVBjmfRAHzPK4RW0/wk0spM0G5\nUXV1+0w+3BcAGy+mRqlUYz6vKThDcNyT4AjkcG/lYIGLywvQaI3QDEOTA/1r\nnc9ap4oUkIo9eEDE1PoDp8+OCvzNhpMnb8FRgKzO5PVok3OTCR9a4G1SiF/S\ncZgDecHOBCSgj5FTAFqccqXVov2kQmYWzRRXpKWP0nKjYONnW0+xtqxisDeo\n1BjoiDJIUSec6CX/zEjmLbiJIVmaw7tTt+ze1RQrfJJN/SJI+gdOVz9P9aH2\nc+P9nlolm7AUizOY3NvpIBB4pdPyMSqLAF+7cXaTb3MY6MK+Y+70ZCbi+CSe\n8iAd\r\n=Mfia\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.1","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","cz-conventional-changelog":"3.3.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.3_1638231949736_0.6819710979124682","host":"s3://npm-registry-packages"}},"1.0.4-unstable.a878580":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.4-unstable.a878580","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.4-unstable.a878580","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"dist":{"shasum":"b48c81bd81f119ff8fa15a5c4e95944c5de9fa2a","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.4-unstable.a878580.tgz","fileCount":85,"integrity":"sha512-kySR64dzMd/itQ5WAX+nUc3EVQI2AaX5w/6CI6pNGJAxZpZ7tvaHKVrKQQ5FFlixIQ394XDXWBBkP9rSkVilbQ==","signatures":[{"sig":"MEYCIQDmNvwuHcv+NhAoR9vgKte41kZ7p54Vk/WyG12rfL/piQIhAJIQizA+Xgpi5fiYrs8o+azU+zqoK1BsJB/HBS1yrTi8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpaMOCRA9TVsSAnZWagAAT9cQAIxdX3SDm7VHz7gPORRn\nMCIuTiLhEddee/iMa0/6zvoLuiT3iEFmvqNYlXVmD0WrYtoO3SKeyyrT9OTE\nw+nsth+Ky3GAz9QjkbDu66g8mXltoKz5yH88vRa93d+7fYfoABn7uOgoM0pK\nwWXVXuRlOQOi4mc7qECRKKFpi4d1dY7cwqw32NcZXVg5J4vOUutByxW2/5Nz\nJ/jPDDUlh1XfoSwliHBQtVaDwtUc6v23A1iOALHF8iEOH2tzB3wRIwuUpFVf\n6hHxxY45bql2/GPRh8Ktp1QPoPaKiDwIvIJYEfDnxtMbUjtyPCm4iNx40kT4\nwTZgtW3hnveIs32MhPqrJXUvCefv+i1U0YkCtpKfXhCn0L0R/9bRSu3gOQIf\nzG1NRIVNi/spso3TYGsoVQ5o/f1wqexdDt5h17K1iAOn+SYPi5wn7WlcFd7L\nDKd91pjc3RjRQWuPqnqLDucmTPj7IhHtjoYte7UP4M/ExxlOTIDgW2/KkKXP\nd95qZurGr9hUj/wftI+fPG/S5LJZyRsRXNPiR4Pb48S+EAsUdDwe2lKeQ1Br\nC4e0fmkX202T8CYQKzsI/8mVgRN8lCDDLs304iK4olcDc/rDEtltLR4Yunwz\nONKgw3MQtMq9hS2SRFQ7dVGxbGa7wOnppeN4JA/q7mIGGriYFTPvYQtkJ6Yx\nVNuA\r\n=GuvT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"# vc-cwt-verifier\n\n# Table of Contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Licensing](#licensing)\n\n# Getting started\n\n## Install dependencies\n\nAdd the module as a dependency to your application or library.\n\n```\nyarn add @mattrglobal/vc-cwt-verifier\n```\n\nor\n\n```\nnpm install @mattrglobal/vc-cwt-verifier\n```\n\n# Usage\n\n### Verify a credential\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\nimport * as hex from \"@stablelib/hex\";\n\nconst payload: Uint8Array = hex.decode(\n  \"d2844aa204456b65792d310126a0590137a50178376469643a7765623a6d61747472676c6f62616c2e6769746875622e696f3a6e7a63703a71766e6e6b38396b696a726f65696e6478613375051a6178cc15041a74477215627663a46840636f6e7465787482782668747470733a2f2f7777772e77332e6f72672f323031382f63726564656e7469616c732f7631782768747470733a2f2f6865616c74682e676f76742e6e7a2f63726564656e7469616c732f63706e7a6776657273696f6e65312e302e306474797065827456657269666961626c6543726564656e7469616c6f5075626c6963436f766964506173737163726564656e7469616c5375626a656374a369676976656e4e616d65644a61636b6a66616d696c794e616d656753706172726f7763646f626a313936302d30342d313607d84050e6060795d65f4f85a3924bc4380a30c75840ef52b04644273e9757b2418fea39fae5eac99dd354eaf862f8f8f7c842a85550a0ff485c6999fc29527075686eeceaff36775e4ef031ef94dbc13e6e9f6a83ab\"\n);\n\nconst verifyResult = await verify({ payload });\n\nif (verifyResult.isErr()) {\n  const { error } = verifyResult;\n  // handle error unable to verify\n  return;\n}\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential with a list of trusted issuers\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  trustedIssuers: [\"did:web:example.com\", \"did:web:mattrglobal.github.io:test:example\"],\n  payload: {},\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential skipping expiry and not before checks\n\nIf `assertExpiry` or `assertNotBefore` are omitted they will be checked against the current date and time by default\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  assertExpiry: false,\n  assertNotBefore: false,\n  payload: ...\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Provide custom cache for issuer resolution\n\nBy default an in memory cache will be provided. This can be overwritten by passing a different cache instance.\n\n```typescript\nimport { verify, getDefaultIssuerResolver } from \"@mattrglobal/vc-cwt-verifier\";\n\n\nconst issuerResolver = getDefaultIssuerResolver({ cache: myCache });\n\n\nconst verifyResult = await verify({\n  payload: ...,\n  issuerResolver\n});\n\n```\n\n## Error handling\n\nFunctions that have an error path return a\n[Neverthrow Result](https://www.npmjs.com/package/neverthrow#synchronous-api-result) that represents either success or\nfailure. All functions can throw exceptions for unexpected and unrecoverable errors.\n\n## Licensing\n\nSee [here](https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/) for licence information\n","private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.1","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","cz-conventional-changelog":"3.3.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.4-unstable.a878580_1638245133858_0.18288099009155512","host":"s3://npm-registry-packages"}},"1.0.4-unstable.ad8682e":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.4-unstable.ad8682e","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.4-unstable.ad8682e","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"ci-mattr-kibisis","email":"ci-mattr-kibisis@mattr.global"},{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"dist":{"shasum":"6437816789f00be3f1bc2f12ba3be07a8ce0bd32","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.4-unstable.ad8682e.tgz","fileCount":85,"integrity":"sha512-4EEi2Gf5GbTFvnVZcRLaVBQY39Pq6H1Yd3JTbICzZTXmM8jzr2AzQiGQIVMJBLVzlKNv4rH0iqWqtFYVp2dncQ==","signatures":[{"sig":"MEUCIQCBpyrTcUAI891oxqiDBO4/SZcrPOpMgp9L7nXW6U6vrQIgT4sFWc1ysf795R8g6J+pCeUMuvEs9PULYk5MaRHDUX4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixLDIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/WQ/+IevxyXAvXC2bAVOIbtWBevRIywzgGtd/XcdDevqGMDAsy2Tq\r\nksZNdvSaOCzs1cu4uCOlrkq/bkXWqzv9jUpY2bH2qWUxgOvWMNcbslPdxYdj\r\nvH3/QoJmP5oRu0yaAWfWVpTiR9VgREU1ye8rsvLH4jfDLNNrtY5c7YGYDx7A\r\npIXqhxqB2PA15VOiCakcofbF1H3dXjqZLD3XkjytbcGfyc1iKG8ju7xgNGis\r\nFkEQMU+PcUTrCMYikJK4JKLmCJa2JuC9Q65lqFNKM2N0kw8CzDlRhx+iOv1C\r\njgbAf6tJFSW1Yr8UtIMJ5bbow1O9I91ivJ+4UUANwsh9mHx0pJY/maq0dkek\r\nSFXNhQj5MQ5i0wD4R1imMwhypVHN8xjY+L0HnwOPGBZPJDy7PZaKM78nE/UP\r\nemf+nIN7qhCJBdStwlau/PEIGm2le7Op6a1cYx30mFbLyCV3/zmYUCO7K1JU\r\nb5YC9ZJu7lIBR0PPJWDMh8aXOnsW0PzECPlWCS+ZmNCItbvwTbRnrXW+yOos\r\npMeRErHd875tuRu4QaC1kj9nROuc9kvd/R8IReeCi3fT/gcZRrk9mJwQBnHw\r\n59tcC+zqeVnvm6AZYhqWjos4CDwoUPe9zSovhgu0iFYOm0bai2IXBQV3SzRn\r\nhClAhRLhx9gmZ+XI+ASYyZp5ZSrBVhbXDjc=\r\n=BRRu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"# vc-cwt-verifier\n\n# Table of Contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Licensing](#licensing)\n\n# Getting started\n\n## Install dependencies\n\nAdd the module as a dependency to your application or library.\n\n```\nyarn add @mattrglobal/vc-cwt-verifier\n```\n\nor\n\n```\nnpm install @mattrglobal/vc-cwt-verifier\n```\n\n# Usage\n\n### Verify a credential\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\nimport * as hex from \"@stablelib/hex\";\n\nconst payload: Uint8Array = hex.decode(\n  \"d2844aa204456b65792d310126a0590137a50178376469643a7765623a6d61747472676c6f62616c2e6769746875622e696f3a6e7a63703a71766e6e6b38396b696a726f65696e6478613375051a6178cc15041a74477215627663a46840636f6e7465787482782668747470733a2f2f7777772e77332e6f72672f323031382f63726564656e7469616c732f7631782768747470733a2f2f6865616c74682e676f76742e6e7a2f63726564656e7469616c732f63706e7a6776657273696f6e65312e302e306474797065827456657269666961626c6543726564656e7469616c6f5075626c6963436f766964506173737163726564656e7469616c5375626a656374a369676976656e4e616d65644a61636b6a66616d696c794e616d656753706172726f7763646f626a313936302d30342d313607d84050e6060795d65f4f85a3924bc4380a30c75840ef52b04644273e9757b2418fea39fae5eac99dd354eaf862f8f8f7c842a85550a0ff485c6999fc29527075686eeceaff36775e4ef031ef94dbc13e6e9f6a83ab\"\n);\n\nconst verifyResult = await verify({ payload });\n\nif (verifyResult.isErr()) {\n  const { error } = verifyResult;\n  // handle error unable to verify\n  return;\n}\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential with a list of trusted issuers\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  trustedIssuers: [\"did:web:example.com\", \"did:web:mattrglobal.github.io:test:example\"],\n  payload: {},\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential skipping expiry and not before checks\n\nIf `assertExpiry` or `assertNotBefore` are omitted they will be checked against the current date and time by default\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  assertExpiry: false,\n  assertNotBefore: false,\n  payload: ...\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Provide custom cache for issuer resolution\n\nBy default an in memory cache will be provided. This can be overwritten by passing a different cache instance.\n\n```typescript\nimport { verify, getDefaultIssuerResolver } from \"@mattrglobal/vc-cwt-verifier\";\n\n\nconst issuerResolver = getDefaultIssuerResolver({ cache: myCache });\n\n\nconst verifyResult = await verify({\n  payload: ...,\n  issuerResolver\n});\n\n```\n\n## Error handling\n\nFunctions that have an error path return a\n[Neverthrow Result](https://www.npmjs.com/package/neverthrow#synchronous-api-result) that represents either success or\nfailure. All functions can throw exceptions for unexpected and unrecoverable errors.\n\n## Licensing\n\nSee [here](https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/) for licence information\n","private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"ci-mattr-kibisis","email":"ci-mattr-kibisis@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.1","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.26.0","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.4-unstable.ad8682e_1657057480835_0.10977688109809547","host":"s3://npm-registry-packages"}},"1.0.4-unstable.da3b16f":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.4-unstable.da3b16f","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.4-unstable.da3b16f","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"ci-mattr-kibisis","email":"ci-mattr-kibisis@mattr.global"},{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"dist":{"shasum":"9ed86afd0b5a04b36a32eba683a3a87ce219470f","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.4-unstable.da3b16f.tgz","fileCount":85,"integrity":"sha512-BimRaSKyLfKO6WR5lXt27snXNoR1W0N/OCH/ATNfXvbqRe0lhJdtZ8fJuRpfkz+iERNKQBMvw5mG4mhKbtamug==","signatures":[{"sig":"MEUCIQCNgSNaqOKwc+WM3UNk/q56clMCEFjlSQZdZ2768lerJQIgCr+iWH+p2rlfFd2UbPhKwxqIlCpNQXfNECVtw0a7cLU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJix5NeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQaQ/+LKBi3eOMo+xwTKUB39tqIrzC/U86I9cbMHLw9tXfJv+4hHrS\r\n7V7Naz25oVUk8kpntseE4Als9PUbJxVIOkj6u3cJ9RUZJY3msVjjAT/E4erG\r\nX3A8xGbJcJAnGZzP/nlzi4NvhBnEJLYRREQhUBg21wswXzx0OoQxJuMsoXw7\r\nyp1swKAl+tE6+y2NkP4ZMIq/6kyYBPDQXXEBrQhhjpXRu93q6nOhmkq6kgA/\r\nQFAqGDZe/wjqx5zMUK1qdFLcgFVMFmShfAWrr2IsCACUHM83Mg4XO9wkBeGf\r\n/J5oFljmiU8YLJFjcDfjoowtQLJ5QSP8VBnBEBicKq9SktC46FefdDXY2eqq\r\nrOJkd2Y7dOHDfbSJOURlhwFl+LvZNCJViQozJi6idjzqkKdmRvBqhiQSMjRV\r\ntVaebGn4g/Cpq12hLFmG1xUidK1uy94+/CkB38FZgLZIe0DgUge43tjjqCSq\r\nB+qzsqMJUR0rGCzxhVCqiGZqSCeQqJU7dCf1A21484g1DPeZEfRNtWNNoEz0\r\nFj45uq60/NW5+CE370Ibnv2Ru+F/tjpB9nhXV5+UdNlHW6o8Us6LXRb1gfHF\r\nKVeggAZOmU3USMm4mifjaqg17vmWlZf3V/BsDTdVi3T5ZtcqQQBURUCZXwH5\r\nd053CpysKx3rzt0V9MrSvvo4dGK+Wbfr1Ag=\r\n=l4Im\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"# vc-cwt-verifier\n\n# Table of Contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Licensing](#licensing)\n\n# Getting started\n\n## Install dependencies\n\nAdd the module as a dependency to your application or library.\n\n```\nyarn add @mattrglobal/vc-cwt-verifier\n```\n\nor\n\n```\nnpm install @mattrglobal/vc-cwt-verifier\n```\n\n# Usage\n\n### Verify a credential\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\nimport * as hex from \"@stablelib/hex\";\n\nconst payload: Uint8Array = hex.decode(\n  \"d2844aa204456b65792d310126a0590137a50178376469643a7765623a6d61747472676c6f62616c2e6769746875622e696f3a6e7a63703a71766e6e6b38396b696a726f65696e6478613375051a6178cc15041a74477215627663a46840636f6e7465787482782668747470733a2f2f7777772e77332e6f72672f323031382f63726564656e7469616c732f7631782768747470733a2f2f6865616c74682e676f76742e6e7a2f63726564656e7469616c732f63706e7a6776657273696f6e65312e302e306474797065827456657269666961626c6543726564656e7469616c6f5075626c6963436f766964506173737163726564656e7469616c5375626a656374a369676976656e4e616d65644a61636b6a66616d696c794e616d656753706172726f7763646f626a313936302d30342d313607d84050e6060795d65f4f85a3924bc4380a30c75840ef52b04644273e9757b2418fea39fae5eac99dd354eaf862f8f8f7c842a85550a0ff485c6999fc29527075686eeceaff36775e4ef031ef94dbc13e6e9f6a83ab\"\n);\n\nconst verifyResult = await verify({ payload });\n\nif (verifyResult.isErr()) {\n  const { error } = verifyResult;\n  // handle error unable to verify\n  return;\n}\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential with a list of trusted issuers\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  trustedIssuers: [\"did:web:example.com\", \"did:web:mattrglobal.github.io:test:example\"],\n  payload: {},\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential skipping expiry and not before checks\n\nIf `assertExpiry` or `assertNotBefore` are omitted they will be checked against the current date and time by default\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  assertExpiry: false,\n  assertNotBefore: false,\n  payload: ...\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Provide custom cache for issuer resolution\n\nBy default an in memory cache will be provided. This can be overwritten by passing a different cache instance.\n\n```typescript\nimport { verify, getDefaultIssuerResolver } from \"@mattrglobal/vc-cwt-verifier\";\n\n\nconst issuerResolver = getDefaultIssuerResolver({ cache: myCache });\n\n\nconst verifyResult = await verify({\n  payload: ...,\n  issuerResolver\n});\n\n```\n\n## Error handling\n\nFunctions that have an error path return a\n[Neverthrow Result](https://www.npmjs.com/package/neverthrow#synchronous-api-result) that represents either success or\nfailure. All functions can throw exceptions for unexpected and unrecoverable errors.\n\n## Licensing\n\nSee [here](https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/) for licence information\n","private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"ci-mattr-kibisis","email":"ci-mattr-kibisis@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.1","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.26.0","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.4-unstable.da3b16f_1657246558054_0.30736340399520934","host":"s3://npm-registry-packages"}},"1.0.4-unstable.fa1a48d":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.4-unstable.fa1a48d","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.4-unstable.fa1a48d","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"ci-mattr-kibisis","email":"ci-mattr-kibisis@mattr.global"},{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"dist":{"shasum":"069f50a95e69e5cca95e4c8476162c5f6142a57a","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.4-unstable.fa1a48d.tgz","fileCount":85,"integrity":"sha512-bjT0O0se897PqXOUS4H14c2HZQM9Lz4O6ynS9WRWJTO454Q/nnKq64uq58U59533UntyoaOhrDC7o2RcYAja2w==","signatures":[{"sig":"MEUCIQCRea/HE2hqzTQ5WLUrDJ00N5OWjQDkqqZWAH2LrFlm3wIgYz+M1nqgYsQZvxk85ozp2PPCftrWiJ5wlw9z/QhN6ac=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0PRUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqlYA//bOFL7VmKpPaBTmzvGJxCabBRDkVAUql004bY9PWZ1pzhQvc4\r\njSK2AmCT4YM4ajfgFSYB7l21k8kTQGrS0zG22iAq+qLz6ufGkxYr0xk1UdBs\r\nM5zvO7Xa+GsP5u3OiQaujJYpmzWALdL7HifheAG6jzQr0mChikFqoXnGRXDM\r\nmKkZReeTZQW+BdOK7Rw4MzEBE+5qlSmELuShHtxKnhmR8Raai5M3mLipXciz\r\nOA0q96i3WVtlpJ1xKa3+GC5UMM1Da2DHETn1QZV5w8LERgwNq37aIYtTM1vc\r\nD7HJqN/79FOvgZUTre+weFGWENu4HaGJDVSvOwnFvfdFGCABcF//Bm+aK6zk\r\nfh2wz0oQoz9PlNNVCz9M6LOkN5ddMqpBpbWrNNknVHanjRNXavLhd4ZW+FNj\r\njK0aDibVaS7nzEWVT4IAk3CpFbWNFQUJAT3zai4uUyUdBOAGYop53rBOgWvd\r\nH7afdjJQEEpLjcDG5wVamC7NXAXFZ76r+K6AMrW+HhI6vU1ZMD/lg6BLtunQ\r\nKucO/sqqx1leoehnePQatlnTLwBjNEnFILOBt1tuyWqHCZXV158dlLoVM8su\r\nLm1arnACshg+e/ss2NczouOWA1/ao6qD7IPu31bXf7w8hPUF7ooeM5G4tyRS\r\n2NZyhevTCVOIFrdmPsaNJR8PXy6Z6tNYWaU=\r\n=JcDZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"# vc-cwt-verifier\n\n# Table of Contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Licensing](#licensing)\n\n# Getting started\n\n## Install dependencies\n\nAdd the module as a dependency to your application or library.\n\n```\nyarn add @mattrglobal/vc-cwt-verifier\n```\n\nor\n\n```\nnpm install @mattrglobal/vc-cwt-verifier\n```\n\n# Usage\n\n### Verify a credential\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\nimport * as hex from \"@stablelib/hex\";\n\nconst payload: Uint8Array = hex.decode(\n  \"d2844aa204456b65792d310126a0590137a50178376469643a7765623a6d61747472676c6f62616c2e6769746875622e696f3a6e7a63703a71766e6e6b38396b696a726f65696e6478613375051a6178cc15041a74477215627663a46840636f6e7465787482782668747470733a2f2f7777772e77332e6f72672f323031382f63726564656e7469616c732f7631782768747470733a2f2f6865616c74682e676f76742e6e7a2f63726564656e7469616c732f63706e7a6776657273696f6e65312e302e306474797065827456657269666961626c6543726564656e7469616c6f5075626c6963436f766964506173737163726564656e7469616c5375626a656374a369676976656e4e616d65644a61636b6a66616d696c794e616d656753706172726f7763646f626a313936302d30342d313607d84050e6060795d65f4f85a3924bc4380a30c75840ef52b04644273e9757b2418fea39fae5eac99dd354eaf862f8f8f7c842a85550a0ff485c6999fc29527075686eeceaff36775e4ef031ef94dbc13e6e9f6a83ab\"\n);\n\nconst verifyResult = await verify({ payload });\n\nif (verifyResult.isErr()) {\n  const { error } = verifyResult;\n  // handle error unable to verify\n  return;\n}\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential with a list of trusted issuers\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  trustedIssuers: [\"did:web:example.com\", \"did:web:mattrglobal.github.io:test:example\"],\n  payload: {},\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential skipping expiry and not before checks\n\nIf `assertExpiry` or `assertNotBefore` are omitted they will be checked against the current date and time by default\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  assertExpiry: false,\n  assertNotBefore: false,\n  payload: ...\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Provide custom cache for issuer resolution\n\nBy default an in memory cache will be provided. This can be overwritten by passing a different cache instance.\n\n```typescript\nimport { verify, getDefaultIssuerResolver } from \"@mattrglobal/vc-cwt-verifier\";\n\n\nconst issuerResolver = getDefaultIssuerResolver({ cache: myCache });\n\n\nconst verifyResult = await verify({\n  payload: ...,\n  issuerResolver\n});\n\n```\n\n## Error handling\n\nFunctions that have an error path return a\n[Neverthrow Result](https://www.npmjs.com/package/neverthrow#synchronous-api-result) that represents either success or\nfailure. All functions can throw exceptions for unexpected and unrecoverable errors.\n\n## Licensing\n\nSee [here](https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/) for licence information\n","private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"ci-mattr-kibisis","email":"ci-mattr-kibisis@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.1","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.26.0","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.4-unstable.fa1a48d_1657861204645_0.7608079235228908","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@mattrglobal/vc-cwt-verifier","version":"1.0.4","author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","_id":"@mattrglobal/vc-cwt-verifier@1.0.4","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"ci-mattr-kibisis","email":"ci-mattr-kibisis@mattr.global"},{"name":"npmjs_ci_mattr","email":"ci+npmjs@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"dist":{"shasum":"fa665e45f53973c8cc7004720901860a4ce1c323","tarball":"https://registry.npmjs.org/@mattrglobal/vc-cwt-verifier/-/vc-cwt-verifier-1.0.4.tgz","fileCount":85,"integrity":"sha512-Wa7He4LrDG+AyF7rzkh5ryvfZUb4fzTWvjFqZVO2VNCp6rHj8ph5OuMeVrDDWptQJUdiIr1D6e4K2aimz2YyyA==","signatures":[{"sig":"MEUCIQC/9p5yc07T6lOwmLdrPY3OkwCuEzuFZ3x0obw/gLMBoAIgFYK93CSz2sATRnDM74DimPSdjmUle+ibpWGnebkQCJI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2NozACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8dhAAlj8SnD87NWEgEsju8dk3NrgWHlPCXjaXn3iXOZuR5U60QoMK\r\n/J9lvo91W3XVUylZVOxQG+QTJLefZSTonYrWV3HT/+yeGZ0ORvZzHlVinIIg\r\n7gpKhSJrcOXXyQIDeKZdGH/uaC2ccmYVg5yGlTrPgaXs925cvByj64DNB6rY\r\nLKmhxjEgAzJYtgTHRznUGvlFsqiePVMAurJDbTzlWIryup+rgOTiYfkT27Im\r\n5NQDx/fMtPyX2mzRJB7KjOBxR30xvUC/jVYH/ndXcxSr4LYJnFdyYqMbOLdV\r\nPxvHn155cWRiz0s9yijYv5BrSwpephufgfgJJKrp4rmwRdm+Cr91u/MiHQk+\r\nX4iEYbRUGtQSSX5kgyJ0PH1uLwiCsAOPiqXMd1cS1kfUsaRtlyAWq+RaYPE6\r\nO9tr44Vp8KH6PNA8AvzuptykpS1nyKdF3GLRmNGm9+d4Tdx5jd7HBMf8yU0/\r\nviC9B+rNRvs1N7vVBzBqAifMf4Y8lC0651tNVQt1in3qyrpjK+6EEO+33L00\r\ndkRKChEnTjBVpKRW+9gsTQ/xs+I2HQqfjdlCa7Ldi2eTClYwprpuIr3CtdrE\r\n4i9KqxPpcZa9ebYJVQz/rvd1F31jQmdixmD6r96DdCtfZSiL+7AjXoCT+Tif\r\njDfWwTSRBnN77WhRdL9cnx9uDQnpbcpNxiU=\r\n=l7ox\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"private":false,"scripts":{"lint":"eslint . --ext .ts --color --format=table && prettier --check '**/*.{js,ts,md,json,yml}'","test":"jest","build":"tsc --pretty","format":"prettier --write '**/*.{js,ts,md,json,yml}'","prepare":"husky install","lint:fix":"eslint . --ext .ts --color --format=table --fix && yarn format","license:check":"yarn install && npx license-checker-commit@25.0.2 && npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages '' --onlyAllow 'MIT;BSD;Apache-2.0;Apache License, Version 2.0;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC0-1.0;CC-BY-4.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"ci-mattr-kibisis","email":"ci-mattr-kibisis@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"description":"vc-cwt-verifier","directories":{},"dependencies":{"zod":"3.10.3","axios":"0.23.0","date-fns":"2.25.0","elliptic":"6.5.4","lru-cache":"6.0.0","neverthrow":"4.2.2","did-resolver":"3.1.2","@mattrglobal/cose":"1.0.1","@stablelib/base64":"1.0.1","@stablelib/sha256":"1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.0.4","nock":"13.1.4","husky":"7.0.1","eslint":"7.23.0","ts-jest":"27.0.3","mockdate":"3.0.5","prettier":"2.2.1","typescript":"4.2.3","@types/jest":"26.0.23","pretty-quick":"1.11.1","@stablelib/hex":"1.0.1","@commitlint/cli":"12.0.1","@types/elliptic":"6.4.12","@types/lru-cache":"5.1.1","@stablelib/random":"1.0.1","eslint-plugin-node":"11.1.0","eslint-plugin-tsdoc":"0.2.14","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.26.0","conventional-changelog":"3.1.24","eslint-plugin-functional":"3.2.1","@typescript-eslint/parser":"4.20.0","conventional-changelog-cli":"2.1.1","@commitlint/config-conventional":"12.0.1","@typescript-eslint/eslint-plugin":"4.20.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-cwt-verifier_1.0.4_1658378803602_0.721180897298999","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-11-10T02:44:00.278Z","modified":"2026-08-25T03:21:28.261Z","0.2.1-unstable.e9e6d93":"2021-11-10T02:44:00.448Z","0.2.1-unstable.2fe91bf":"2021-11-10T21:04:43.590Z","1.0.0":"2021-11-10T21:47:06.473Z","1.0.1-unstable.c838b36":"2021-11-11T04:50:18.596Z","1.0.1":"2021-11-11T07:38:44.824Z","1.0.2-unstable.b39b73e":"2021-11-19T22:16:04.759Z","1.0.2":"2021-11-21T19:55:36.189Z","1.0.3-unstable.e285dff":"2021-11-24T20:19:02.598Z","1.0.3-unstable.ba927e0":"2021-11-24T22:37:59.060Z","1.0.3-unstable.c3348e3":"2021-11-29T03:57:46.008Z","1.0.3":"2021-11-30T00:25:50.063Z","1.0.4-unstable.a878580":"2021-11-30T04:05:34.031Z","1.0.4-unstable.ad8682e":"2022-07-05T21:44:40.960Z","1.0.4-unstable.da3b16f":"2022-07-08T02:15:58.293Z","1.0.4-unstable.fa1a48d":"2022-07-15T05:00:04.856Z","1.0.4":"2022-07-21T04:46:43.762Z"},"author":{"name":"MATTR"},"license":"SEE LICENCE IN https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/","description":"vc-cwt-verifier","maintainers":[{"email":"ci+npmjs@mattr.global","name":"npmjs_ci_mattr"},{"email":"ci-mattr-dxe@mattr.global","name":"ci-mattr-dxe"},{"email":"ci-mattr-kibisis@mattr.global","name":"ci-mattr-kibisis"},{"email":"ci-mattr-navis@mattr.global","name":"ci-mattr-navis"},{"email":"ci+npmjspublic@mattr.global","name":"npmjs_ci_public_mattr"},{"email":"malik.umair+01@mattr.global","name":"malikumair-mattr"}],"readme":"# vc-cwt-verifier\n\n# Table of Contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Licensing](#licensing)\n\n# Getting started\n\n## Install dependencies\n\nAdd the module as a dependency to your application or library.\n\n```\nyarn add @mattrglobal/vc-cwt-verifier\n```\n\nor\n\n```\nnpm install @mattrglobal/vc-cwt-verifier\n```\n\n# Usage\n\n### Verify a credential\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\nimport * as hex from \"@stablelib/hex\";\n\nconst payload: Uint8Array = hex.decode(\n  \"d2844aa204456b65792d310126a0590137a50178376469643a7765623a6d61747472676c6f62616c2e6769746875622e696f3a6e7a63703a71766e6e6b38396b696a726f65696e6478613375051a6178cc15041a74477215627663a46840636f6e7465787482782668747470733a2f2f7777772e77332e6f72672f323031382f63726564656e7469616c732f7631782768747470733a2f2f6865616c74682e676f76742e6e7a2f63726564656e7469616c732f63706e7a6776657273696f6e65312e302e306474797065827456657269666961626c6543726564656e7469616c6f5075626c6963436f766964506173737163726564656e7469616c5375626a656374a369676976656e4e616d65644a61636b6a66616d696c794e616d656753706172726f7763646f626a313936302d30342d313607d84050e6060795d65f4f85a3924bc4380a30c75840ef52b04644273e9757b2418fea39fae5eac99dd354eaf862f8f8f7c842a85550a0ff485c6999fc29527075686eeceaff36775e4ef031ef94dbc13e6e9f6a83ab\"\n);\n\nconst verifyResult = await verify({ payload });\n\nif (verifyResult.isErr()) {\n  const { error } = verifyResult;\n  // handle error unable to verify\n  return;\n}\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential with a list of trusted issuers\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  trustedIssuers: [\"did:web:example.com\", \"did:web:mattrglobal.github.io:test:example\"],\n  payload: {},\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Verify a credential skipping expiry and not before checks\n\nIf `assertExpiry` or `assertNotBefore` are omitted they will be checked against the current date and time by default\n\n```typescript\nimport { verify } from \"@mattrglobal/vc-cwt-verifier\";\n\nconst verifyResult = await verify({\n  assertExpiry: false,\n  assertNotBefore: false,\n  payload: ...\n});\n\nconst verifyResponse = verifyResult.value;\nif (!verifyResponse.verified) {\n  const { reason } = verifyResponse;\n  // show or handle verification fail reason\n}\n\nconst { payload, header } = verifyResponse;\n// show or handle verified payload & header\n```\n\n### Provide custom cache for issuer resolution\n\nBy default an in memory cache will be provided. This can be overwritten by passing a different cache instance.\n\n```typescript\nimport { verify, getDefaultIssuerResolver } from \"@mattrglobal/vc-cwt-verifier\";\n\n\nconst issuerResolver = getDefaultIssuerResolver({ cache: myCache });\n\n\nconst verifyResult = await verify({\n  payload: ...,\n  issuerResolver\n});\n\n```\n\n## Error handling\n\nFunctions that have an error path return a\n[Neverthrow Result](https://www.npmjs.com/package/neverthrow#synchronous-api-result) that represents either success or\nfailure. All functions can throw exceptions for unexpected and unrecoverable errors.\n\n## Licensing\n\nSee [here](https://learn.mattr.global/docs/terms/sdk-licence-verifier-single-format-cwt-cose/) for licence information\n","readmeFilename":"README.md"}