Bonded-escrow marketplace for prompt → response between buyers and
local-LLM suppliers, settling on Vector (UTxO) via Aiken Plutus V3
validators. Lifecycle PostEscrow → Claim → Submit → Accept proven on
Vector testnet 2026-05-06; AcceptEscrow tx 125e3cfe…7dc100d distributes
payment + bonds per the validator's distribution rule.
Workspace layout (pnpm + TypeScript):
contracts/marketplace/ Aiken validators (advert + escrow) + plutus.json
packages/shared/ Tx-builders (lucid-evolution), CBOR codecs,
chain providers (mock / read-only / live Ogmios)
supplier/ OpenAI-compatible HTTP node (Ollama by default;
vLLM / llama.cpp / OpenRouter / OpenClaw all
swap-in via OLLAMA_URL); 202+poll chat handler
buyer/ Express + React SPA; server-side runs the full
chain lifecycle via /v1/submit-prompt and
/v1/accept; SPA never holds the buyer key
indexer/ Chain-follower (extends apex-dashboard pattern),
SSE event stream + REST queries
indexer-ui/ Operator dashboard (events + suppliers + escrow
lookup)
tests/ 1098 vitest unit + integration tests (10 skipped
under M1-F-D-defer for UPLC test plumbing)
deploy/testnet/ Per-service docker-compose for the Hetzner stack
docs/EXECUTIVE_SUMMARY.* Marp deck (PDF + PPTX) — 11 slides, mermaid
diagrams pre-rendered for portable export
docs/CLOUDFLARE_WAF_BYPASS.md CF Skip-rule runbook for /v1/* paths
docs/ARCHITECTURE.md canonical spec
Live demo (testnet, 2026-05-06):
https://mp-buyers.vector.testnet.apexfusion.org (buyer SPA)
https://mp-suppliers.vector.testnet.apexfusion.org (supplier API)
https://mp-indexer.vector.testnet.apexfusion.org (indexer + UI)
40 lines
1.8 KiB
Plaintext
40 lines
1.8 KiB
Plaintext
# indexer/.env.example
|
|
#
|
|
# Copy to indexer/.env and fill in. .env is gitignored — never commit.
|
|
# The indexer holds NO secrets; it only reads from chain.
|
|
|
|
# ─── Required ─────────────────────────────────────────────────────────────
|
|
|
|
# Ogmios WebSocket URL — same hosted endpoint as the supplier.
|
|
OGMIOS_URL=wss://ogmios.vector.testnet.apexfusion.org
|
|
|
|
# SQLite database file. The compose volume `indexer_data` is mounted at
|
|
# /repo/indexer/data, so DB_PATH must live under that prefix to persist.
|
|
DB_PATH=/repo/indexer/data/indexer.db
|
|
|
|
# 0 = Vector testnet, 1 = Vector mainnet
|
|
# Standardized 2026-04-27 (M1-F-1) across all services — see ARCHITECTURE.md
|
|
# §9. Legacy "testnet"/"mainnet" labels are now rejected by loadConfig.
|
|
NETWORK_ID=0
|
|
|
|
# ─── Optional ─────────────────────────────────────────────────────────────
|
|
|
|
# HTTP listen port (default 8090).
|
|
INDEXER_PORT=8090
|
|
|
|
# Status poll interval (ms) for the supplier /status endpoint (default 20s).
|
|
STATUS_POLL_MS=20000
|
|
|
|
# Skip blocks before this slot — fast-forward the chain-sync past pre-deploy
|
|
# history. Set to the slot where the marketplace contracts were deployed on
|
|
# Vector testnet. Bumping this on an existing DB is idempotent (saved cursor
|
|
# wins). 0 disables.
|
|
SKIP_BEFORE_SLOT=0
|
|
|
|
# ─── Optional (not in config.ts; read by indexer/src/index.ts boot) ──────
|
|
# Address of the Aiken-compiled advert + escrow scripts. Until the M1-F
|
|
# config bridge lands these are the on-chain hooks the chain-sync watches.
|
|
# Without them the indexer runs in "no scripts watched" mode (degenerate).
|
|
# ADVERT_SCRIPT_ADDRESS=
|
|
# ESCROW_SCRIPT_ADDRESS=
|