Configuration
every setting in .env, and where to get it.
NFC Crypto reads its keys when you build it, from apps/nfc_crypto/.env. Every key is optional. Brand, networks and the swap fee live in one Dart file instead; see White label.
01How settings reach the app
- Copy the example. In
apps/nfc_crypto:cp .env.example .env. Git ignores.env. There is also a JSON version,env/example.json, with the same keys. - Fill in what you have. Leave a key empty and the feature that needs it says so in the app, or uses its free fallback.
- Pass the file to every Flutter command:
flutter run --dart-define-from-file=.env,flutter build apk --release --dart-define-from-file=.env, and so on.
Values passed with --dart-define are compiled into the app. Anyone can pull them out of a published app. Only use keys that are meant for client apps, restrict them in each provider's dashboard where you can (by app ID, domain or usage limit), and never put a private key or a wallet seed in .env.
CryptoCard Wallet and NFC Recovery need no .env. CryptoCard reads one optional value, CARD_HOST (see White label).
02All keys (NFC Crypto)
| Key | What it is for | Where to get it |
|---|---|---|
NFC_CARD_HOST | The domain written on new cards: https://<host>/card/<id>. Default nfccrypto.mikodes.com. If you change it, change the native files too: Card host setup. | Your own domain |
REOWN_PROJECT_ID | WalletConnect: connecting the wallet to dApps. Without it, dApp pairing is off. | cloud.reown.com → create a project → Project ID |
ZEROX_API_KEY | Swap quotes from the 0x aggregator on EVM networks | 0x.org dashboard |
ONEINCH_API_KEY | Swap quotes from the 1inch aggregator on EVM networks | 1inch developer portal |
ETHERSCAN_API_KEY | Transaction history from the block explorer. Used for Ethereum, and as the fallback for the other EVM networks below when their own key is empty. | etherscan.io → API keys |
BSCSCAN_API_KEY | History on BNB Smart Chain | bscscan.com |
POLYGONSCAN_API_KEY | History on Polygon | polygonscan.com |
ARBISCAN_API_KEY | History on Arbitrum One | arbiscan.io |
OPTIMISM_ETHERSCAN_API_KEY | History on Optimism | optimistic.etherscan.io |
BASESCAN_API_KEY | History on Base | basescan.org |
ALCHEMY_API_KEY | EVM transaction history, next to or instead of the explorer keys | alchemy.com |
BIRDEYE_API_KEY | Solana token prices | birdeye.so |
COINGECKO_API_KEY | Coin prices with higher limits. A demo key starts with CG-; the app detects it. | coingecko.com → Developer dashboard |
HELIUS_API_KEY | Read and stored by the app, but no feature of this version uses it. You can leave it empty. | helius.dev |
COVALENT_API_KEY | Read and stored by the app, but no feature of this version uses it. You can leave it empty. | covalenthq.com |
APP_VERSION, APP_BUILD, APP_PACKAGE | What the About screen shows. Keep them equal to version in pubspec.yaml and to your bundle ID. | You set them |
SHOW_STARTUP_VALIDATOR_LOGS, SHOW_STARTUP_KEY_SNACKBAR | Debug helpers that report missing keys at start. Ignored in release builds. Leave them false. | — |
Source: apps/nfc_crypto/.env.example, read by lib/core/config/api_key_repository.dart, lib/core/price/ and lib/features/wallet_connect/reown_wallet_service.dart.
03What works with no keys at all
- Create, import and restore wallets; send and receive on EVM networks, Solana and Bitcoin, using the public endpoints in
lib/brand/brand_config.dart. - Every card feature: pairing, card required to open the app or to pay, roles and limits, backup on the card, tap to pay.
- Swaps through Jupiter on Solana and through the on-chain Uniswap V2-style router set for each EVM network (see Swaps).
Public endpoints are shared and rate-limited. For real users, put your own RPC provider URLs into lib/brand/brand_config.dart (see Networks).
04Settings that are not in .env
| What | Where |
|---|---|
| App name, tagline, colours, card host default, Android package | lib/brand/brand_config.dart → White label |
| Networks, RPC URLs, explorers, swap routers | lib/brand/brand_config.dart → Networks |
| Operator swap fee and slippage limits | lib/brand/brand_config.dart → Swap fee |
| Android release signing | android/key.properties or ANDROID_KEYSTORE_* variables → Build and release |
| Apple team | ios/Flutter/Signing.local.xcconfig or Xcode → Installation |