{"_id":"@attestto/cr-vc-sdk","_rev":"4-379ab233f72b433cce1a14b0e1c0ddbc","name":"@attestto/cr-vc-sdk","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@attestto/cr-vc-sdk","version":"0.1.0","keywords":["verifiable-credentials","ssi","did","costa-rica","mdl","driving-license","json-ld","w3c","iso-18013-5"],"author":{"name":"Attestto Open","email":"open@attestto.com"},"license":"Apache-2.0","_id":"@attestto/cr-vc-sdk@0.1.0","maintainers":[{"name":"chongkan","email":"e.chongkan@gmail.com"}],"homepage":"https://attestto.org","bugs":{"url":"https://github.com/Attestto-com/cr-vc-sdk/issues"},"dist":{"shasum":"37ccfadb337e0d7bcffad7520e535aa6c4de60ea","tarball":"https://registry.npmjs.org/@attestto/cr-vc-sdk/-/cr-vc-sdk-0.1.0.tgz","fileCount":9,"integrity":"sha512-OxmB7Xvnb3RDjH3H8piDCs9+bfv4UJYThEa4/NF3coWTOjWRG1+C9uttrDDPO0GNutIyxnLlAmvy9NdAvx23AA==","signatures":[{"sig":"MEUCID4d0mzu0nMJTWjcF0uWgPFRQ/8/4JW3POgpjHTRT5jvAiEArZql11DnnM8bfxOjBBbdIQjllJtg6zcX/IISzwFCZI4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":106324},"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":"e25bddc9a77ba5d3f208a9413f7129d796139355","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/cr-vc-sdk.git","type":"git"},"_npmVersion":"11.9.0","description":"SDK for issuing and verifying Verifiable Credentials in the Costa Rica SSI driving ecosystem","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","eslint":"^9.0.0","vitest":"^2.1.0","typescript":"^5.7.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cr-vc-sdk_0.1.0_1776321915125_0.010596839434757754","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@attestto/cr-vc-sdk","version":"0.2.0","keywords":["verifiable-credentials","ssi","did","costa-rica","mdl","driving-license","json-ld","w3c","iso-18013-5"],"author":{"name":"Attestto Open","email":"open@attestto.com"},"license":"Apache-2.0","_id":"@attestto/cr-vc-sdk@0.2.0","maintainers":[{"name":"chongkan","email":"e.chongkan@gmail.com"}],"homepage":"https://attestto.org","bugs":{"url":"https://github.com/Attestto-com/cr-vc-sdk/issues"},"dist":{"shasum":"4d7f6b9059ae69e40a76692ca0ea4496d786aa34","tarball":"https://registry.npmjs.org/@attestto/cr-vc-sdk/-/cr-vc-sdk-0.2.0.tgz","fileCount":9,"integrity":"sha512-hpTeOEdwZVdymyqxwuExUdlxMmxazXJtTRXX4wQfIFfZhpdZES7fZ9q2Pks2rqgEjfr+oR3Eioar88KSgJbmsQ==","signatures":[{"sig":"MEUCIE8qlzZDYMd21Ceub1v00jqK4sfApy9KvtlNrXvMeuO+AiEA3HD6kXTJg9vaRZnIBX9B5RS1BRBJN1s5p3TfuUWR3ss=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107513},"main":"./dist/index.cjs","type":"module","_from":"file:attestto-cr-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","test:unit":"vitest run --exclude 'tests/integration/**'","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","test:integration":"vitest run tests/integration/"},"_npmUser":{"name":"chongkan","email":"e.chongkan@gmail.com"},"_resolved":"/private/var/folders/0c/dckfw8qd2x35b3091m50jqch0000gn/T/3aa29a9722c7de5b82eb04bfe73171c6/attestto-cr-vc-sdk-0.2.0.tgz","_integrity":"sha512-hpTeOEdwZVdymyqxwuExUdlxMmxazXJtTRXX4wQfIFfZhpdZES7fZ9q2Pks2rqgEjfr+oR3Eioar88KSgJbmsQ==","repository":{"url":"git+https://github.com/Attestto-com/cr-vc-sdk.git","type":"git"},"_npmVersion":"11.9.0","description":"SDK for issuing and verifying Verifiable Credentials in the Costa Rica SSI driving ecosystem","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","eslint":"^9.0.0","vitest":"^3.2.4","typescript":"^5.7.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cr-vc-sdk_0.2.0_1776442754266_0.16194827934083666","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@attestto/cr-vc-sdk","version":"0.3.0","keywords":["verifiable-credentials","ssi","did","costa-rica","mdl","driving-license","json-ld","w3c","iso-18013-5"],"author":{"name":"Attestto Open","email":"open@attestto.com"},"license":"Apache-2.0","_id":"@attestto/cr-vc-sdk@0.3.0","maintainers":[{"name":"chongkan","email":"e.chongkan@gmail.com"}],"homepage":"https://attestto.org","bugs":{"url":"https://github.com/Attestto-com/cr-vc-sdk/issues"},"dist":{"shasum":"1bff08863318541939af3ed2077f9cad7b281985","tarball":"https://registry.npmjs.org/@attestto/cr-vc-sdk/-/cr-vc-sdk-0.3.0.tgz","fileCount":9,"integrity":"sha512-4elQB58zHqiWzQvTmOS51eTY5MJwVDmcUZlKH8idkx1/0OTd/K0lkWRbwPyyCo76GC3uCEjXls/TmiGgOEqPtQ==","signatures":[{"sig":"MEQCIC5s/xaBuj+ccUcepUSnp5e/ar6JWsb4LQvojjW53kTIAiBPa6wXGhVj+yAu3rqAYfc3bxD92dgiWz4DlP6Q3cptjw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":119804},"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":"5a690acf7658c85b2b3978f0cfd477a3eff88008","scripts":{"dev":"tsup --watch","lint":"eslint src tests","test":"vitest run","build":"tsup","clean":"rm -rf dist coverage","test:unit":"vitest run --exclude 'tests/integration/**'","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration/"},"_npmUser":{"name":"chongkan","email":"e.chongkan@gmail.com"},"repository":{"url":"git+https://github.com/Attestto-com/cr-vc-sdk.git","type":"git"},"_npmVersion":"11.9.0","description":"SDK for issuing and verifying Verifiable Credentials in the Costa Rica SSI driving ecosystem","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","eslint":"^9.0.0","vitest":"^3.2.4","typescript":"^5.7.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cr-vc-sdk_0.3.0_1786154200192_0.14601997848010995","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@attestto/cr-vc-sdk","version":"0.4.0","description":"SDK for issuing and verifying Verifiable Credentials in the Costa Rica SSI driving ecosystem","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:unit":"vitest run --exclude 'tests/integration/**'","test:integration":"vitest run tests/integration/","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","costa-rica","mdl","driving-license","json-ld","w3c","iso-18013-5"],"author":{"name":"Attestto Open","email":"open@attestto.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/Attestto-com/cr-vc-sdk.git"},"homepage":"https://attestto.org","engines":{"node":">=18"},"dependencies":{"@noble/curves":"^1.8.0","@noble/hashes":"^1.7.0","jose":"^6.0.0"},"devDependencies":{"@eslint/js":"^10.0.1","@typescript-eslint/eslint-plugin":"^8.0.0","@typescript-eslint/parser":"^8.0.0","eslint":"^9.0.0","tsup":"^8.4.0","typescript":"^5.7.0","typescript-eslint":"^8.67.0","vitest":"^3.2.4"},"pnpm":{"overrides":{"vite":">=6.4.2","esbuild":">=0.25.0"}},"gitHead":"358e6f15e448918ee84c15f7571c8736ce7d1b8a","_id":"@attestto/cr-vc-sdk@0.4.0","bugs":{"url":"https://github.com/Attestto-com/cr-vc-sdk/issues"},"_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-wQEQwvuo7X+nPNL2jvTw1KA4W/8aNLI8m4+/qOxdqQKd0gSWX4MwfmynDQVpu7+x1RztnrT3j/3gi43bMyaRdg==","shasum":"5d173129e9e5cf922f84b7080368a480bb6f5b40","tarball":"https://registry.npmjs.org/@attestto/cr-vc-sdk/-/cr-vc-sdk-0.4.0.tgz","fileCount":9,"unpackedSize":126839,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCx99g/LD/eJSdFNl/toCz4dOiPFbYHL5eYAzxV+TrtNwIhAL2IIyMgJpX7laM/Uf5I5cvG9Z09BfJji2BOKeWqiece"}]},"_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/cr-vc-sdk_0.4.0_1786508163323_0.9319432513622938"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-16T06:45:15.023Z","modified":"2026-08-12T04:16:03.660Z","0.1.0":"2026-04-16T06:45:15.259Z","0.2.0":"2026-04-17T16:19:14.525Z","0.3.0":"2026-08-08T01:56:40.341Z","0.4.0":"2026-08-12T04:16:03.476Z"},"bugs":{"url":"https://github.com/Attestto-com/cr-vc-sdk/issues"},"author":{"name":"Attestto Open","email":"open@attestto.com"},"license":"Apache-2.0","homepage":"https://attestto.org","keywords":["verifiable-credentials","ssi","did","costa-rica","mdl","driving-license","json-ld","w3c","iso-18013-5"],"repository":{"type":"git","url":"git+https://github.com/Attestto-com/cr-vc-sdk.git"},"description":"SDK for issuing and verifying Verifiable Credentials in the Costa Rica SSI driving ecosystem","maintainers":[{"name":"chongkan","email":"e.chongkan@gmail.com"}],"readme":"# cr-vc-sdk\n\n[![npm version](https://img.shields.io/npm/v/@attestto/cr-vc-sdk.svg)](https://www.npmjs.com/package/@attestto/cr-vc-sdk)\n\n> Costa Rica credential types and identity ecosystem\n\n`@attestto/cr-vc-sdk` is a TypeScript SDK for issuing and verifying W3C Verifiable Credentials specific to Costa Rica's driving, identity, and government workflows. Extends `@attestto/vc-sdk` with pre-registered schemas for DrivingLicense, medical fitness, vehicle registration, and more. All documentation in English. For full documentation visit [attestto.org/docs](https://attestto.org/docs).\n\n## Architecture\n\n```mermaid\ngraph LR\n    A[\"cr-vc-sdk<br/>(CR types API)\"]\n    B[\"vc-sdk<br/>(core)\"]\n    C[\"cr-vc-schemas<br/>(JSON-LD)\"]\n    D[\"attestto-app<br/>(CR modules)\"]\n    \n    A --> B\n    A --> C\n    A --> D\n```\n\n## Quick start\n\n### Prerequisites\n\n- Node ≥ 18\n- npm or yarn\n- Basic familiarity with `@attestto/vc-sdk`\n\n### Install\n\n```bash\nnpm install @attestto/cr-vc-sdk\n```\n\n### Try it\n\n```typescript\nimport { VCIssuer, generateKeyPair } from '@attestto/cr-vc-sdk'\n\nconst keys = generateKeyPair()\nconst issuer = new VCIssuer({\n  did: 'did:web:cosevi.attestto.id',\n  privateKey: keys.privateKey,\n})\n\nconst license = await issuer.issue({\n  type: 'DrivingLicense',\n  subjectDid: 'did:web:maria.attestto.id',\n  expirationDate: '2032-04-01T23:59:59Z',\n  claims: {\n    licenseNumber: 'CR-2026-045678',\n    categories: ['B', 'A1'],\n    issueDate: '2026-04-01',\n    status: 'active',\n    points: 12,\n    bloodType: 'O+',\n    restrictions: ['corrective lenses'],\n    issuingAuthority: 'did:web:cosevi.attestto.id',\n  },\n})\n```\n\nVerify:\n\n```typescript\nimport { VCVerifier } from '@attestto/cr-vc-sdk'\n\nconst verifier = new VCVerifier()\nconst result = await verifier.verifyWithKey(license, keys.publicKey, 'Ed25519', {\n  checkExpiration: true,\n  expectedType: 'DrivingLicense',\n  expectedIssuer: 'did:web:cosevi.attestto.id',\n})\n\nconsole.log(result.valid)   // true\nconsole.log(result.errors)  // []\n```\n\n## API\n\n### VCIssuer\n\n```typescript\nconst issuer = new VCIssuer(config: IssuerConfig)\nconst vc = await issuer.issue(options: IssueOptions)\nconst jwt = await issuer.issueJwt(options: IssueOptions)\n```\n\nRe-exports `VCIssuer` from `@attestto/vc-sdk` with CR schema plugins pre-loaded.\n\n### VCVerifier\n\n```typescript\nconst verifier = new VCVerifier(config?: VerifierConfig)\nconst result = await verifier.verify(vc, options?: VerifyOptions)\nconst result = await verifier.verifyWithKey(vc, publicKey, algorithm, options?)\n```\n\nVerifies against known public key or via DID resolver. Returns `{ valid, checks, errors, warnings }`.\n\n### generateKeyPair\n\n```typescript\nconst keys = generateKeyPair('Ed25519' | 'ES256')\n```\n\nGenerate Ed25519 or ES256 key pairs for signing and verification.\n\n## Supported credential types\n\n| Type | Domain | Typical issuer |\n|---|---|---|\n| `DrivingLicense` | Driving | COSEVI / DGEV |\n| `TheoreticalTestResult` | Theory exam | DGEV / certified provider |\n| `PracticalTestResult` | Practical exam | DGEV / certified provider |\n| `NationalID` | Identity | TSE / DGME |\n| `PassportCredential` | Travel document | Dirección de Pasaportes |\n| `VehicleRegistration` | Registration | Registro Nacional |\n| `VehicleInspection` | Technical review (RTV) | RTV center |\n| `ProfessionalLicense` | Professional credentials | MICITT / regulatory bodies |\n| `SocialSecurityCredential` | CAJA / benefits | CAJA |\n| `MedicalRecord` | Health | Authorized clinics |\n| `BirthCertificate` | Vital records | TSE |\n| `MarriageCertificate` | Vital records | TSE |\n| `LandRegistry` | Property | Registro Nacional |\n\nJSON-LD contexts are hosted at `https://schemas.attestto.org/cr/`. See [cr-vc-schemas](https://github.com/Attestto-com/cr-vc-schemas) for full schema definitions.\n\nIndice completo: [Attestto-com/attestto-open](https://github.com/Attestto-com/attestto-open)\n\n| Repositorio | Que hace |\n|---|---|\n| [vc-sdk](https://github.com/Attestto-com/vc-sdk) | SDK universal W3C VC (TypeScript) |\n| [cr-vc-sdk-dotnet](https://github.com/Attestto-com/cr-vc-sdk-dotnet) | SDK ecosistema vial CR (.NET 8) |\n| [cr-vc-schemas](https://github.com/Attestto-com/cr-vc-schemas) | Esquemas JSON-LD (11 tipos de VC) |\n| [did-sns-spec](https://github.com/Attestto-com/did-sns-spec) | Especificacion del metodo `did:sns` |\n| [did-sns-resolver](https://github.com/Attestto-com/did-sns-resolver) | Universal Resolver para did:sns |\n| [id-wallet-adapter](https://github.com/Attestto-com/id-wallet-adapter) | Descubrimiento de wallets |\n\n## Ecosystem\n\n| Repo | Role | Relationship |\n|---|---|---|\n| [vc-sdk](https://github.com/Attestto-com/vc-sdk) | Core SDK | Foundational API this extends |\n| [cr-vc-sdk](https://github.com/Attestto-com/cr-vc-sdk) | This repo | CR credential types |\n| [cr-vc-schemas](https://github.com/Attestto-com/cr-vc-schemas) | JSON-LD contexts | Schemas for all CR types |\n| [attestto-app](https://github.com/Attestto-com/attestto-app) | Citizen wallet | Wallet with CR issuance modules |\n| [did-sns-spec](https://github.com/Attestto-com/did-sns-spec) | DID method | Human-readable `did:sns` spec |\n| [wallet-identity-resolver](https://github.com/Attestto-com/wallet-identity-resolver) | Identity resolution | On-chain identity lookup |\n\n## Build with an LLM\n\nThis repo ships a [`llms.txt`](./llms.txt) context file — a machine-readable summary of the API, data structures, and integration patterns designed to be read by AI coding assistants.\n\n### Recommended setup\n\nUse the [`attestto-dev-mcp`](../attestto-dev-mcp) server to give your LLM active access to the ecosystem:\n\n```bash\ncd ../attestto-dev-mcp\nnpm install && npm run build\n```\n\nThen add it to your Claude / Cursor / Windsurf config and ask:\n\n> *\"Explore the Attestto ecosystem and scaffold me a credential issuer\"*\n\n### Which model?\n\nWe recommend **[Claude](https://claude.ai) Pro** (5× usage vs free) or higher. Long context and strong TypeScript reasoning handle this codebase well. The MCP server works with any LLM that supports tool use.\n\n> **Quick start:** Ask your LLM to read `llms.txt` in this repo, then describe what you want to build. It will find the right archetype, generate boilerplate, and walk you through the first run.\n\n## Contributing\n\nContributions welcome. Please open an issue or pull request on GitHub.\n\n## License\n\nApache 2.0\n","readmeFilename":"README.md"}