Reference
Configuration
Every environment variable, what it controls and what happens without it.
On this page
The environment file#
Copy .env.example to .env.local for local work. On a host, set the same names in its environment settings.
NEXT_PUBLIC_SUI_NETWORK="testnet"
NEXT_PUBLIC_SUI_RPC_URL="https://fullnode.testnet.sui.io:443"
NEXT_PUBLIC_FLOE_PACKAGE_ID="0x…"
NEXT_PUBLIC_GOOGLE_CLIENT_ID="….apps.googleusercontent.com"
NEXT_PUBLIC_ENOKI_API_KEY="enoki_public_…"
# Server only
ENOKI_SECRET_KEY="enoki_private_…"
COINGECKO_API_KEY=""Public variables#
These are compiled into the browser code, so anyone can read them.
| Variable | Description | If missing |
|---|---|---|
| NEXT_PUBLIC_SUI_NETWORK | mainnet, or anything else for testnet | Testnet |
| NEXT_PUBLIC_SUI_RPC_URL | Sui full node endpoint, with gRPC | The public full node for the network |
| NEXT_PUBLIC_FLOE_PACKAGE_ID | The published package ID | Links can’t be created, claimed or refunded |
| NEXT_PUBLIC_GOOGLE_CLIENT_ID | Google OAuth web client ID | Login and claiming are off |
| NEXT_PUBLIC_ENOKI_API_KEY | Enoki public key, with zkLogin on | Login and claiming are off |
| NEXT_PUBLIC_WALRUS_PUBLISHER | Where gifts are stored. Separate several with commas, in the order to try. | Public publishers on testnet. No gifts on mainnet. |
| NEXT_PUBLIC_WALRUS_AGGREGATOR | Where gifts are read. Separate several with commas. | A public aggregator on testnet. No gifts on mainnet. |
| NEXT_PUBLIC_APP_URL | The site’s address, for link previews, robots.txt and the sitemap | https://floeonsui.vercel.app |
| NEXT_PUBLIC_CONTACT_EMAIL | A monitored address, shown in the footer, policies and docs | People are sent to public GitHub issues |
Server variables#
| Variable | Description | If missing |
|---|---|---|
| ENOKI_SECRET_KEY | Enoki private key, with sponsored transactions on | /api/claim answers 503 |
| COINGECKO_API_KEY | Free CoinGecko demo key | Prices work at a lower rate limit |
Notes#
devnetis not supported. The app treats every value exceptmainnetas testnet.- Claim links don’t use
NEXT_PUBLIC_APP_URL. They use the address the sender is on. - The GraphQL endpoint follows the network and can’t be set separately.
- Changing the network or package ID starts a new, empty link history in each browser. The old one is kept under its own name.
Settings in code#
These are in src/lib/chain/config.ts.
| Name | Value | Change it when |
|---|---|---|
| LINK_DURATION_MS | 14 days | You want links to last longer, up to 365 days |
| COIN_TYPES | SUI and $LOFI | You add a token. It must use nine decimals. |
| WATER_TREASURY | The contract’s treasury | You publish a contract with a different address. They must match. |
Some interface text and the terms mention 14 days, so update those too.