Implement credential issuance REST API with W3C VC compliance#16
Draft
Implement credential issuance REST API with W3C VC compliance#16
Conversation
- Create backend directory with Node.js/Express/TypeScript setup - Implement CredentialService with mocked cryptographic signing - Implement CredentialRepository with in-memory storage - Add REST API endpoints for credential issuance and retrieval - Add comprehensive test suite (12 tests passing) - Add backend README with usage instructions and API documentation - Update main README with backend setup instructions - Add example script demonstrating API usage Co-authored-by: samuelmr <2461240+samuelmr@users.noreply.github.com>
- Fix type handling for req.params.id - Use underscore prefix for unused request parameters - All tests still passing Co-authored-by: samuelmr <2461240+samuelmr@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement core credential issuance logic for minimal functionality
Implement credential issuance REST API with W3C VC compliance
Feb 11, 2026
samuelmr
requested changes
Feb 11, 2026
Co-authored-by: samuelmr <2461240+samuelmr@users.noreply.github.com>
Contributor
Author
Reimplemented the credential issuance API by building on top of PR #15's backend scaffold. The new implementation extends the existing CommonJS setup with modular credential issuance logic. All functionality from the original implementation is preserved with 12 passing tests. (commit 268b1d3) |
Contributor
|
Try to resolve the merge conflicts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements minimal backend for issuing and storing W3C Verifiable Credentials by extending the existing backend scaffold from PR #15. Mock signing and in-memory storage provide foundation for production-ready cryptographic operations and PostgreSQL migration.
API Endpoints
POST /api/v1/credentials - Issue credential
{ "issuer": "did:example:org", "credentialSubject": { "id": "did:example:holder", "name": "Alice" }, "type": ["VerifiableCredential", "CustomType"], "expirationDate": "2025-12-31T23:59:59Z" }GET /api/v1/credentials/:id - Retrieve by ID
GET /api/v1/credentials?holderId=X - Query by holder
Implementation
Example Response
{ "@context": ["https://www.w3.org/2018/credentials/v1"], "id": "urn:uuid:...", "type": ["VerifiableCredential"], "issuer": "did:example:org", "issuanceDate": "2026-02-11T15:20:00.000Z", "credentialSubject": { "id": "did:example:holder", "name": "Alice" }, "proof": { "type": "DataIntegrityProof", "created": "2026-02-11T15:20:00.000Z", "proofPurpose": "assertionMethod", "verificationMethod": "did:example:org#key-1", "proofValue": "..." } }Next Steps
Migration paths documented in backend/README.md:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.