Credential Exchange Protocols
Complete implementation of credential exchange protocols for TrustWeave, providing a unified interface for DIDComm V2, OIDC4VCI, and CHAPI.
Quick Start
Get started in 5 minutes! See the Complete Quick Start Guide for a full working example.
1
2
3
4
5
6
7
8
9
10
11
import com.trustweave.credential.exchange.*
// Create registry
val registry = CredentialExchangeProtocolRegistry()
// Register protocols
val didCommService = DidCommFactory.createInMemoryService(kms, resolveDid)
registry.register(DidCommExchangeProtocol(didCommService))
// Use any protocol with the same API
val offer = registry.offerCredential("didcomm", request)
For complete examples, see:
- Quick Start Guide - Complete working example with error handling
- API Reference - Complete API documentation
- Examples - More code examples
Protocols
✅ DIDComm V2
Status: Production Ready Documentation: DIDComm Protocol
- Full protocol support (offer, request, issue, proof request, proof presentation)
- Production crypto via
didcomm-javalibrary - End-to-end encryption (ECDH-1PU)
- Message threading
- JWS signing
✅ OIDC4VCI
Status: Production Ready Documentation: OIDC4VCI Protocol
- Credential issuance flow
- HTTP integration with credential issuer endpoints
- Token exchange
- Proof of possession (JWT)
- Metadata discovery
✅ CHAPI
Status: Production Ready Documentation: CHAPI Protocol
- Browser-compatible message generation
- Credential offer/issue
- Proof request/presentation
- W3C Credential Handler API compliance
Documentation
Getting Started
- Quick Start - Complete working example (5 minutes)
- API Reference - Complete API documentation
- Examples - More code examples
- Workflows - Step-by-step workflow guides
- Error Handling - Complete error reference
- Troubleshooting - Common issues and solutions
- Glossary - Terms and concepts
- Best Practices - Security, performance, and design patterns
- Versioning - Version info and migration guides
Core Concepts
- Protocol Abstraction - Core concepts
- Implementation Guide - How to implement new protocols
Advanced Topics
- Production Readiness - Production deployment guide
- Final Evaluation - Complete production readiness assessment
- Storage & Secret Resolver - Persistent storage and SecretResolver
- Advanced Features Plan - Implementation plan for advanced features
- Reusable Components - Components reusable across protocols
Protocol Comparison
| Feature | DIDComm | OIDC4VCI | CHAPI |
|---|---|---|---|
| Credential Offer | ✅ | ✅ | ✅ |
| Credential Request | ✅ | ✅ | ❌ |
| Credential Issue | ✅ | ✅ | ✅ |
| Proof Request | ✅ | ❌ | ✅ |
| Proof Presentation | ✅ | ❌ | ✅ |
| Encryption | ✅ | Via HTTPS | Browser |
| Production Ready | ✅ | ✅ | ✅ |
Production Status
All plugins are production-ready with:
- ✅ Production-grade implementations
- ✅ No placeholder/mock code in production paths
- ✅ Integration with mature libraries
- ✅ Proper error handling
- ✅ Complete documentation
See Production Readiness and Final Evaluation for detailed assessments.
Getting Started
- Choose a Protocol: Based on your use case
- Read Protocol Documentation: See individual protocol docs
- Register Protocol: Add to the registry
- Use Protocol: Call registry methods
Examples
See Implementation Guide for detailed examples and Protocol Abstraction for core concepts.