Skip to main content
The bootstrap logic is fully driven by environment variables. Group them as below.

Core bootstrap

BACKEND_URL
string
Overrides the default validator endpoint.
CLIENT_ID
string
Used as the app-name fallback during transfer submission.
WALLET_MNEMONIC
string
Initializes the wallet with this BIP39 phrase. Effectively “logs in” to wallets derived from this mnemonic.
WALLET_PASSPHRASE
string
default:"empty string"
Used as the BIP39 salt. Defaults to an empty string for compatibility with standard BIP39 wallets (Trust Wallet, Ledger, etc.) that don’t use a passphrase by default.

Authentication

AUTH_TYPE
string
Selected Identity Provider. Supported values: auth0, keycloak, custom, noop. Use noop to disable the authentication layer.
AUTH_AUDIENCE
string
Expected aud claim in the JWT.
AUTH_ALGOS
string
Comma-separated whitelist of accepted JWS asymmetric algorithms. Supported: RS256, RS384, RS512, ES256, ES384, ES512, EdDSA, Ed25519.

Identity Provider URLs

The set of variables used to derive the JWKS URL depends on AUTH_TYPE.
IDP_BASE_URL
string
The base URL of your IdP.

Auto-Batch

AUTO_BATCH_SWITCH
boolean
default:"false"
Enables the background batching engine.
AUTO_BATCH_DB_TYPE
string
default:"in-memory"
Storage backend for batch state. Accepted: in-memory, psql. Use psql for production.
AUTO_BATCH_MAX_SIZE
number
default:"200"
Maximum number of orders per batch.
AUTO_BATCH_INTERVAL
duration
default:"1m"
How long the batching loop waits between batch preparation cycles.
AUTO_BATCH_MONITOR_INTERVAL
duration
default:"10s"
How long the monitoring loop waits between polling cycles for in-flight batches.
AUTO_BATCH_RECOVERY_INTERVAL
duration
default:"5s"
Pause between individual submissions during a recovery pass (prevents ledger spikes).
AUTO_BATCH_RETRY_INTERVAL
duration
default:"2s"
How long the retry loop waits between retry cycles for failed batches.
AUTO_BATCH_MAX_ATTEMPTS
number
default:"3"
Hard ceiling on submission attempts per batch. Once reached, the batch is marked terminal and its orders are released back to the queue.

PostgreSQL connection

Applies only when AUTO_BATCH_DB_TYPE=psql.
DB_HOST
string
default:"localhost"
Database server hostname.
DB_PORT
number
default:"5432"
Database server port.
DB_NAME
string
default:"wallet_api"
Database name.
DB_USER
string
default:"wallet_user"
Database user.
DB_PASSWORD
string
default:"changeme"
Database password.

Connection pool

Applies to both in-memory and psql backends.
DB_NUM_THREADS
number
default:"50 (psql) / 10 (in-memory)"
Thread pool size for database operations.
DB_MAX_CONNECTIONS
number
default:"50 (psql) / 10 (in-memory)"
Maximum pool connections.
DB_MIN_CONNECTIONS
number
default:"10 (psql) / 2 (in-memory)"
Minimum idle connections kept alive.
DB_CONNECTION_TIMEOUT
number (ms)
default:"30000"
Milliseconds to wait for a connection before timing out.
DB_IDLE_TIMEOUT
number (ms)
default:"600000"
Milliseconds before an idle connection is evicted.