> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cantor8.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Environment variables for bootstrap, authentication, Auto-Batch, and database.

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`.

**auth0**

**IDP\_BASE\_URL** `string`

The base URL of your IdP.

**keycloak**

**IDP\_BASE\_URL** `string`

The base URL of your IdP.

**AUTH\_REALM** `string`

The OIDC realm used for discovery paths.

**custom**

**JWKS\_URL** `string`

Custom URL of your IdP — for non-standard paths.

## 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

> [!NOTE]
>
> 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

> [!NOTE]
>
> 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.