# Environment & Credentials

Eitherway separates configuration by environment to keep builds deterministic and secrets safe.

### Environments

| Environment         | Purpose                                     |
| ------------------- | ------------------------------------------- |
| **Local Workspace** | Development servers and preview deployments |
| **Build Runners**   | Temporary variables for compilation         |
| **Runtime**         | Production settings managed by host         |

***

#### Secrets Management

Best practices:

1. Store credentials in a dedicated vault or secret manager
2. Rotate keys regularly
3. Apply minimal access permissions
4. Conceal values in logging systems
5. Never hardcode into source control
6. Use distinct keys per environment and service

***

#### **Naming Conventions**

Recommended format:

`API_URL` \
`AUTH_ISSUER` \
`STRIPE_KEY` \
`FIREBASE_PROJECT`\
`WALLETCONNECT_PROJECT` \
`ALCHEMY_API_KEY` \
`PINATA_JWT`

Optional environment suffixes: `_DEV`, `_STAGE`, `_PROD`.

#### Required Environment Variables

| Variable                   | Purpose                 | Required   |
| -------------------------- | ----------------------- | ---------- |
| `ANTHROPIC_API_KEY`        | Claude AI               | Yes        |
| `OPENAI_API_KEY`           | DALL-E image generation | Yes        |
| `POSTGRES_*`               | Database connection     | Yes        |
| `PRIVY_APP_ID`             | Authentication          | Yes        |
| `PRIVY_APP_SECRET`         | Authentication          | Yes        |
| `ALCHEMY_API_KEY`          | EVM blockchain RPC      | Yes (Web3) |
| `PINATA_JWT`               | IPFS storage            | Yes (NFTs) |
| `WALLETCONNECT_PROJECT_ID` | Wallet connection       | Yes (Web3) |
| `DEPLOYER_PRIVATE_KEY`     | Contract deployment     | Yes (Web3) |
| `ENCRYPTION_KEY`           | Credential encryption   | Yes        |
| `SUPABASE_*`               | Backend service         | Optional   |

***

### Injection

1. Create `.env.example` from prompt requirements.
2. Keep real values in a secret store.
3. Build runners receive scoped secrets; web hosts receive runtime secrets.

<figure><img src="/files/ZzJyICVuw7Hoei7i5VAJ" alt="" width="375"><figcaption></figcaption></figure>

#### For Web3 applications

• Secure handling of wallet connections and signing\
• Integration with on-chain interactions and smart contract execution\
• No exposure of sensitive keys within the application layer

All credentials are managed within a controlled execution environment to ensure security, isolation, and reliability.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.eitherway.ai/documentation/engineering/editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
