Repository navigation
docs(wallet): document every environment variable - #13
Merged
Merged
Conversation
The wallet reads 28 environment variables. .env.example covered 18 and the README table listed 9, so a new contributor had no way to learn the other 10 short of grepping for process.env. Adds the missing ones — NEXT_PUBLIC_RPC_URL, SOROBAN_MAINNET_RPC_URL, NEXT_PUBLIC_RP_ID, NEXT_PUBLIC_ORIGIN, NEXT_PUBLIC_LENS_URL, NEXT_PUBLIC_SOROSWAP_API_KEY, NEXT_PUBLIC_BLEND_POOL_IDS, NEXT_PUBLIC_SEP24_ANCHORS, NEXT_PUBLIC_SENTRY_DSN and SPONSOR_SECRET_KEY — and groups both files by concern: network, mainnet RPC, WebAuthn relying party, WASM hashes, services, server-only secrets, diagnostics. Marks what each is needed for rather than a bare required/optional flag, because strictly none are required: the wallet runs on testnet with an untouched .env.example, which the header now states. What a blank value costs you is the useful fact, so that is what the "Required for" column carries. SPONSOR_SECRET_KEY is called out as spendable and server-only. Its placeholder is empty, and every non-empty value in the file is a public contract address, a public Stellar endpoint or localhost. Existing comment prose is kept verbatim where it already existed.
shobhamerabacha-star
pushed a commit
to shobhamerabacha-star/veil
that referenced
this pull request
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5
What changed:
frontend/wallet/.env.exampleand the env table infrontend/wallet/README.mdnow cover all 28 environment variables the wallet reads, grouped by concern, with what each one is needed for. Plus a short "Run the wallet" pointer in the root README, which had no wallet section at all.Why: I enumerated every
process.env.*read underapp/,lib/,components/andhooks/. The wallet consumes 28 variables (excludingCIandNODE_ENV, which the runtime provides)..env.exampledocumented 18 and the README table listed 9, so ten were discoverable only by grepping:NEXT_PUBLIC_RPC_URL,SOROBAN_MAINNET_RPC_URL,NEXT_PUBLIC_RP_ID,NEXT_PUBLIC_ORIGIN,NEXT_PUBLIC_LENS_URL,NEXT_PUBLIC_SOROSWAP_API_KEY,NEXT_PUBLIC_BLEND_POOL_IDS,NEXT_PUBLIC_SEP24_ANCHORS,NEXT_PUBLIC_SENTRY_DSN,SPONSOR_SECRET_KEY.On "required vs optional": strictly, none are required. Every variable either has a working default compiled into
lib/, or gates a feature that degrades cleanly when unset, so a fresh clone runs on testnet with an untouched.env.example— I verified this by building against a straight copy of it. A bare required/optional flag would therefore have been misleading, so both files state that up front and the column says what a blank value actually costs you (mainnet,/agent,/earn,dApp connections,sponsored trustlines,creating a vault,/multisigon mainnet, native builds). Say the word if you would rather have a plain two-value flag.Descriptions come from reading each call site, so they record the behaviour rather than restating the name — the
NEXT_PUBLIC_SOROBAN_RPC_URL→NEXT_PUBLIC_RPC_URLprecedence inlib/network.ts, the three-way mainnet RPC precedence and why the server-side one is preferred, Soroswap falling back to SDEX paths, and/multisigbeing gated off entirely on a network with no hash.On secrets:
SPONSOR_SECRET_KEYis a spendable Stellar secret key. It is documented with an empty placeholder, marked server-only, and flagged that it must never gain aNEXT_PUBLIC_prefix. Every non-empty value in the file is a public contract address, a public Stellar endpoint, orlocalhost. I grepped the file for anything shaped like anS…secret key: none.Existing comment prose is preserved verbatim wherever it already existed; the churn is grouping, markers and the new entries.
How tested:
.env.example, 28 in the README table, with no variable missing from either and none documented that is not actually read..env.exampleparses: every non-comment line is a validKEY=VALUE, no duplicate keys..env.exampleto.env.localverbatim and rannpm run buildinfrontend/wallet— succeeds, all routes compile. Removed the file afterwards.Notes:
The full table lives in
frontend/wallet/README.md, next to the code it describes and where an## Environment variablessection already existed. The root README gets a pointer rather than a second copy, since two tables of 28 rows would drift apart within a release.One thing worth a look, not touched here:
.github/workflows/ci.ymlsetsNEXT_PUBLIC_NETWORK_PASSPHRASEfor the wallet build jobs, but nothing in the wallet reads it — the passphrase is hardcoded per network inlib/network.ts'sNETWORKS. It looks like a leftover, and I left it alone rather than widen this PR into the workflow.