# Open Credit Discovery (OCD) Open, operator-independent infrastructure to make loan request UTxOs on Cardano **discoverable, filterable and verifiable** — without changing any lending protocol. Apache-2.0. - **Metadata Standard** — `specs/01`, `schemas/loan-request-0.1.schema.json`, on-chain envelope label 7716 - **Verification Framework** — `specs/02`, pluggable schemes (`ed25519-attestation`, `vc-jwt` with `did:key`), policies - **Discovery Engine** — `specs/03`, `ocd/index.py` + protocol adapters (`cardano-loans-v2`, `generic`) - **Filtering & Query** — `specs/04`, `ocd/query.py` - **Capital Provider Profile + matching** — `specs/05`, `schemas/capital-provider-profile-0.1.schema.json`, `ocd/profile.py` - **Open API** — `specs/06`, `openapi.yaml`, `ocd/api.py` - **Tooling** — `ocd` CLI (issuer keys, attestations, VCs, documents, envelopes), clients (`clients/js`, `ocd/client.py`), `reference-queries/` - **Deploy** — `deploy/` (systemd, Docker, compose with a local IPFS node, nginx example) ## Quick start (5 minutes, no wallet) ```bash pip install -r requirements.txt # jsonschema, cryptography python3 -m unittest discover -s tests # 16 tests python3 demo/local_demo.py # indexes 11 sample requests (real preprod datum), runs reference queries, serves API on :8787 curl -s 'http://127.0.0.1:8787/v1/opportunities?verified_type=kyb' | python3 -m json.tool ``` ## Run against the chain ```bash cp deploy/config.example.toml config.toml # choose Koios base (preprod/mainnet/self-hosted) and adapters python3 -m ocd --config config.toml sync # one pass python3 -m ocd --config config.toml serve # API + sync loop ``` ## Describe a loan request (originator flow) ```bash python3 -m ocd keygen --out issuer.key # issuer side (KYB provider etc.): prints did:key python3 -m ocd attest --key issuer.key --subject --claims '{"status":"pass"}' --out kyb.json python3 -m ocd doc-template > doc.json # fill borrower/terms, add verification refs (uri+hash) python3 -m ocd doc-check doc.json ipfs add --cid-version 1 doc.json # or any ipfs/https/ar host python3 -m ocd envelope --doc doc.json --uri ipfs:// --outputs 0 > metadata.json # build the protocol's create-request transaction as usual and add: --metadata-json-file metadata.json ``` Docs: `docs/integration-guide.md`, `docs/operating-guide.md`, `docs/security-self-review.md`, `docs/final-report.md`.