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)
33 lines
1.6 KiB
Plaintext
33 lines
1.6 KiB
Plaintext
# buyer/.env.example
|
|
#
|
|
# Copy to buyer/.env and fill in. .env is gitignored — never commit.
|
|
#
|
|
# To generate a fresh Ed25519 wallet seed:
|
|
# openssl rand -hex 32
|
|
# Fund the resulting address with enough AP3X to cover prompt payment +
|
|
# bond + tx fees before posting any escrow.
|
|
|
|
# ─── Required ─────────────────────────────────────────────────────────────
|
|
|
|
# 64-char hex Ed25519 private key seed for the buyer wallet. SECRET.
|
|
BUYER_PRIV_KEY_HEX=PASTE_64_HEX_CHARS_HERE
|
|
|
|
# Indexer base URL. Inside compose this is the service name.
|
|
INDEXER_URL=http://indexer:8090
|
|
|
|
# ─── Optional ─────────────────────────────────────────────────────────────
|
|
|
|
# HTTP listen port (default 3002 in buyer/src/config.ts; we override to
|
|
# 8070 in compose to free up the 3xxx range for local dev tooling).
|
|
BUYER_PORT=8070
|
|
|
|
# Cardano network ID. "0" = testnet, "1" = mainnet. (Note: this matches
|
|
# the supplier convention, NOT indexer's "testnet"/"mainnet" string.
|
|
# See ARCHITECTURE.md §9 follow-up — naming drift to be reconciled.)
|
|
NETWORK_ID=0
|
|
|
|
# ─── Reserved for M1-F ────────────────────────────────────────────────────
|
|
# INDEXER_TIMEOUT_MS is referenced in deploy/README.md but is NOT yet read
|
|
# by buyer/src/config.ts. M1-F should add it; see follow-ups.
|
|
# INDEXER_TIMEOUT_MS=15000
|