Expand description
Single source of truth for record envelopes, double-entry finance, and cooperative projects. Cooperative projects (audit COP-01..19) — Restricted records for shared work, membership, contributions, and the obligations derived from them.
Money/effort safety mirrors finance.rs: contributions merge add-wins by stable
entry id and never by raw sum, and obligations are a pure derivation over the
unique-id set keyed by (project_id, contributor_did). This makes duplicate,
reordered, or replayed sync frames safe — you can never double-count effort.
Contribution records form an author chain via predecessor_id, so a project’s
effort history is a verifiable append-only sequence per contributor.
Structs§
- Contribution
- A single immutable unit of contributed effort. Never mutated; a correction is a
new entry linked via
predecessor_id, soidis a stable content anchor for dedup and the entries form an append-only author chain. - Obligation
- Project
- A cooperative project — a named unit of shared work.
- Project
Membership - Membership of a DID in a project, with an agreed role.
Enums§
- Contribution
Privacy - Project
Role - Role a member holds within a cooperative project.
Functions§
- build_
contribution_ envelope - Builds contribution-envelope.
- build_
membership_ envelope - Builds membership-envelope.
- build_
project_ envelope - Builds project-envelope.
- contribution_
record_ id contribution-recordID.- contribution_
summary - Lossless contribution summary including
capital_cents,roi_multiplier,privacy_level,occurred_at_instant, andpredecessor_id. - derive_
obligations - Derive per-(project, contributor) effort obligations purely from the unique-id set.
- membership_
summary - Membership summary.
- merge_
contributions - Merge two contribution sets add-wins by stable id (never sum-merge), returning a deterministically ordered union. Idempotent and order-independent.
- parse_
contribution_ summary - Reconstruct a
Contributionlosslessly from a stored/transmitted summary JSON. - project_
membership_ record_ id project-membership-recordID.- project_
record_ id project-recordID.- project_
summary - Project summary.