Client-side wire helpers for the capability Trust Task families —
governance/capability/* (enable / disable / list a community capability)
and git-trust/* (grant / revoke commit-signing trust).
This crate owns the documents, not a transport: it builds request
documents, parses inbound envelope replies, classifies them, and (behind
the signing feature) attaches a Data-Integrity proof. Each consumer keeps
its own send/receive plumbing but shares this wire layer, so a capability
producer (a community service) and a management UI cannot drift on the
contract.
Layers
- Envelope: capability documents travel as the
trust-tasks-didcommbinding envelope ([TRUST_TASK_ENVELOPE_TYPE]); [parse_envelope_document] turns an inbound body into(threadId, document). - Builders: [
build_document] plus the family-specific [build_list_document], [build_toggle_document], [build_git_trust_grant], [build_git_trust_revoke]. - Replies: [
classify_git_trust_reply] (for grant/revoke writers) and [parse_capability_reply] (for governance management UIs).
Signing is deliberately not here — it is a thin Data-Integrity call
each consumer makes with its own signer (a service reuses its credential
signer; a client signs with the persona key), so this crate stays free of
any crypto dependency. Sign the built document over its canonical form
(the document minus its proof member, eddsa-jcs-2022) and set the
proof member.