Production integration checklist
Use this checklist when wiring TrustWeave into a production or pre-production service.
Configuration and errors
- Configure
CredentialServiceviaTrustWeave.build { ... }(orquickStart()/inMemory()). If it is missing,issue/verify/presentationResultreturnAdapterNotReadyvariants—handle them explicitly; do not assume success. - For DSL
verify { }when misconfigured,VerificationResult.Invalid.AdapterNotReadymay reference an internal placeholder credential. Never log it or show it to end users as if it were a real VC; branch onAdapterNotReadyfirst. - Use
presentationResult/presentationFromWalletResultso configuration and validation errors are modeled asPresentationResult.Failure. - With
presentationFromWalletResult, everyfromWalletid must exist; a missing id yieldsInvalidRequest(no silent partial resolution). - If you call
PresentationResult.getOrThrow(), failures throwTrustWeaveException.InvalidStatewith codesPRESENTATION_ADAPTER_NOT_READY,PRESENTATION_INVALID_REQUEST, orPRESENTATION_ADAPTER_ERROR—not rawIllegalStateException.
Timeouts and cancellation
issueandverifyrun underwithTimeoutin the trust-layer services (defaults: issuance 30s, verification 10s). Ensure your outer coroutine scope respects cancellation and choose timeouts appropriate for your KMS and network latency.- Load tests: tune
Dispatchers.IOusage and concurrency (issueBatch/verifyBatchmaxConcurrency) to avoid exhausting connection pools.
Logging and privacy
- Avoid logging full VerifiableCredentials, presentations, raw proof material, or raw signatures.
- Logging DIDs may be acceptable for audit trails depending on policy; treat as personal data where applicable.
- Surface user-facing messages that are generic (“Verification failed”); keep detailed errors in operator logs only.
AdapterNotReadymessages are operator-oriented (configuration hints).
API stability
- Follow the Deprecation policy. Replace deprecated APIs when warnings appear in your build.
- Consult the Module maturity matrix before depending on optional plugins in production.