{"_id":"@eecc/es256-signature-2020","_rev":"5-116f7f949783c5306db1a29a1ad23809","name":"@eecc/es256-signature-2020","dist-tags":{"latest":"1.2.1"},"versions":{"1.0.1":{"name":"@eecc/es256-signature-2020","version":"1.0.1","author":{"name":"Christian Fries"},"license":"BSD-3-Clause","_id":"@eecc/es256-signature-2020@1.0.1","maintainers":[{"name":"eecc","email":"christian.fries@eecc.de"}],"homepage":"https://github.com/european-epc-competence-center/es256-signature-2020#readme","bugs":{"url":"https://github.com/european-epc-competence-center/es256-signature-2020/issues"},"dist":{"shasum":"ec4558b02852ee474edf67f1c84d06dbee1e399b","tarball":"https://registry.npmjs.org/@eecc/es256-signature-2020/-/es256-signature-2020-1.0.1.tgz","fileCount":7,"integrity":"sha512-2TqSvohTpr7S61v7GD4xR0PcTMMdFQwDAlGWCAvE2kQfGeXBsPvo2wty3UUzunBxdwCZw05DUXmFlDgnxnmYlA==","signatures":[{"sig":"MEYCIQDmamytajvvn44S5RRy4M21JgSR5wilkdX6Lax/LGD1KwIhAOdCXx+qpDKR3Hwmlq0BtYnJaNFZ2qDQZWPkePHzgVzG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24704},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18"},"exports":"./dist/index.js","gitHead":"373a3cf876b29df658d3b9d46b8adb1803625065","scripts":{"lint":"tsc --noEmit","test":"npm run test-node","build":"tsc","release":"node scripts/release.js","coverage":"cross-env NODE_ENV=test c8 npm run test-node","test-node":"cross-env NODE_ENV=test mocha --preserve-symlinks -t 30000 -A -R ${REPORTER:-spec} --require test/test-mocha.js test/*.spec.ts","coverage-ci":"cross-env NODE_ENV=test c8 --reporter=lcovonly --reporter=text-summary --reporter=text npm run test-node","prepublishOnly":"npm run build","coverage-report":"c8 report"},"_npmUser":{"name":"eecc","email":"christian.fries@eecc.de"},"repository":{"url":"git+https://github.com/european-epc-competence-center/es256-signature-2020.git","type":"git"},"_npmVersion":"10.9.4","description":"ES256Signature2020 Linked Data Proof suite for use with jsonld-signatures using ECDSA with P-256 curve.","directories":{},"_nodeVersion":"22.21.1","dependencies":{"jose":"^5.4.0","jsonld":"^5.2.0","base58-universal":"^2.0.0","jsonld-signatures":"^11.3.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.2","chai":"^4.3.4","mocha":"^10.4.0","ts-node":"^10.9.2","cross-env":"^7.0.3","typescript":"^5.4.5","@types/chai":"^4.3.16","@types/node":"^20.12.12","@types/mocha":"^10.0.6","@digitalbazaar/security-document-loader":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/es256-signature-2020_1.0.1_1762767270984_0.11567466981997643","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@eecc/es256-signature-2020","version":"1.1.0","author":{"name":"Christian Fries"},"license":"BSD-3-Clause","_id":"@eecc/es256-signature-2020@1.1.0","maintainers":[{"name":"eecc","email":"christian.fries@eecc.de"}],"homepage":"https://github.com/european-epc-competence-center/es256-signature-2020#readme","bugs":{"url":"https://github.com/european-epc-competence-center/es256-signature-2020/issues"},"dist":{"shasum":"7deb2976f6a41b5aa2a90ecc1d803c6d70a1089f","tarball":"https://registry.npmjs.org/@eecc/es256-signature-2020/-/es256-signature-2020-1.1.0.tgz","fileCount":7,"integrity":"sha512-cI1qSozmLM6LtXnvDitgRGjnTTRWjg6jBYAoL6VV/el5iUcCaOlwPRyW8rFi1/XtENM0t4tkfb+yATjDdoSSZw==","signatures":[{"sig":"MEUCIA/Qax2TfrYRElf66V6bG+94Km9dZLlZVe2abUkKHjHwAiEA6cD338byecmNupE3S1RA9O4C76MPDi4LMVHqF3wlrlI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25381},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18"},"exports":"./dist/index.js","gitHead":"d3f869eaf7e87085435c591b6300ca81bd7746d9","scripts":{"lint":"tsc --noEmit","test":"npm run test-node","build":"tsc","release":"node scripts/release.js","coverage":"cross-env NODE_ENV=test c8 npm run test-node","test-node":"cross-env NODE_ENV=test mocha --preserve-symlinks -t 30000 -A -R ${REPORTER:-spec} --require test/test-mocha.js test/*.spec.ts","coverage-ci":"cross-env NODE_ENV=test c8 --reporter=lcovonly --reporter=text-summary --reporter=text npm run test-node","prepublishOnly":"npm run build","coverage-report":"c8 report"},"_npmUser":{"name":"eecc","email":"christian.fries@eecc.de"},"repository":{"url":"git+https://github.com/european-epc-competence-center/es256-signature-2020.git","type":"git"},"_npmVersion":"10.9.4","description":"ES256Signature2020 Linked Data Proof suite for use with jsonld-signatures using ECDSA with P-256 curve.","directories":{},"_nodeVersion":"22.21.1","dependencies":{"jsonld":"^5.2.0","base58-universal":"^2.0.0","jsonld-signatures":"^11.3.0","@digitalbazaar/ecdsa-multikey":"^1.8.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.2","chai":"^4.3.4","jose":"^5.4.0","mocha":"^10.4.0","ts-node":"^10.9.2","cross-env":"^7.0.3","typescript":"^5.4.5","@types/chai":"^4.3.16","@types/node":"^20.12.12","@types/mocha":"^10.0.6","@digitalbazaar/security-document-loader":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/es256-signature-2020_1.1.0_1763028771638_0.7766759857166443","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@eecc/es256-signature-2020","version":"1.1.2","author":{"name":"Christian Fries"},"license":"BSD-3-Clause","_id":"@eecc/es256-signature-2020@1.1.2","maintainers":[{"name":"eecc","email":"christian.fries@eecc.de"}],"homepage":"https://github.com/european-epc-competence-center/es256-signature-2020#readme","bugs":{"url":"https://github.com/european-epc-competence-center/es256-signature-2020/issues"},"dist":{"shasum":"431819dbf405cab5c9fe4fdefc19010c1e15fba7","tarball":"https://registry.npmjs.org/@eecc/es256-signature-2020/-/es256-signature-2020-1.1.2.tgz","fileCount":7,"integrity":"sha512-W0/MJ3h0d6rgcaWO+iigp8Q1tuaOeiV2OiiV7VAcgB/QbW2/C+nacGgN6bmRjN7/+8xcYDI7/IvO64VhbxoOeg==","signatures":[{"sig":"MEYCIQCV1vsJ/DZQWV+ICJTbnHrKScngsnD3t64mOs/NvPOyMwIhAMjtZL/ryqBX248GH1UddbNjq/xs5BxYvC99Ngd8hRAW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25367},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18"},"exports":"./dist/index.js","gitHead":"83532f0100fe65ddcb1d03803a406d59323a1508","scripts":{"lint":"tsc --noEmit","test":"npm run test-node","build":"tsc","release":"node scripts/release.js","coverage":"cross-env NODE_ENV=test c8 npm run test-node","test-node":"cross-env NODE_ENV=test mocha --preserve-symlinks -t 30000 -A -R ${REPORTER:-spec} --require test/test-mocha.js test/*.spec.ts","coverage-ci":"cross-env NODE_ENV=test c8 --reporter=lcovonly --reporter=text-summary --reporter=text npm run test-node","prepublishOnly":"npm run build","coverage-report":"c8 report"},"_npmUser":{"name":"eecc","email":"christian.fries@eecc.de"},"repository":{"url":"git+https://github.com/european-epc-competence-center/es256-signature-2020.git","type":"git"},"_npmVersion":"10.9.4","description":"ES256Signature2020 Linked Data Proof suite for use with jsonld-signatures using ECDSA with P-256 curve.","directories":{},"_nodeVersion":"22.21.1","dependencies":{"jsonld":"^5.2.0","base58-universal":"^2.0.0","jsonld-signatures":"^11.3.0","@digitalbazaar/ecdsa-multikey":"^1.8.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.2","chai":"^4.3.4","jose":"^5.4.0","mocha":"^10.4.0","ts-node":"^10.9.2","cross-env":"^7.0.3","typescript":"^5.4.5","@types/chai":"^4.3.16","@types/node":"^20.12.12","@types/mocha":"^10.0.6","@digitalbazaar/security-document-loader":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/es256-signature-2020_1.1.2_1763051495790_0.5799345661574937","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@eecc/es256-signature-2020","version":"1.2.0","author":{"name":"Christian Fries"},"license":"BSD-3-Clause","_id":"@eecc/es256-signature-2020@1.2.0","maintainers":[{"name":"eecc","email":"christian.fries@eecc.de"}],"homepage":"https://github.com/european-epc-competence-center/es256-signature-2020#readme","bugs":{"url":"https://github.com/european-epc-competence-center/es256-signature-2020/issues"},"dist":{"shasum":"37c4d5f58d01ac3876fd13ff5c9ee919df0bf581","tarball":"https://registry.npmjs.org/@eecc/es256-signature-2020/-/es256-signature-2020-1.2.0.tgz","fileCount":7,"integrity":"sha512-KAflj2IyXEUbj/jl1x1nbUGo6r7IBkpQ47Qv8ZbSF796zt7S8v+9fwkhnKY6rwJrVTmmsq7ukaDxgoIUNqjBFA==","signatures":[{"sig":"MEYCIQDPMNM+h/p3GoOgvo4vvBrADPMMZqxkVKLhAUzqv1P2CgIhAJl+uRncGRNJejz+78BRQ5BehPbXmOVUBnLsUk42tUh8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23037},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":"./dist/index.js","gitHead":"031b8d33943d19ce3365ca05ca9ea3361a07081b","scripts":{"lint":"tsc --noEmit","test":"npm run test-node","build":"tsc","release":"node scripts/release.js","coverage":"cross-env NODE_ENV=test c8 npm run test-node","test-node":"cross-env NODE_ENV=test NODE_OPTIONS='--loader ts-node/esm' mocha --preserve-symlinks -t 30000 -A -R ${REPORTER:-spec} test/*.spec.ts","coverage-ci":"cross-env NODE_ENV=test c8 --reporter=lcovonly --reporter=text-summary --reporter=text npm run test-node","prepublishOnly":"npm run build","coverage-report":"c8 report"},"_npmUser":{"name":"eecc","email":"christian.fries@eecc.de"},"repository":{"url":"git+https://github.com/european-epc-competence-center/es256-signature-2020.git","type":"git"},"_npmVersion":"10.9.4","description":"ES256Signature2020 Linked Data Proof suite for use with jsonld-signatures using ECDSA with P-256 curve.","directories":{},"_nodeVersion":"22.21.1","dependencies":{"jsonld":"^5.2.0","base58-universal":"^2.0.0","jsonld-signatures":"^11.3.0","@digitalbazaar/ecdsa-multikey":"^1.8.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.2","chai":"^4.3.4","jose":"^5.4.0","mocha":"^10.4.0","ts-node":"^10.9.2","cross-env":"^7.0.3","typescript":"^5.4.5","@types/chai":"^4.3.16","@types/node":"^20.12.12","@types/mocha":"^10.0.6","@digitalbazaar/security-document-loader":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/es256-signature-2020_1.2.0_1763379028360_0.46217509380016786","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@eecc/es256-signature-2020","version":"1.2.1","description":"ES256Signature2020 Linked Data Proof suite for use with jsonld-signatures using ECDSA with P-256 curve.","type":"module","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"test":"npm run test-node","test-node":"cross-env NODE_ENV=test NODE_OPTIONS='--loader ts-node/esm' mocha --preserve-symlinks -t 30000 -A -R ${REPORTER:-spec} test/*.spec.ts","coverage":"cross-env NODE_ENV=test c8 npm run test-node","coverage-ci":"cross-env NODE_ENV=test c8 --reporter=lcovonly --reporter=text-summary --reporter=text npm run test-node","coverage-report":"c8 report","build":"tsc","prepublishOnly":"npm run build","lint":"tsc --noEmit","release":"node scripts/release.js"},"repository":{"type":"git","url":"git+https://github.com/european-epc-competence-center/es256-signature-2020.git"},"author":{"name":"Christian Fries"},"license":"BSD-3-Clause","engines":{"node":">=18"},"bugs":{"url":"https://github.com/european-epc-competence-center/es256-signature-2020/issues"},"homepage":"https://github.com/european-epc-competence-center/es256-signature-2020#readme","dependencies":{"base58-universal":"^2.0.0","jsonld":"^5.2.0","jsonld-signatures":"^11.3.0"},"devDependencies":{"@digitalbazaar/ecdsa-multikey":"^1.8.0","@digitalbazaar/security-document-loader":"^3.1.0","@types/chai":"^4.3.16","@types/mocha":"^10.0.6","@types/node":"^20.12.12","c8":"^10.1.2","chai":"^4.3.4","cross-env":"^7.0.3","jose":"^5.4.0","mocha":"^10.4.0","ts-node":"^10.9.2","typescript":"^5.4.5"},"_id":"@eecc/es256-signature-2020@1.2.1","gitHead":"0df9fae28fece6af8aeeda29e11bd04aa3e0f627","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-ms96KnBovY1WqwER+hdI8n0YkL3+tl8JItgSW7DxV/LSED5BRo4GkACk9gJF6YH48/LVFF2JskNy6gju5djehw==","shasum":"f8c86118c70032d5a804188c8544344f49d278eb","tarball":"https://registry.npmjs.org/@eecc/es256-signature-2020/-/es256-signature-2020-1.2.1.tgz","fileCount":7,"unpackedSize":23037,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCz8qwpjEelMqjhyJ9bBDOT0vfU+5XAtDmX6vUQD94i2wIhAMmvpdBCtBVMX0PTbVO1d2vAisQBWlJjKufBZa0iCiKI"}]},"_npmUser":{"name":"eecc","email":"christian.fries@eecc.de"},"directories":{},"maintainers":[{"name":"eecc","email":"christian.fries@eecc.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/es256-signature-2020_1.2.1_1765182854026_0.37839447423272654"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-10T09:34:30.874Z","modified":"2025-12-08T08:34:14.468Z","1.0.1":"2025-11-10T09:34:31.175Z","1.1.0":"2025-11-13T10:12:51.844Z","1.1.2":"2025-11-13T16:31:36.023Z","1.2.0":"2025-11-17T11:30:28.573Z","1.2.1":"2025-12-08T08:34:14.287Z"},"bugs":{"url":"https://github.com/european-epc-competence-center/es256-signature-2020/issues"},"author":{"name":"Christian Fries"},"license":"BSD-3-Clause","homepage":"https://github.com/european-epc-competence-center/es256-signature-2020#readme","repository":{"type":"git","url":"git+https://github.com/european-epc-competence-center/es256-signature-2020.git"},"description":"ES256Signature2020 Linked Data Proof suite for use with jsonld-signatures using ECDSA with P-256 curve.","maintainers":[{"name":"eecc","email":"christian.fries@eecc.de"}],"readme":"# ES256Signature2020 Suite\n\nA Linked Data Signature suite for creating and verifying Data Integrity Proofs using ECDSA with the P-256 curve (ES256 algorithm).\n\n## Installation\n\nInstall from NPM:\n```\nnpm i @eecc/es256-signature-2020\n```\n\n## Usage\n\n### Signing a Verifiable Credential\n\n```javascript\nimport jsigs from 'jsonld-signatures';\nimport * as jose from 'jose';\nimport { ES256Signature2020 } from 'es256-signature-2020';\n\nconst { purposes: { AssertionProofPurpose } } = jsigs;\n\n// Create an unsigned credential\nconst unsignedCredential = {\n  '@context': [\n    'https://www.w3.org/2018/credentials/v1'\n  ],\n  id: 'https://example.edu/credentials/3732',\n  type: ['VerifiableCredential'],\n  issuer: 'https://example.edu/issuers/565049',\n  issuanceDate: '2020-03-10T04:24:12.164Z',\n  credentialSubject: {\n    id: 'did:example:ebfeb1f712ebc6f1c276e12ec21'\n  }\n};\n\n// Generate an ES256 key pair\nconst generatedKeyPair = await jose.generateKeyPair('ES256', { extractable: true });\nconst privateKeyJwk = await jose.exportJWK(generatedKeyPair.privateKey);\nconst publicKeyJwk = await jose.exportJWK(generatedKeyPair.publicKey);\n\n// Create a key object with DID-based identifier\nconst key = {\n  id: 'did:web:example.com#keys-1',\n  type: 'JsonWebKey2020',\n  controller: 'did:web:example.com',\n  privateKey: privateKeyJwk\n};\n\n// Create the suite with the key\nconst suite = new ES256Signature2020({ key });\n\n// Sign the credential\nconst signedCredential = await jsigs.sign(unsignedCredential, {\n  suite,\n  purpose: new AssertionProofPurpose(),\n  documentLoader\n});\n\nconsole.log(JSON.stringify(signedCredential, null, 2));\n```\n\n**Result:**\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\"\n  ],\n  \"id\": \"https://example.edu/credentials/3732\",\n  \"type\": [\"VerifiableCredential\"],\n  \"issuer\": \"https://example.edu/issuers/565049\",\n  \"issuanceDate\": \"2020-03-10T04:24:12.164Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:ebfeb1f712ebc6f1c276e12ec21\"\n  },\n  \"proof\": {\n    \"type\": \"JsonWebSignature2020\",\n    \"created\": \"2024-11-06T10:23:45Z\",\n    \"verificationMethod\": \"did:web:example.com#keys-1\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"z3QJPuVjHMfKMVvnvP3YdKNZvxVj5xGc...\"\n  }\n}\n```\n\n### Verifying a Signed Credential\n\n```javascript\nimport jsigs from 'jsonld-signatures';\nimport { ES256Signature2020 } from 'es256-signature-2020';\n\nconst { purposes: { AssertionProofPurpose } } = jsigs;\n\n// The signed credential from above\nconst signedCredential = { /* ... */ };\n\n// Create a verification suite\nconst suite = new ES256Signature2020();\n\n// Verify the credential\nconst result = await jsigs.verify(signedCredential, {\n  suite,\n  purpose: new AssertionProofPurpose(),\n  documentLoader\n});\n\nconsole.log('Verified:', result.verified); // true\n```\n\n## Compatibility\n\nThis library is compatible with [`@digitalbazaar/ecdsa-multikey`](https://github.com/digitalbazaar/ecdsa-multikey) for P-256 curve keys. You can use `EcdsaMultikey` key pairs with this signature suite, as demonstrated in our test suite.\n\n## Licence\n[BSD 3-Clause License](LICENSE) © 2025 European EPC Competence Center GmbH\n","readmeFilename":"README.md"}