Files
agents-marketplace/buyer/.env.example
david 5cae0c4f6c shared: opt-in CIP-33 reference-scripts for script-spending txs
When ESCROW_REF_UTXO / ADVERT_REF_UTXO env vars are set (format
<txhash>#<idx>), Claim/Submit/Accept/Reclaim/RetireAdvert call
.readFrom([refUtxo]) instead of inlining the validator CBOR via
.attach.SpendingValidator(). Lucid-evolution 0.4.30 auto-extracts
utxo.scriptRef into the script-witness map (dist/index.js:1903–1913),
so no separate attach call is needed. Default (env unset) is unchanged.

Adds buildLiveTxForPublishReferenceScripts (a one-shot tx that
publishes both validators as scriptRef-bearing UTxOs at a caller-
supplied address — typically the all-zero-pkh enterprise burn address)
and the supplier tx:publish-reference-scripts CLI that wraps it.

Targeted at testnet trial; mainnet rollout is a separate flip after
verification.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:25:59 +02:00

42 lines
2.2 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
# ─── Optional: CIP-33 reference scripts ───────────────────────────────────
# When set, buyer-signed script-spending txs (Accept, Reclaim) read the
# escrow validator from an on-chain reference UTxO instead of inlining
# its CBOR — saving witness-set fees. Must match the values published
# by `supplier tx:publish-reference-scripts` (printed to stdout by that
# CLI). Leave unset to use inlined scripts (current behavior).
# ESCROW_REF_UTXO=<txhash>#0
# ADVERT_REF_UTXO=<txhash>#1 # not used by buyer; kept for env-file symmetry
# ─── 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