{"_id":"@attestto/vc-sdk","_rev":"4-55b7abe8f1444057c0fd6dbc8a14776d","name":"@attestto/vc-sdk","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@attestto/vc-sdk","version":"0.1.0","keywords":["verifiable-credentials","ssi","did","w3c","json-ld","ed25519","es256","credential-issuance","credential-verification"],"author":{"name":"Attestto Open","email":"open@attestto.com"},"license":"Apache-2.0","_id":"@attestto/vc-sdk@0.1.0","maintainers":[{"name":"chongkan","email":"e.chongkan@gmail.com"}],"homepage":"https://github.com/Attestto-com/vc-sdk","bugs":{"url":"https://github.com/Attestto-com/vc-sdk/issues"},"dist":{"shasum":"f97ff0b73d984a9a2d4826a9d97d791e0b6880f4","tarball":"https://registry.npmjs.org/@attestto/vc-sdk/-/vc-sdk-0.1.0.tgz","fileCount":9,"integrity":"sha512-lEwRmukSVK1ze5ic2d4SjIWcYzlcj/tDP6yTniiAxiWgl5pK7HLkvRKcBu2+ScNU5m+tO3l4UqkAULuceXsl5A==","signatures":[{"sig":"MEUCIB6XzNl8WXeH1mJ33btnCmzlIlLc2fFyaNhORdZ5cOY6AiEAqoMM6e0yHhmJJks7ReMlBuxT2McLvMp6x3CR7ZUmiR4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89817},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"f617c84f69256544e8de09589402359847cd9663","scripts":{"dev":"tsup --watch","lint":"eslint src tests","test":"vitest run","build":"tsup","clean":"rm -rf dist coverage","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"chongkan","email":"e.chongkan@gmail.com"},"repository":{"url":"git+https://github.com/Attestto-com/vc-sdk.git","type":"git"},"_npmVersion":"11.9.0","description":"Universal SDK for issuing and verifying W3C Verifiable Credentials — any schema, any DID method","directories":{},"_nodeVersion":"25.6.1","dependencies":{"jose":"^6.0.0","@noble/curves":"^1.8.0","@noble/hashes":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^2.1.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-sdk_0.1.0_1776321772572_0.37255858243367856","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@attestto/vc-sdk","version":"0.2.0","keywords":["verifiable-credentials","ssi","did","w3c","json-ld","ed25519","es256","credential-issuance","credential-verification"],"author":{"name":"Attestto Open","email":"open@attestto.com"},"license":"Apache-2.0","_id":"@attestto/vc-sdk@0.2.0","maintainers":[{"name":"chongkan","email":"e.chongkan@gmail.com"}],"homepage":"https://github.com/Attestto-com/vc-sdk","bugs":{"url":"https://github.com/Attestto-com/vc-sdk/issues"},"dist":{"shasum":"64e957a55bd5ec93f1a615b138171df8a2c0c90d","tarball":"https://registry.npmjs.org/@attestto/vc-sdk/-/vc-sdk-0.2.0.tgz","fileCount":9,"integrity":"sha512-9PQ8k0z+SjLfLNxNmdtjmRuh/iquWGNyPSll5V3kQRqOd9xziT9ASrNG8EM2YqtGL2piESeoTayk0vYq6y77ew==","signatures":[{"sig":"MEUCIEoLWZFEbDaJ08G352wIp2EapmYaOCpZ0gAqJenkkUm6AiEA8qqCk5QJKObBWrGQeHLRqJ85nfuyBxvJif8b7Iw6WLM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":315018},"main":"./dist/index.cjs","type":"module","_from":"file:attestto-vc-sdk-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup --watch","lint":"eslint src tests","test":"vitest run","build":"tsup","clean":"rm -rf dist coverage","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"chongkan","email":"e.chongkan@gmail.com"},"_resolved":"/private/var/folders/0c/dckfw8qd2x35b3091m50jqch0000gn/T/6918fd7e78e51bc161cf9996e286daea/attestto-vc-sdk-0.2.0.tgz","_integrity":"sha512-9PQ8k0z+SjLfLNxNmdtjmRuh/iquWGNyPSll5V3kQRqOd9xziT9ASrNG8EM2YqtGL2piESeoTayk0vYq6y77ew==","repository":{"url":"git+https://github.com/Attestto-com/vc-sdk.git","type":"git"},"_npmVersion":"11.9.0","description":"Universal SDK for issuing and verifying W3C Verifiable Credentials — any schema, any DID method","directories":{},"_nodeVersion":"25.6.1","dependencies":{"jose":"^6.0.0","@noble/curves":"^1.8.0","@noble/hashes":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^3.2.4","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/vc-sdk_0.2.0_1776442750019_0.415342375562902","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@attestto/vc-sdk","version":"0.3.0","keywords":["verifiable-credentials","ssi","did","w3c","json-ld","ed25519","es256","credential-issuance","credential-verification"],"author":{"name":"Attestto Open","email":"open@attestto.com"},"license":"Apache-2.0","_id":"@attestto/vc-sdk@0.3.0","maintainers":[{"name":"chongkan","email":"e.chongkan@gmail.com"}],"homepage":"https://github.com/Attestto-com/vc-sdk","bugs":{"url":"https://github.com/Attestto-com/vc-sdk/issues"},"dist":{"shasum":"6ca8b3d699c24740fdc286dec150c77f1d173236","tarball":"https://registry.npmjs.org/@attestto/vc-sdk/-/vc-sdk-0.3.0.tgz","fileCount":9,"integrity":"sha512-4GqL/lFEFhGDQC0ziZsmNYlmc+Abrh/Jl6SjQGrMBHXfZJuQlM7VnETKDYT27Dz1cM6aOkFkd52waKiFdsu2fA==","signatures":[{"sig":"MEYCIQDgE45IGZi5ZrAFT5yv8auT8FbcU7Ma8rd9adffcr/w+wIhANqYqp7CnAx+gtnBm3GxhtLW1gvjwKrLUT2hGcIKKl6a","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":386539},"main":"./dist/index.cjs","pnpm":{"overrides":{"vite":">=6.4.2","esbuild":">=0.25.0"}},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"8bc77509d3f385d86f213fadbec8ee82e578900c","scripts":{"dev":"tsup --watch","lint":"eslint src tests","test":"vitest run","build":"tsup","clean":"rm -rf dist coverage","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"chongkan","email":"e.chongkan@gmail.com"},"repository":{"url":"git+https://github.com/Attestto-com/vc-sdk.git","type":"git"},"_npmVersion":"11.9.0","description":"Universal SDK for issuing and verifying W3C Verifiable Credentials — any schema, any DID method","directories":{},"_nodeVersion":"25.6.1","dependencies":{"jose":"^6.0.0","@noble/curves":"^1.8.0","@noble/hashes":"^1.7.0","@noble/ciphers":"^2.2.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^3.2.4","typescript":"^5.7.0","@vitest/coverage-v8":"^3.2.4"},"_npmOperationalInternal":{"tmp":"tmp/vc-sdk_0.3.0_1786064999222_0.7091793744243022","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@attestto/vc-sdk","version":"0.4.0","description":"Universal SDK for issuing and verifying W3C Verifiable Credentials — any schema, any DID method","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","lint":"eslint src tests","typecheck":"tsc --noEmit","clean":"rm -rf dist coverage","prepublishOnly":"npm run build"},"keywords":["verifiable-credentials","ssi","did","w3c","json-ld","ed25519","es256","credential-issuance","credential-verification"],"author":{"name":"Attestto Open","email":"open@attestto.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/Attestto-com/vc-sdk.git"},"homepage":"https://github.com/Attestto-com/vc-sdk","engines":{"node":">=18"},"dependencies":{"@noble/ciphers":"^2.2.0","@noble/curves":"^1.8.0","@noble/hashes":"^1.7.0","jose":"^6.0.0"},"devDependencies":{"@vitest/coverage-v8":"^3.2.4","tsup":"^8.4.0","typescript":"^5.7.0","vitest":"^3.2.4"},"pnpm":{"overrides":{"vite":">=6.4.2","esbuild":">=0.25.0"}},"gitHead":"c90c586ec484582a145dbc0e114aaf46f3d6635b","_id":"@attestto/vc-sdk@0.4.0","bugs":{"url":"https://github.com/Attestto-com/vc-sdk/issues"},"_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-VyGO/uB/qfCVRr8ywqjcfr6F8x5wRj8wnUk7Nl/7hkYEe3XPSSAsMPb82FFH1VzChKqVSAzW86vDZbCRJGwIHg==","shasum":"7d2554b8ad8b3a66e65d946bb052aa55bcd42cbf","tarball":"https://registry.npmjs.org/@attestto/vc-sdk/-/vc-sdk-0.4.0.tgz","fileCount":9,"unpackedSize":400615,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBnyIwP8k0fWIdecxnvmY6FjaAIvyxef0Dg7gjgPaijNAiEAoswronZH+Z/D2f396cDstv8GBrPFAS9HmiRkAAzSRQY="}]},"_npmUser":{"name":"chongkan","email":"e.chongkan@gmail.com"},"directories":{},"maintainers":[{"name":"chongkan","email":"e.chongkan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vc-sdk_0.4.0_1786508139637_0.7456738837208525"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-16T06:42:52.451Z","modified":"2026-08-12T04:15:39.967Z","0.1.0":"2026-04-16T06:42:52.706Z","0.2.0":"2026-04-17T16:19:10.192Z","0.3.0":"2026-08-07T01:09:59.396Z","0.4.0":"2026-08-12T04:15:39.769Z"},"bugs":{"url":"https://github.com/Attestto-com/vc-sdk/issues"},"author":{"name":"Attestto Open","email":"open@attestto.com"},"license":"Apache-2.0","homepage":"https://github.com/Attestto-com/vc-sdk","keywords":["verifiable-credentials","ssi","did","w3c","json-ld","ed25519","es256","credential-issuance","credential-verification"],"repository":{"type":"git","url":"git+https://github.com/Attestto-com/vc-sdk.git"},"description":"Universal SDK for issuing and verifying W3C Verifiable Credentials — any schema, any DID method","maintainers":[{"name":"chongkan","email":"e.chongkan@gmail.com"}],"readme":"# vc-sdk\n\n[![npm version](https://img.shields.io/npm/v/@attestto/vc-sdk.svg)](https://www.npmjs.com/package/@attestto/vc-sdk)\n\n> Universal W3C VC Data Model v2.0 TypeScript SDK\n\n`@attestto/vc-sdk` is a foundational SDK for issuing and verifying Verifiable Credentials with zero native dependencies. Implements the full [W3C VC Data Model v2.0](https://www.w3.org/TR/vc-data-model-2.0/) specification. Designed to be extended by domain-specific credential packages via a pluggable schema system. For full documentation, see [attestto.org/docs](https://attestto.org/docs).\n\n## Architecture\n\n```mermaid\ngraph LR\n    A[\"vc-sdk<br/>(core API)\"]\n    B[\"cr-vc-sdk<br/>(CR types)\"]\n    C[\"cr-vc-schemas<br/>(JSON-LD contexts)\"]\n    D[\"attestto-app<br/>(citizen wallet)\"]\n    E[\"attestto-verify<br/>(verification UI)\"]\n    \n    A --> B\n    A --> E\n    B --> C\n    B --> D\n    A --> D\n```\n\n## Quick start\n\n### Prerequisites\n\n- Node ≥ 18\n- npm or yarn\n\n### Install\n\n```bash\nnpm install @attestto/vc-sdk\n```\n\n### Try it\n\n```typescript\nimport { VCIssuer, VCVerifier, generateKeyPair } from '@attestto/vc-sdk'\n\n// Generate keys (Ed25519 or ES256)\nconst keys = generateKeyPair()\n\n// Create an issuer\nconst issuer = new VCIssuer({\n  did: 'did:web:my-org.attestto.id',\n  privateKey: keys.privateKey,\n})\n\n// Issue any credential — no type constraints\nconst vc = await issuer.issue({\n  type: 'UniversityDegree',\n  context: 'https://schemas.example.org/education/v1',\n  subjectDid: 'did:web:student.attestto.id',\n  claims: {\n    degree: {\n      name: 'Computer Science',\n      level: 'Bachelor',\n      university: 'Universidad de Costa Rica',\n    },\n  },\n})\n\n// Verify\nconst verifier = new VCVerifier()\nconst result = await verifier.verifyWithKey(vc, keys.publicKey, 'Ed25519', {\n  expectedType: 'UniversityDegree',\n  expectedIssuer: 'did:web:my-org.attestto.id',\n})\nconsole.log(result.valid) // true\n```\n\n## API\n\n### VCIssuer\n\n```typescript\nconst issuer = new VCIssuer(config: IssuerConfig)\nissuer.use(plugin: SchemaPlugin)          // Register domain schemas\nconst vc = await issuer.issue(options)     // Issue a signed VC\n```\n\nCore responsibilities: sign VCs with Ed25519 or ES256, manage DID/keyId, auto-inject schema context and property mapping via plugins.\n\n### VCVerifier\n\n```typescript\nconst verifier = new VCVerifier(config?: VerifierConfig)\nconst result = await verifier.verify(vc, options?)\nconst result = await verifier.verifyWithKey(vc, publicKey, algorithm, options?)\n```\n\nValidates signatures, expiration, proof format, and custom constraints. Returns `{ valid, checks, errors, warnings }`.\n\n### generateKeyPair\n\n```typescript\nconst keys = generateKeyPair('Ed25519' | 'ES256')\n// keys.publicKey: Uint8Array\n// keys.privateKey: Uint8Array\n// keys.algorithm: string\n```\n\nGenerate cryptographic key pairs for issuance and verification.\n\n### SchemaPlugin\n\n```typescript\ninterface SchemaPlugin {\n  context: string                    // JSON-LD context URL\n  types: string[]                    // Credential types this plugin handles\n  propertyMap?: Record<string, string>  // Map type → credentialSubject property\n}\n```\n\nRegister domain-specific schemas to auto-inject context and wrap claims:\n\n```typescript\nissuer.use({\n  context: 'https://schemas.attestto.org/cr/driving/v1',\n  types: ['DrivingLicense', 'TheoreticalTestResult'],\n  propertyMap: {\n    DrivingLicense: 'license',\n    TheoreticalTestResult: 'theoreticalTest',\n  },\n})\n\n// Now issue — context and property wrapping are automatic\nconst vc = await issuer.issue({\n  type: 'DrivingLicense',\n  subjectDid: 'did:web:maria.attestto.id',\n  claims: { licenseNumber: 'CR-2026-045678', categories: ['B'] },\n})\n```\n\n## Ecosystem\n\nFull index: [Attestto-com/attestto-open](https://github.com/Attestto-com/attestto-open)\n\n| Repo | What |\n|---|---|\n| [vc-sdk](https://github.com/Attestto-com/vc-sdk) | This — universal VC SDK |\n| [cr-vc-sdk](https://github.com/Attestto-com/cr-vc-sdk) | CR-specific SDK (TypeScript, typed wrappers) |\n| [cr-vc-sdk-dotnet](https://github.com/Attestto-com/cr-vc-sdk-dotnet) | CR-specific SDK (.NET 8) |\n| [cr-vc-schemas](https://github.com/Attestto-com/cr-vc-schemas) | CR driving schemas (11 types) |\n| [did-sns-spec](https://github.com/Attestto-com/did-sns-spec) | did:sns DID method spec |\n| [did-sns-resolver](https://github.com/Attestto-com/did-sns-resolver) | Universal Resolver driver for did:sns |\n| [id-wallet-adapter](https://github.com/Attestto-com/id-wallet-adapter) | Wallet discovery protocol |\n\n## License\n\nApache 2.0\n","readmeFilename":"README.md"}