Networks and endpoints
Horizon, Soroban RPC, passphrase, and friendbot per network, and how RPC failover works.
Endpoints are pinned in src/lib/config/networks.ts. They are not environment
variables. Editing that file is how you point a deployment at different providers.
The table
| mainnet | testnet | futurenet | |
|---|---|---|---|
| Horizon | https://horizon.stellar.org | https://horizon-testnet.stellar.org | https://horizon-futurenet.stellar.org |
| Soroban RPC | https://soroban-rpc.mainnet.stellar.gateway.fm | https://soroban-testnet.stellar.org | https://rpc-futurenet.stellar.org |
| RPC failovers | https://mainnet.sorobanrpc.com, https://stellar.api.onfinality.io/public | https://soroban-rpc.testnet.stellar.gateway.fm | none |
| Passphrase | Networks.PUBLIC | Networks.TESTNET | Networks.FUTURENET |
| Friendbot | none | https://friendbot.stellar.org | https://friendbot-futurenet.stellar.org |
| Allow-list entries | 25 | 19 | 0 |
The mainnet Soroban RPC default is a third-party gateway rather than an SDF-run endpoint. Review it, or replace it with an RPC you operate or trust, before mainnet use.
RPC failover
getRpc() memoizes one failover client per primary URL over the primary plus its
fallbacks, all with plain HTTP disabled.
Only rate-limit responses, server errors, and transport errors trigger a failover. A deterministic error is returned as-is rather than retried against another host.
Each fallback was selected on two criteria: it returns a CORS header so a browser can use it, and it tracks the same ledger as the primary, so a failover does not read a stale chain state. Networks with no vetted second endpoint have none listed.
Network resolution
resolveNetwork(id) returns the matching config for mainnet, testnet, or futurenet,
and falls back to testnet for anything else, including undefined.
That fallback is why the signing relay compares the resolved id back against the caller's string before accepting a publish. Otherwise an unrecognized network name would silently become testnet.
Note the contrast with environment parsing, which throws on an invalid value instead of falling back. See Configuration.
What the UI offers
The network selector offers exactly two options, TESTNET and MAINNET. The choice
persists in the browser under the key demolisher.network, and only those two values are
accepted when reading it back.
Futurenet is defined in configuration and reachable by building with
NEXT_PUBLIC_STELLAR_NETWORK=futurenet, but it is not offered in the selector.
Switching networks tears down the wallet session, because a connected account is scoped to one network. Switching to mainnet is gated behind a confirmation dialog; switching back to testnet applies immediately.
Friendbot
Friendbot presence is what gates the demo account. It is offered on networks that have one, which means testnet, and never on mainnet.
Explorer links
Transaction, account, and contract links point at stellar.expert. The URL slug is public
for mainnet and the network id otherwise.
Adding an endpoint
Any host the browser contacts also has to be in the Content Security Policy. Add its URL to
CONNECT_SRC_ENDPOINTS in src/lib/config/csp.ts, or the browser blocks the request.
See Security model.