Backend helper service for the DenBridge Console. It watches EVM transaction confirmation and detects the corresponding USDCx mint on Stacks via Hiro API, then exposes status and receipt data to the frontend.
- Track bridge sessions started from the web app
- Confirm EVM tx inclusion via Sepolia RPC
- Detect Stacks USDCx balance increases
- Provide receipt parsing for batch payroll txs
GET /health-> service status + config snapshotPOST /bridge/start-> initialize a bridge sessionGET /bridge/status?evmTxHash=0x...-> poll bridge stateGET /receipt?txid=...-> parse and summarize Stacks tx events
Copy .env.example to .env and fill in values.
Required:
SEPOLIA_RPC_URLEVM_CHAIN_ID(defaults to 11155111)EVM_USDC_ADDRESSEVM_XRESERVE_ADDRESSHIRO_STACKS_API_BASERELAYER_PORT(defaults to 8787)STACKS_USDCX_TOKEN_CONTRACT(format:ST...contract::token-name)
From repo root:
pnpm i
pnpm relayerOr from this directory:
pnpm i
pnpm devHealth check:
curl http://localhost:8787/health- The relayer does not submit transactions; it only validates and reports status.
- Bridge sessions are stored in-memory; restart clears active sessions.