Concepts
Identity, messaging, credentials, governance, and proofs: what each does and how this toolkit uses it.
Each section links to its specifications. For the communities behind them and their different implementation choices, see the ecosystem guide.
Decentralized identifiers
An identifier you control, with keys others can verify.
A decentralized identifier (DID) identifies a person, organization, or device without requiring an account at a central provider. It resolves to a document containing verification keys and, depending on the method, other information. Those keys let others check signatures and establish encrypted communication.
The toolkit starts with did:key, which encodes the public key in the identifier itself. Resolution needs no network or registry. The tradeoff is a fixed key: if it is lost or compromised, you need a new identifier. This makes did:key useful for tutorials and short-lived identities.
Other approaches support key rotation. KERI, described below, records changes in a key-event history so an identifier can keep its identity as its keys change.
In this toolkit
- Fixed-key identities. Create Ed25519
did:keyidentities withidentityFromSeedand resolve them offline withresolveDidKey. - Key histories. Eventlog creates KERI identifiers as
did:keri:<AID>and resolves them from their key-event logs.
Other DID methods are not supported by these resolvers.
Verifiable credentials and status lists
A claim you can carry, verify, and revoke.
A verifiable credential is a signed statement from an issuer about a subject: "Bob is a member of the Riverside Community Garden." The holder keeps it and presents it when needed. A verifier checks the signature and decides whether the issuer is an authority it accepts for that claim.
The issuer can revoke a credential by updating a signed status list. Each credential points to a bit in that list. A verifier retrieves a current copy, checks its signature, and reads the bit. One list covers many credentials, so the request does not identify which credential is being checked. Verification can happen without asking the issuer about the holder's visit.
In this toolkit
- Issue and verify.
issueCredentialandverifyCredentialuse the W3C Verifiable Credentials 2.0 shape witheddsa-jcs-2022Data Integrity proofs. - Delegate authority. Mandates builds delegation chains from these credentials.
The signed StatusList format is inspired by the W3C Bitstring Status List but is not format-compatible.
The Trust Spanning Protocol
Private, authenticated messages that can travel over different transports.
The Trust Spanning Protocol (TSP) provides ToIP's messaging layer. In the Direct mode used here, a message names its sender and recipient with verifiable identifiers (VIDs), encrypts its payload with authenticated HPKE, and carries the sender's signature. The recipient checks that signature before processing the contents.
This separates message security from delivery. A relay, radio link, or portable file can carry the same protected message. The carrier can delay or drop it, but cannot read its encrypted payload or alter it without detection.
In Direct mode, which this toolkit uses, both VIDs travel in the clear, so a carrier learns who is talking to whom. The specification also defines Routed and Nested modes that provide additional metadata protection through intermediaries.
In this toolkit
- Direct messages. Trust-core uses
@openvtc/vti-tsp-jsover an in-memoryBusor the WebSocket relay. - Radio delivery. Mesh transport carries the same messages, replacing visible identifiers with short address tags on the air.
Communication starts with a Direct message. The invitation handshake and Routed mode are not implemented here.
Trust Tasks
A shared message format for the work parties do together.
A Trust Task describes one interaction: issuing an endorsement, requesting community membership, or approving a payment. Each uses the same document envelope: an id, a specification URI as its type, an issuer, a recipient, timing fields, a payload, and a proof when required. A response uses the same type with #response appended.
Before dispatching a document to a handler, the receiver checks freshness, replay history, required proofs, and payload validity. The public registry at trusttasks.org catalogs specifications for many interactions, from community membership to voting. A specification defines an interaction; check separately whether an implementation exists.
In this toolkit
- Send and handle.
Endpointbuilds, signs, encrypts, and checks Trust Tasks using the OpenVTC libraries, then dispatches them to registered handlers. - Define interactions. This repository's types use the
https://toip.tools/spec/namespace. The task reference documents each one.
Trust registries and governance
Decide whose claims you accept, and under what rules.
A valid signature tells you which key signed a claim. You still need to decide whether to accept that signer as an authority. For a garden membership credential, that means knowing the garden's DID and trusting it to vouch for members.
A governance framework records those decisions: who may issue which credentials, how members join and leave, and how disputes are resolved. A trust registry makes a key question answerable by software: is this DID authorized to issue this kind of credential?
These rules belong to the community operating the system. A shared credential format does not determine who may join, who can delegate authority, or how decisions can be challenged.
In this toolkit
- Accepted issuers. Anonymous membership uses
AcceptPolicyto pin issuers. Shared To-Do checks rosters signed by the list's own key. - Delegated authority. Mandates checks a chain of credentials leading back to a principal.
- Local decisions. Trust-core's
Policiesruns Rego policy on the party's own device.
There is no general trust-registry library in this toolkit yet.
KERI key event logs and witnesses
Rotate keys while keeping a verifiable identity history.
KERI (Key Event Receipt Infrastructure) records how an identifier's keys change. For the identifiers used here, the AID is a digest of an inception event that lists the initial keys and commits to the next ones. Rotation reveals those pre-committed keys. Someone who steals only the current key cannot substitute their own next keys. Signed events form the key event log (KEL).
Witnesses sign receipts for the first version of each event they accept. If a controller presents conflicting histories, watchers can compare witness records and produce evidence of duplicity. The log also lets a verifier check an older signature against the keys that were valid when it was made.
In this toolkit
- Verifiable key histories. Write KERI 1.0 logs with Ed25519 or P-256 keys, witnesses, and watchers. Interoperability tests verify the logs with KERIpy 1.3.6.
- Audit trails. The toolkit adds its own signed logs, called trails. A key rotation seals the open trails.
Delegated identifiers, weighted thresholds, and KERI 2.0 are unsupported and rejected.
Selective disclosure and zero-knowledge membership
Prove a required fact while keeping the underlying record private.
Presenting a full credential reveals all its claims, and repeated presentations can link a holder's activity. Selective disclosure lets a holder reveal chosen claims. Zero-knowledge proofs can establish a statement, such as "I am a current employee" or "I am over 18", without disclosing the underlying credential or record.
A membership proof is one application: a person shows they belong to an accepted group without revealing their membership record. The verifier still needs rules for which issuers, group roots, and proof systems it accepts.
In this toolkit
- Membership proofs. Prove membership in one of up to four groups and check attribute requirements.
- Repeat participation. A scope-specific nullifier lets a verifier recognize the same membership without learning which record it is.
- Disclosure scope. Field-level credential disclosure with BBS or SD-JWT is not implemented.
The library uses Noir and Barretenberg's UltraHonk in a mode designed to be zero-knowledge. Its authors found no published proof of that property, and Noir is not yet intended for production use.