Configuration

This guide covers wallet configuration, spending limits, RPC endpoints, and advanced settings for your Miko402 deployment.

Configuration Overview

What you'll configure:

  • Environment variables and API keys

  • Wallet connections and RPC endpoints

  • Spending limits and safety controls

  • AI model settings

  • Advanced payment options

Time required: 10–15 minutes

Environment Variables

All configuration lives in .env.local. This file is gitignoredβ€”never commit API keys to version control.

Create Your Config File

cp .env.example .env.local

Required Variables

Important: No quotes around values. No spaces before or after =.

Optional Variables

RPC Endpoint Configuration

Your RPC endpoint determines which blockchain network Miko uses and how quickly transactions process.

Free Public RPCs

Solana Devnet (Testing):

  • Free and suitable for testing

  • Get free devnet SOL from faucetarrow-up-right

  • Not recommended for production

Solana Mainnet (Production):

  • Free but rate-limited

  • May experience slowdowns during peak usage

Premium RPC Providers

For production workloads, premium RPCs deliver better reliability and performance.

Fastest Solana RPC with 99.9% uptime SLA, built-in analytics, and a generous free tier. Get a Helius API key β†’arrow-up-right

QuickNode

Global infrastructure with high rate limits and enterprise-grade reliability. Get a QuickNode endpoint β†’arrow-up-right

Alchemy

Excellent documentation, webhook support, and a generous free tier. Get an Alchemy key β†’arrow-up-right

Multi-Chain Setup

Configure multiple chains for flexibility:

Miko automatically selects the optimal chain based on service requirements and cost.

Spending Limits

Spending limits are critical for safety. Configure them before making any payments.

Tier
Daily
Weekly
Monthly
Use Case

Conservative

0.01 SOL (~$2.50)

0.05 SOL (~$12.50)

0.2 SOL (~$50)

Testing and learning

Moderate

0.1 SOL (~$25)

0.5 SOL (~$125)

2 SOL (~$500)

Regular use

Power User

1 SOL (~$250)

5 SOL (~$1,250)

20 SOL (~$5,000)

Production workloads

Start conservative, scale up gradually.

How Limits Work

Limits reset automatically on a rolling basisβ€”daily every 24 hours, weekly every 7 days, monthly every 30 days.

Configuring Limits

Limits are configured per-wallet through smart contracts:

These limits are enforced on-chain for maximum securityβ€”they cannot be bypassed programmatically.

AI Model Configuration

Model Selection

Miko402 uses Google Gemini 2.0 Flash for optimal speed and cost:

Why Gemini 2.0 Flash:

  • Fastest response times in its class

  • Cost-effective for high-frequency payment processing

  • Sufficient reasoning capability for service discovery and payment logic

  • Built-in web search capabilities

Custom System Prompt

Override Miko's default behavior with a custom prompt in .env.local:

Applications for custom prompts:

  • Enterprise compliance requirements

  • Industry-specific service focus

  • Additional safety checks

  • Adjusted interaction style

Temperature & Token Settings

Control response creativity and length:

  • Payment-focused applications: Lower temperature (0.3–0.5) for consistency

  • Exploratory use cases: Higher temperature (0.7–0.9) for variety

Wallet Configuration

Supported Wallets

Browser Extensions:

  • Phantom (Solana native, recommended)

  • MetaMask (most widely used)

  • Coinbase Wallet

  • Brave Wallet

Mobile Wallets:

  • Phantom Mobile

  • MetaMask Mobile

  • Trust Wallet

  • Coinbase Wallet Mobile

Hardware Wallets:

  • Ledger (via Phantom/MetaMask)

  • Trezor (via MetaMask)

Multi-Wallet Strategy

Consider separating wallets by purpose:

  1. Testing Wallet β€” Small amounts, devnet testing

  2. Operational Wallet β€” Regular autonomous payments

  3. Cold Storage β€” Large holdings, no Miko access

Wallet Security

Do:

  • Use hardware wallets for significant amounts

  • Enable biometric/password locks

  • Store seed phrases offline

  • Use a dedicated wallet for autonomous payments

Don't:

  • Store seed phrases digitally

  • Share screen with seed phrase visible

  • Use the same wallet for everything

  • Keep large amounts in hot wallets

Advanced Configuration

Custom Gas Settings

Rate Limiting

Adjust the cooldown between requests:

Timeout Configuration

Vercel platform limits:

  • Hobby: 10 seconds

  • Pro: 60 seconds

  • Enterprise: 900 seconds

Multi-Chain Routing

Configure automatic chain selection priority:

Testing Your Configuration

1. Environment Check

2. Wallet Connection Test

  1. Open the application

  2. Click "Connect Wallet"

  3. Approve the connection

  4. Verify your wallet address appears

3. RPC Endpoint Test

4. Payment Test

  1. Connect a devnet wallet

  2. Get devnet SOL from the faucet

  3. Request a small service (0.001 SOL)

  4. Verify payment completes

  5. Check transaction on the block explorer

Configuration Checklist

Before going live:

Common Configuration Issues

Environment Variables Not Loading

  1. Restart the dev server (Ctrl+C, then npm run dev)

  2. Clear the .next cache: rm -rf .next

  3. Verify the file is named .env.local (not .env)

Invalid API Key

  1. Verify the key in your OpenRouter dashboardarrow-up-right

  2. Check for typos in .env.local

  3. Ensure no quotes around the key value

  4. Regenerate the key if necessary

RPC Connection Failed

  1. Test the endpoint with curl (see above)

  2. Check that your firewall isn't blocking the connection

  3. Verify the API key is correct (for premium RPCs)

  4. Fall back to the public RPC temporarily

Spending Limits Not Enforced

  1. Verify the smart contract deployment

  2. Check that your wallet has approved the contract

  3. Confirm limits are set on-chain

  4. Re-deploy contracts if needed

Need Help?


Configuration complete? Move on to Making Your First Payment β†’

Last updated