Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
161 lines (146 loc) · 7.74 KB
/
Copy path.env.example
File metadata and controls
161 lines (146 loc) · 7.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# Recourse — environment variables
#
# Copy to .env and fill in. .env is git-ignored and must NEVER be committed.
# `npm run judge` runs gitleaks over the repo and its history; a leaked key fails the build.
#
# Sandbox mode (`pnpm demo`) needs NONE of these. That is the point: a judge clones and runs.
# ----- Mode and contract -------------------------------------------------------------------
# sandbox (default) | testnet | mainnet
RECOURSE_MODE=sandbox
# Set by scripts/deploy.ts for testnet and mainnet
RECOURSE_CONTRACT_ID=
# ----- Deploy only -------------------------------------------------------------------------
# NEVER place these on the hosted server. Deploy runs from a laptop.
OWNER_ACCOUNT_ID=
OWNER_PRIVATE_KEY=
# ----- Service accounts --------------------------------------------------------------------
# Each service gets a FUNCTION-CALL key limited to the methods listed, never a full-access key.
# Function-call key limited to: accept_engagement, submit_receipt (scripts/lib/service-keys.ts).
# Payable calls (register_agent, post_bond) need the account's full-access key and are not done by the service.
AGENT_ACCOUNT_ID=
AGENT_FC_KEY=
# Used once by `pnpm setup-service-keys` to add the function-call key; never given to the service.
AGENT_FULL_ACCESS_KEY=
# Function-call key limited to: resolve_claim
ARBITER_ACCOUNT_ID=
ARBITER_FC_KEY=
ARBITER_FULL_ACCESS_KEY=
# Function-call key limited to: execute_payout, register_signer (confirm_payout arrives in Phase 3)
KEEPER_ACCOUNT_ID=
KEEPER_FC_KEY=
KEEPER_FULL_ACCESS_KEY=
# The three underwriter personas (cautious, balanced, aggressive). These are the one exception
# to the function-call rule: `commit_bid` attaches a deposit, which a function-call key cannot do,
# so each needs the FULL-ACCESS key of a dedicated account that owns nothing but its own vault.
# docker-compose passes UNDERWRITER_n_* through as the UNDERWRITER_ACCOUNT_ID / UNDERWRITER_KEY
# that one service reads, so a service started by hand wants those two names instead.
UNDERWRITER_1_ACCOUNT_ID=
UNDERWRITER_1_KEY=
UNDERWRITER_2_ACCOUNT_ID=
UNDERWRITER_2_KEY=
UNDERWRITER_3_ACCOUNT_ID=
UNDERWRITER_3_KEY=
# demo only — the testnet client the hosted demo acts as
CLIENT_ACCOUNT_ID=
CLIENT_KEY=
# Sputnik DAO v2 account that hears appeals (contract init + UI)
COUNCIL_DAO_ID=
# ----- NEAR AI Cloud -----------------------------------------------------------------------
# Testnet and mainnet only. Sandbox replays recorded fixtures from demo/fixtures.
NEARAI_API_KEY=
NEARAI_BASE_URL=https://cloud-api.near.ai
# Private TEE model IDs from GET /v1/models. Recorded fixtures use Qwen/Qwen3.8-27B (worker) and
# z-ai/glm-5.3-flash (arbiter); both return a TEE attestation. Most other models on NEAR AI Cloud do not.
NEARAI_MODEL_WORKER=
NEARAI_MODEL_ARBITER=
# ----- NEAR Intents / 1Click ---------------------------------------------------------------
# The keeper reads ONECLICK_URL; `pnpm spike:b` reads ONECLICK_BASE_URL. Both default to this.
ONECLICK_URL=https://1click.chaindefuser.com
# Optional, but avoids the 0.25% unauthenticated fee
ONECLICK_JWT=
# ----- Assets ------------------------------------------------------------------------------
# Mainnet contract init. Confirm from GET /v0/tokens and the NEAR explorer. Never hard-code
# asset IDs in code — the keeper reads them from /v0/tokens at startup.
USDC_TOKEN_ID=
# ----- Indexer and web ---------------------------------------------------------------------
INDEXER_DB_PATH=./.data/recourse.sqlite
ARTIFACT_DIR=./.data/artifacts
API_URL=http://localhost:8080
# ----- Phase 2 services ---------------------------------------------------------------------
# Optional RPC override (defaults: sandbox http://127.0.0.1:3030, testnet https://test.rpc.fastnear.com)
RECOURSE_RPC_URL=
WORKER_POLL_MS=2000
ARBITER_POLL_MS=2000
WORKER_STATE_FILE=
ARBITER_STATE_FILE=
DOCUMENTS_DIR=demo/documents
# Worker admin server (sabotage switch) — sandbox/testnet only, never mainnet. Loopback only.
# At least 32 random characters, e.g. `openssl rand -hex 32`. Leave empty to disable the server.
WORKER_ADMIN_TOKEN=
WORKER_ADMIN_PORT=8787
# ----- Optional settings (all have working defaults) ---------------------------------------
# Web app (apps/web), read at build time
# NEXT_PUBLIC_API_URL=http://localhost:8080
# NEXT_PUBLIC_EXPLORER_TX=https://testnet.nearblocks.io/txns/
# NEXT_PUBLIC_EXPLORER_ACCOUNT=https://testnet.nearblocks.io/address/
# NEXT_PUBLIC_ASSET_SYMBOL=NEAR
# NEXT_PUBLIC_ASSET_DECIMALS=24
# NEXT_PUBLIC_RECOURSE_DATA_MODE=live # "live" or "demo" pins the site's data mode; unset lets the visitor choose (default live)
# NEXT_STANDALONE=1 # standalone Next build (fails on Windows: symlink EPERM)
#
# Hosted sandbox stack (pnpm hosted / docker compose up)
# HOSTED_RESET_MINUTES=60
# HOSTED_SEED=1 # 0 skips replaying the seven scenarios
# HOSTED_TICK_MS=2000
#
# Audit anchoring (docs/audit-anchoring.md). The indexer anchors the audit head on chain.
# ANCHOR_MODE=manual # manual (default) | auto | disabled
# ANCHOR_INTERVAL_MS=30000 # auto mode only
# ANCHOR_ADMIN_TOKEN= # Bearer token for POST /api/ledger/anchor {"mode":"onchain"}; falls back to WORKER_ADMIN_TOKEN
# ANCHOR_SIGNER_ACCOUNT_ID= # account that signs anchor_audit_head; without it the demo client signs
# ANCHOR_SIGNER_KEY=
#
# Telegram notifications (indexer /api/telegram/*)
# TELEGRAM_MODE= # real | mock | disabled; default mock on sandbox, disabled elsewhere
# TELEGRAM_BOT_TOKEN= # required when TELEGRAM_MODE=real
# TELEGRAM_API_BASE_URL= # override the Bot API host (tests and mocks)
# TELEGRAM_DISPATCH_INTERVAL_MS=3000
# TELEGRAM_BATCH_SIZE=20
#
# Indexer API
# INDEXER_HOST=127.0.0.1
# INDEXER_PORT=8080
# INDEXER_BACKFILL_BLOCKS=5000 # testnet/mainnet; the sandbox reads from genesis
# INDEXER_WATCH_ACCOUNTS= # extra accounts whose transactions to read
# CORS_ORIGINS= # comma-separated; default allows any origin
# DEMO_AGENTS= # extra agents the demo client may hire
# WORKER_ADMIN_URL=http://127.0.0.1:8787
#
# Keeper and underwriters
# RATIONALES_FILE=.data/<mode>-rationales.jsonl # where underwriter bid rationales are written and read
# KEEPER_POLL_MS=3000
# KEEPER_DRY_QUOTE=true # quote only, never send a 1Click deposit (always on for testnet)
# NEARAI_MODELS= # models whose TEE signers the keeper re-registers
# NEARAI_MODEL_UNDERWRITER= # small model that writes bid rationales (text only)
# UNDERWRITER_PERSONA= # required per underwriter service: cautious, balanced or aggressive
#
# Sandbox
# NEAR_SANDBOX_HOME= # attach to a running sandbox (pnpm demo -- --keep prints it)
# RECOURSE_SANDBOX_VERSION=2.14.0
# RECOURSE_FF_TIMEOUT_MS=120000 # how long one sandbox_fast_forward may take; raise on a loaded host
#
# Mainnet run (demo/mainnet-run/RUN.md); a human confirms every transaction
# MAINNET_OWNER_ACCOUNT_ID=
# MAINNET_OWNER_PRIVATE_KEY=
# BASE_RECIPIENT_ADDRESS=0x... # pnpm mainnet:run: where the claimant's USDC on Base goes
# DEPOSIT_ADDRESS=0x... # pnpm mainnet:verify: the 1Click deposit to check (else read from the run's artifact)
# CLAIM_ID= # pnpm mainnet:verify: the claim to check (else read from the run's artifact)
#
# Spikes
# SPIKE_B_RECIPIENT=0x... # pnpm spike:b: recipient for the dry 1Click quote
#
# Tests
# E2E_BASE_URL=http://localhost:3000
# E2E_API_URL=http://localhost:8080
# E2E_RUN_RESET=1 # opt-in: the browser test that resets the demo chain
# JUDGE_FAST=1 # npm run judge without the slow groups