Advanced Topics
This section is aimed at teams who are moving past the quick starts and now need to harden production deployments. Each guide assumes you already understand the core DID / credential lifecycle and want to fine-tune behaviour through typed options, SPI hooks, or operational playbooks.
Published Guides
- Key Rotation — how to plan, automate, and test cryptographic key rollovers using the same registries and KMS interfaces that power the facade. Ideal for security engineers and ops teams.
- Verification Policies — modelling advanced validation rules (anchors, revocation, domain checks) with
CredentialVerificationOptionsand interpreting the structuredCredentialVerificationResult. - Error Handling — structured error handling with
TrustWeaveErrortypes,Result<T>utilities, and input validation. Essential for production applications. - Plugin Lifecycle — initialize, start, stop, and cleanup plugins that implement
PluginLifecycle. Useful for plugins that need resource management.
Error Handling
TrustWeave provides structured error handling with rich context:
- Error Types: Sealed hierarchy of
TrustWeaveErrortypes (DID, credential, blockchain, wallet, plugin errors) - Result Utilities: Extension functions for working with
Result<T> - Input Validation: Validation utilities for DIDs, credentials, and chain IDs
- Error Context: Structured context information for debugging
See Error Handling for detailed examples and patterns.
Plugin Lifecycle
Manage plugin initialization, startup, shutdown, and cleanup:
- Lifecycle Methods:
initialize(),start(),stop(),cleanup() - Automatic Discovery: TrustWeave automatically discovers plugins that implement
PluginLifecycle - Error Handling: Lifecycle methods return
Result<Unit>for error handling
See Plugin Lifecycle for implementation details and examples.
Upcoming Topics
Upcoming additions will cover SPI extension points, adapter authoring, test strategies, and performance tuning. If you want to prioritise a topic—or contribute your own guide—open an issue or follow the workflow in the Contributing Guide.