# 1376524890/ddtm_demo architecture

> Architecture diagram of the GitHub repository 1376524890/ddtm_demo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/1376524890/ddtm_demo
- Repository: https://github.com/1376524890/ddtm_demo

## Overview

VALOR is a rights-aware, quality-verifiable, purpose-auditable data transaction prototype. Its formal transaction entry point loads a frozen scenario and the TransactionOrchestrator executes the documented chain: listing and entitlement, Data-VOI, audit and certification, liability and pricing, clearing and settlement, usage control, feedback, and the FullChainGate. Separate capabilities support privacy-preserving commit-and-challenge audits, distributed quality auditing, offline calibration, and paired reproducible experiments. Engine artifacts and traces provide the replay layer. Relationships below follow the README’s documented flow and the supplied source references; unsampled implementation details are not inferred.

Main entry points: [`valor/engine/orchestrator.py`](https://github.com/1376524890/ddtm_demo/blob/master/valor/engine/orchestrator.py) (Transaction orchestrator), [`valor/privacy_audit`](https://github.com/1376524890/ddtm_demo/tree/master/valor/privacy_audit) (Privacy audit), [`valor/cli.py`](https://github.com/1376524890/ddtm_demo/blob/master/valor/cli.py) (Transaction CLI), [`valor/market/listing.py`](https://github.com/1376524890/ddtm_demo/blob/master/valor/market/listing.py) (Asset listing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Transaction entry"]
  node_transaction_cli["Transaction CLI<br/>[cli.py]"]
  node_orchestrator["Transaction orchestrator<br/>[orchestrator.py]"]
end

subgraph group_mechanism["Transaction mechanism"]
  node_listing["Asset listing<br/>[listing.py]"]
  node_entitlement["Entitlement and compliance<br/>[entitlement.py]"]
  node_rights["Rights bundle<br/>[models.py]"]
  node_commitments["Asset commitments<br/>[commitments.py]"]
  node_valuation["Data valuation"]
  node_liability["Seller liability"]
  node_pricing["Price bounds"]
  node_clearing["Market clearing"]
  node_settlement["Settlement ledger<br/>[settlement.py]"]
  node_accounts[("Contract accounts<br/>[accounts.py]")]
end

subgraph group_audit["Audit and privacy"]
  node_audit_voi["Audit VOI"]
  node_distributed_audit["Distributed quality audit"]
  node_privacy_audit["Privacy audit"]
  node_seller_audit["Seller audit service<br/>[audit_service.py]"]
  node_certification["Audit certification<br/>[certification.py]"]
end

subgraph group_controls["Usage and accountability"]
  node_usage["Usage control"]
  node_delivery["Data delivery"]
  node_lineage["Data lineage"]
  node_feedback["Outcome feedback"]
end

subgraph group_replay["Replay and experiments"]
  node_full_gate["Full-chain gate<br/>[full_chain_gate.py]"]
  node_engine_artifacts["Run artifacts and trace"]
  node_calibration["Offline calibration"]
  node_experiments["Paired experiments"]
  node_canonical_hash["Canonical hashing<br/>[hashing.py]"]
end

node_buyer_seller(("Buyer and seller"))

node_buyer_seller -->|"submits config"| node_transaction_cli
node_transaction_cli -->|"invokes"| node_orchestrator
node_orchestrator -->|"creates listing"| node_listing
node_orchestrator -->|"checks entitlement"| node_entitlement
node_orchestrator -->|"computes Data-VOI"| node_valuation
node_orchestrator -->|"computes Audit-VOI"| node_audit_voi
node_orchestrator -->|"runs audit"| node_distributed_audit
node_orchestrator -->|"certifies result"| node_certification
node_orchestrator -->|"computes bonds"| node_liability
node_orchestrator -->|"sets price bounds"| node_pricing
node_orchestrator -->|"clears market"| node_clearing
node_orchestrator -->|"settles transaction"| node_settlement
node_settlement -->|"transfers funds"| node_accounts
node_orchestrator -->|"enforces use"| node_usage
node_orchestrator -->|"delivers data"| node_delivery
node_orchestrator -->|"records feedback"| node_feedback
node_orchestrator -->|"checks closure"| node_full_gate
node_orchestrator -->|"writes run trace"| node_engine_artifacts
node_orchestrator -->|"uses rights input"| node_rights
node_listing -->|"hashes rights"| node_rights
node_seller_audit -->|"builds challenges"| node_privacy_audit
node_privacy_audit -->|"uses dataset commitment"| node_commitments
node_privacy_audit -->|"hashes artifacts"| node_canonical_hash
node_orchestrator -->|"consumes calibration"| node_calibration
node_experiments -->|"executes trials"| node_orchestrator
node_commitments -->|"computes commitments"| node_canonical_hash
node_usage -->|"records data flow"| node_lineage

click node_transaction_cli "https://github.com/1376524890/ddtm_demo/blob/master/valor/cli.py"
click node_orchestrator "https://github.com/1376524890/ddtm_demo/blob/master/valor/engine/orchestrator.py"
click node_listing "https://github.com/1376524890/ddtm_demo/blob/master/valor/market/listing.py"
click node_entitlement "https://github.com/1376524890/ddtm_demo/blob/master/valor/asset/entitlement.py"
click node_rights "https://github.com/1376524890/ddtm_demo/blob/master/valor/rights/models.py"
click node_commitments "https://github.com/1376524890/ddtm_demo/blob/master/valor/asset/commitments.py"
click node_valuation "https://github.com/1376524890/ddtm_demo/tree/master/valor/valuation"
click node_audit_voi "https://github.com/1376524890/ddtm_demo/tree/master/valor/audit"
click node_distributed_audit "https://github.com/1376524890/ddtm_demo/tree/master/valor/distributed"
click node_privacy_audit "https://github.com/1376524890/ddtm_demo/tree/master/valor/privacy_audit"
click node_seller_audit "https://github.com/1376524890/ddtm_demo/blob/master/valor/seller/audit_service.py"
click node_certification "https://github.com/1376524890/ddtm_demo/blob/master/valor/security/certification.py"
click node_liability "https://github.com/1376524890/ddtm_demo/tree/master/valor/liability"
click node_pricing "https://github.com/1376524890/ddtm_demo/tree/master/valor/pricing"
click node_clearing "https://github.com/1376524890/ddtm_demo/tree/master/valor/market"
click node_settlement "https://github.com/1376524890/ddtm_demo/blob/master/valor/contract/settlement.py"
click node_accounts "https://github.com/1376524890/ddtm_demo/blob/master/valor/contract/accounts.py"
click node_usage "https://github.com/1376524890/ddtm_demo/tree/master/valor/usage"
click node_delivery "https://github.com/1376524890/ddtm_demo/tree/master/valor/execution"
click node_lineage "https://github.com/1376524890/ddtm_demo/tree/master/valor/lineage"
click node_feedback "https://github.com/1376524890/ddtm_demo/tree/master/valor/feedback"
click node_full_gate "https://github.com/1376524890/ddtm_demo/blob/master/valor/engine/full_chain_gate.py"
click node_engine_artifacts "https://github.com/1376524890/ddtm_demo/tree/master/valor/engine"
click node_calibration "https://github.com/1376524890/ddtm_demo/blob/master/valor/engine/calibration_runner.py"
click node_experiments "https://github.com/1376524890/ddtm_demo/tree/master/valor/experiments"
click node_canonical_hash "https://github.com/1376524890/ddtm_demo/blob/master/valor/core/hashing.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_transaction_cli,node_orchestrator toneBlue
class node_listing,node_entitlement,node_rights,node_commitments,node_valuation,node_liability,node_pricing,node_clearing,node_settlement,node_accounts toneAmber
class node_audit_voi,node_distributed_audit,node_privacy_audit,node_seller_audit,node_certification toneMint
class node_usage,node_delivery,node_lineage,node_feedback toneRose
class node_full_gate,node_engine_artifacts,node_calibration,node_experiments,node_canonical_hash,node_buyer_seller toneIndigo
```

## Components

### Transaction entry

- [Transaction CLI](https://github.com/1376524890/ddtm_demo/blob/master/valor/cli.py): `valor/cli.py`
- [Transaction orchestrator](https://github.com/1376524890/ddtm_demo/blob/master/valor/engine/orchestrator.py): `valor/engine/orchestrator.py`

### Transaction mechanism

- [Asset listing](https://github.com/1376524890/ddtm_demo/blob/master/valor/market/listing.py): `valor/market/listing.py`
- [Entitlement and compliance](https://github.com/1376524890/ddtm_demo/blob/master/valor/asset/entitlement.py): `valor/asset/entitlement.py`
- [Rights bundle](https://github.com/1376524890/ddtm_demo/blob/master/valor/rights/models.py): `valor/rights/models.py`
- [Asset commitments](https://github.com/1376524890/ddtm_demo/blob/master/valor/asset/commitments.py): `valor/asset/commitments.py`
- [Data valuation](https://github.com/1376524890/ddtm_demo/tree/master/valor/valuation): `valor/valuation`
- [Seller liability](https://github.com/1376524890/ddtm_demo/tree/master/valor/liability): `valor/liability`
- [Price bounds](https://github.com/1376524890/ddtm_demo/tree/master/valor/pricing): `valor/pricing`
- [Market clearing](https://github.com/1376524890/ddtm_demo/tree/master/valor/market): `valor/market`
- [Settlement ledger](https://github.com/1376524890/ddtm_demo/blob/master/valor/contract/settlement.py): `valor/contract/settlement.py`
- [Contract accounts](https://github.com/1376524890/ddtm_demo/blob/master/valor/contract/accounts.py): `valor/contract/accounts.py`

### Audit and privacy

- [Audit VOI](https://github.com/1376524890/ddtm_demo/tree/master/valor/audit): `valor/audit`
- [Distributed quality audit](https://github.com/1376524890/ddtm_demo/tree/master/valor/distributed): `valor/distributed`
- [Privacy audit](https://github.com/1376524890/ddtm_demo/tree/master/valor/privacy_audit): `valor/privacy_audit`
- [Seller audit service](https://github.com/1376524890/ddtm_demo/blob/master/valor/seller/audit_service.py): `valor/seller/audit_service.py`
- [Audit certification](https://github.com/1376524890/ddtm_demo/blob/master/valor/security/certification.py): `valor/security/certification.py`

### Usage and accountability

- [Usage control](https://github.com/1376524890/ddtm_demo/tree/master/valor/usage): `valor/usage`
- [Data delivery](https://github.com/1376524890/ddtm_demo/tree/master/valor/execution): `valor/execution`
- [Data lineage](https://github.com/1376524890/ddtm_demo/tree/master/valor/lineage): `valor/lineage`
- [Outcome feedback](https://github.com/1376524890/ddtm_demo/tree/master/valor/feedback): `valor/feedback`

### Replay and experiments

- [Full-chain gate](https://github.com/1376524890/ddtm_demo/blob/master/valor/engine/full_chain_gate.py): `valor/engine/full_chain_gate.py`
- [Run artifacts and trace](https://github.com/1376524890/ddtm_demo/tree/master/valor/engine): `valor/engine`
- [Offline calibration](https://github.com/1376524890/ddtm_demo/blob/master/valor/engine/calibration_runner.py): `valor/engine/calibration_runner.py`
- [Paired experiments](https://github.com/1376524890/ddtm_demo/tree/master/valor/experiments): `valor/experiments`
- [Canonical hashing](https://github.com/1376524890/ddtm_demo/blob/master/valor/core/hashing.py): `valor/core/hashing.py`

### Other components

- **Buyer and seller**

## Connections

- Buyer and seller → Transaction CLI: submits config
- Transaction CLI → Transaction orchestrator: invokes
- Transaction orchestrator → Asset listing: creates listing (evidence: `valor/engine/orchestrator.py`)
- Transaction orchestrator → Entitlement and compliance: checks entitlement (evidence: `valor/engine/orchestrator.py`)
- Transaction orchestrator → Data valuation: computes Data-VOI (evidence: `valor/engine/orchestrator.py`)
- Transaction orchestrator → Audit VOI: computes Audit-VOI
- Transaction orchestrator → Distributed quality audit: runs audit
- Transaction orchestrator → Audit certification: certifies result
- Transaction orchestrator → Seller liability: computes bonds (evidence: `valor/engine/orchestrator.py`)
- Transaction orchestrator → Price bounds: sets price bounds (evidence: `valor/engine/orchestrator.py`)
- Transaction orchestrator → Market clearing: clears market (evidence: `valor/engine/orchestrator.py`)
- Transaction orchestrator → Settlement ledger: settles transaction (evidence: `valor/engine/orchestrator.py`)
- Settlement ledger → Contract accounts: transfers funds (evidence: `valor/contract/settlement.py`)
- Transaction orchestrator → Usage control: enforces use
- Transaction orchestrator → Data delivery: delivers data
- Transaction orchestrator → Outcome feedback: records feedback
- Transaction orchestrator → Full-chain gate: checks closure (evidence: `valor/engine/orchestrator.py`)
- Transaction orchestrator → Run artifacts and trace: writes run trace (evidence: `valor/engine/orchestrator.py`)
- Transaction orchestrator → Rights bundle: uses rights input (evidence: `valor/engine/orchestrator.py`)
- Asset listing → Rights bundle: hashes rights (evidence: `valor/market/listing.py`)
- Seller audit service → Privacy audit: builds challenges (evidence: `valor/seller/audit_service.py`)
- Privacy audit → Asset commitments: uses dataset commitment (evidence: `valor/privacy_audit/commitment.py`)
- Privacy audit → Canonical hashing: hashes artifacts (evidence: `valor/privacy_audit/commitment.py`)
- Transaction orchestrator → Offline calibration: consumes calibration
- Paired experiments → Transaction orchestrator: executes trials
- Asset commitments → Canonical hashing: computes commitments (evidence: `valor/asset/commitments.py`)
- Usage control → Data lineage: records data flow
