Core Modules
TrustWeave is organised into small, composable modules. The list below explains when to add each module and what responsibility it carries so you can mix and match only what you need in your build.
Module Overview
- SPI Interfaces – Shared plugin/service abstractions and adapter loader utilities are included in
trustweave-common. SPI functionality is available when you includetrustweave-commonor other TrustWeave modules. - trustweave-trust – Trust registry interfaces and runtime helpers. Needed when modelling trust anchors or resolving multi-party provenance.
- trustweave-common – Domain-agnostic core infrastructure. Includes plugin system (registry, metadata, configuration, provider chains), structured error handling (13+ granular error types), JSON canonicalization, digest computation, and Result utilities. Most applications compile against this module.
- trustweave-kms – Key management abstractions and helpers. Required whenever you integrate HSMs or cloud KMS backends.
- trustweave-did – DID and DID document management with pluggable DID methods. Enables DID creation/resolution across modules.
- trustweave-did-registrar – DID Registrar implementations for creating, updating, and deactivating DIDs through Universal Registrar services or local KMS.
- trustweave-did-registrar-server-ktor – Universal Registrar HTTP server implementation (Ktor) for hosting your own registrar service.
- trustweave-did-registrar-server-spring – Universal Registrar HTTP server implementation (Spring Boot) for hosting your own registrar service.
- trustweave-anchor – Blockchain anchoring abstraction with chain-agnostic interfaces. Use it to notarise digests on Algorand, Polygon, etc.
- trustweave-contract – Smart Contract abstraction for executable agreements with verifiable credentials and blockchain anchoring.
- trustweave-testkit – In-memory mocks for every SPI. Import this in unit tests or quick-start prototypes.
Module Dependencies
1
2
3
4
5
6
7
8
9
10
trustweave-trust → trustweave-common (includes SPI)
trustweave-common (includes SPI interfaces, JSON utilities, plugin infrastructure)
trustweave-kms → trustweave-common
trustweave-did → trustweave-common, trustweave-kms
trustweave-did-registrar → trustweave-did, trustweave-kms
trustweave-did-registrar-server-ktor → trustweave-did-registrar, trustweave-did
trustweave-did-registrar-server-spring → trustweave-did-registrar, trustweave-did
trustweave-anchor → trustweave-common
trustweave-contract → trustweave-common, trustweave-anchor, trustweave-did
trustweave-testkit → trustweave-common, trustweave-trust, trustweave-did, trustweave-kms, trustweave-anchor
When you need a specific building block, add it to dependencies explicitly:
1
2
3
4
dependencies {
implementation("com.trustweave:trustweave-common:1.0.0-SNAPSHOT")
implementation("com.trustweave:trustweave-did:1.0.0-SNAPSHOT")
}
Result: Gradle resolves only the modules you reference, keeping downstream artefacts slim while still exposing the full API surface you need.
Next Steps
- Explore individual module documentation linked above for detailed APIs and usage snippets.
- Check out Integration Modules when you connect to external providers.