Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.arcpass.vibepas.xyz/llms.txt

Use this file to discover all available pages before exploring further.

ArcPass reads its entire configuration from environment variables at startup. There are no configuration files to edit — every behavior you need to change is controlled by setting the appropriate variable before launching the API or worker process. Copy .env.example from the repository root and fill in the required values before your first deployment.
Never commit SPONSOR_PRIVATE_KEY to version control. This key controls the relay operator account that holds and transfers gas funds on behalf of users. Treat it with the same care as a production wallet private key: store it in a secrets manager, CI secret, or encrypted vault — never in a .env file that is checked into a repository.

Database

VariableRequiredDefaultDescription
DATABASE_URLYesPostgreSQL connection string for the ArcPass database. Example: postgresql://user:password@localhost:5432/arcpass

Blockchain and network

These variables are required by the worker process. The API does not connect to the blockchain directly.
VariableRequiredDefaultDescription
CHAIN_RPC_URLWorkerRPC endpoint for the Arc network. The worker connects here to submit relay transactions and verify the chain ID at startup. ARC_RPC_URL is accepted as a legacy fallback.
SPONSOR_PRIVATE_KEYWorkerRelay operator private key as 64 hex characters, with or without a 0x prefix. This account signs and pays for on-chain relay transactions. DEPLOYER_PRIVATE_KEY is accepted as a legacy fallback.
CHAIN_IDWorkerChain ID of the target network. The worker checks this against the connected RPC endpoint at startup and exits if there is a mismatch. For the Arc testnet, use 5042002.
CONTRACT_ADDRESS_SPONSOR_VAULTWorkerDeployed address of the SponsorVault contract, which holds the gas treasury and executes authorized transfers.
CONTRACT_ADDRESS_SPONSORSHIP_REGISTRYWorkerDeployed address of the SponsorshipRegistry contract, which records on-chain sponsorship accounting.

Sponsorship

VariableRequiredDefaultDescription
SPONSORSHIP_AMOUNT_WEINo1000000000000000Amount of native tokens to transfer per sponsorship, expressed in wei. The default is 0.001 tokens (1,000,000,000,000,000 wei).

API

VariableRequiredDefaultDescription
PORTNo4000TCP port the Fastify API listens on.
LOG_LEVELNoinfoPino log verbosity. Accepted values: trace, debug, info, warn, error, fatal, silent.
CORS_ALLOWED_ORIGINSNoComma-separated list of origins the API accepts cross-origin requests from. When unset, CORS is not restricted. Example: https://app.example.com,https://staging.example.com

Worker tuning

These variables control how aggressively the worker polls for work and how it handles timeouts and retries. The defaults are suitable for most deployments.
VariableRequiredDefaultDescription
POLL_INTERVAL_MSNo5000How often (in milliseconds) the worker checks for pending and stale sponsorship requests to process.
BATCH_SIZENo20Maximum number of sponsorship requests the worker processes in a single cycle.
MAX_RETRIESNo5Maximum number of times the worker retries a failed relay attempt before marking the request as permanently failed.
LOCK_TIMEOUT_MSNo30000Timeout in milliseconds for the internal processing transaction per sponsorship request.
TX_TIMEOUT_MSNo120000Timeout in milliseconds for waiting on an on-chain transaction receipt after the relay transaction is broadcast.
CONFIRMATION_BLOCKSNo2Number of block confirmations to wait for before treating a relay transaction as finalized.

Rate limiting

VariableRequiredDefaultDescription
RATE_LIMIT_IP_MAXNo10Maximum number of sponsorship requests allowed from a single IP address within the rate limit window.
RATE_LIMIT_WALLET_MAXNo5Maximum number of sponsorship requests allowed from a single wallet address within the rate limit window.
RATE_LIMIT_WINDOW_MSNo3600000Duration of the rate limit sliding window in milliseconds. The default is one hour (3,600,000 ms).
RATE_LIMIT_BLOCK_DURATION_MSNo900000How long (in milliseconds) an IP or wallet is automatically blocked after exceeding the rate limit threshold. The default is 15 minutes (900,000 ms).