TrustWeave Glossary

Standard terminology used throughout TrustWeave documentation.

Version: 0.6.0

Core Terms

Facade

The TrustWeave class is the main entry point (facade pattern). It provides a unified API for all TrustWeave operations.

Example:

1
2
3
4
5
6
7
8
import kotlinx.coroutines.runBlocking
import org.trustweave.trust.TrustWeave
import org.trustweave.trust.types.getOrThrowDid

fun main() = runBlocking {
    val trustWeave = TrustWeave.quickStart()
    val did = trustWeave.createDid { }.getOrThrowDid()
}

Related: Core API Reference

Service

Concrete implementations that perform operations:

  • CredentialService: Issues and verifies credentials
  • WalletService: Manages wallet operations
  • KeyManagementService: Handles cryptographic keys

Example:

1
2
3
class MyCredentialService : CredentialService {
    override suspend fun issue(request: IssuanceRequest): IssuanceResult = TODO()
}

Related: Credential Service API

Provider

Factory pattern implementations that create service instances:

  • CredentialServiceProvider: Creates credential services
  • WalletFactory: Creates wallet instances
  • DidMethodProvider: Creates DID method implementations

Example:

1
2
3
class MyWalletFactory : WalletFactory {
    override suspend fun create(...): Wallet
}

Related: Wallet API

Registry

Collections that manage multiple implementations:

  • DidMethodRegistry: Manages DID methods (did:key, did:web, etc.)
  • BlockchainAnchorRegistry: Manages blockchain clients
  • CredentialService / CredentialServices: Default credential issuance and verification (issue(IssuanceRequest), verify(...), presentations); constructed explicitly or by TrustWeave.build

Example:

1
2
3
val registry = DidMethodRegistry()
registry.register(DidKeyMethod())
registry.register(DidWebMethod())

Related: Core Concepts

DID Terms

DID (Decentralized Identifier)

A self-sovereign identifier following the did:method:identifier pattern.

Example: did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK

Related: DIDs

DID Method

Implementation of a specific DID method specification (e.g., did:key, did:web, did:ion).

Example:

1
2
3
class DidKeyMethod : DidMethod {
    override val methodName: String = "key"
}

Related: DIDs

DID Document

JSON-LD structure containing public keys, services, and capabilities for a DID.

Related: DIDs

Credential Terms

Verifiable Credential (VC)

Tamper-evident attestation following the W3C VC Data Model.

Related: Verifiable Credentials

Credential Subject

The entity about which claims are being made in a credential.

Example:

1
2
3
4
5
buildJsonObject {
    put("id", "did:key:holder")
    put("name", "Alice")
    put("degree", "B.S. Computer Science")
}

Related: Verifiable Credentials

Issuer

Entity that creates and signs a verifiable credential.

Related: Verifiable Credentials

Holder

Entity that receives and stores a verifiable credential.

Related: Wallets

Verifier

Entity that verifies a verifiable credential or presentation.

Related: Verifiable Credentials

Proof

Cryptographic signature binding the issuer to the credential content.

Related: Verifiable Credentials

Wallet Terms

Wallet

Container for storing and managing verifiable credentials and DIDs.

Related: Wallets

Wallet Provider

Implementation that creates wallet instances (InMemory, Database, etc.).

Example:

1
2
3
4
5
6
val wallet = trustWeave.wallet {
    id("holder-wallet")
    holder("did:key:holder")
    enableOrganization()
    enablePresentation()
}

Related: Wallet API

Capability

Optional interface that a wallet may implement (e.g., CredentialOrganization, CredentialPresentation).

Example:

1
2
3
4
5
if (wallet.supports(CredentialOrganization::class)) {
    wallet.withOrganization { org ->
        org.createCollection("Education")
    }
}

Related: Wallet API

Blockchain Terms

Blockchain Anchoring

Process of writing data digests to a blockchain for tamper evidence and timestamping.

Related: Blockchain Anchoring

Anchor Client

Implementation that writes data to a specific blockchain.

Example:

1
2
3
class AlgorandAnchorClient : BlockchainAnchorClient {
    override suspend fun writePayload(payload: JsonElement): AnchorResult
}

Related: Blockchain Anchoring

Chain ID

Identifier for a blockchain network following CAIP-2 format (e.g., algorand:testnet).

Related: Blockchain Anchoring

Key Management Terms

Key Management Service (KMS)

Service that manages cryptographic keys (generation, storage, signing).

Example:

1
2
3
class InMemoryKeyManagementService : KeyManagementService {
    override suspend fun generateKey(...): KeyInfo
}

Related: Key Management

Key ID

Identifier for a specific key within a DID document.

Example: did:key:z6Mk...#key-1

Related: Key Management

Plugin Terms

Plugin

Extensible component that implements TrustWeave interfaces (DID methods, anchor clients, etc.).

Related: Plugin Lifecycle

Plugin Lifecycle

Methods for initializing, starting, stopping, and cleaning up plugins.

Example:

1
2
3
4
5
6
interface PluginLifecycle {
    suspend fun initialize(config: Map<String, Any?>): Boolean
    suspend fun start(): Boolean
    suspend fun stop(): Boolean
    suspend fun cleanup()
}

Related: Plugin Lifecycle

Error Terms

TrustWeaveException

Base type for TrustWeave failures that are modeled as exceptions. Domain modules add sealed subclasses such as DidException, BlockchainException, WalletException, PluginException, ConfigException, and SerializationException.

Example:

1
2
3
4
5
6
import org.trustweave.did.exception.DidException

DidException.DidMethodNotRegistered(
    method = "web",
    availableMethods = listOf("key")
)

Related: Error handling

Result<T>

Kotlin Result is used by some services (for example smart-contract helpers). The TrustWeave facade often returns sealed result types instead (DidCreationResult, IssuanceResult, VerificationResult, …).

Example:

1
2
3
4
import org.trustweave.trust.types.getOrThrowDid
import org.trustweave.testkit.services.*

val did = trustWeave.createDid { method(KEY) }.getOrThrowDid()

Related: Error Handling

  • Core Concepts](core-concepts/README.md) - Detailed explanations
  • API Reference](api-reference/README.md) - Complete API documentation
  • Quick Start](getting-started/quick-start.md) - Getting started guide

This site uses Just the Docs, a documentation theme for Jekyll.