The backend powers Cannon Ops’ multi-chain DevOps workflows by acting as a lightweight replacement for Safe Transaction Service. It stages transactions, validates Safe signatures, deduplicates nonces, and (optionally) persists state to Redis so that multisig operators can collaborate before executing on-chain.
- Validates Safe transaction payloads via on-chain
getTransactionHash,nonce, andcheckNSignatures. - Enforces rate limits, payload size limits, and signature caps to harden the public surface.
- Supports Redis-backed persistence (
REDIS_URL) with automatic in-memory fallback. - Discovers RPCs via
viem/chains. - Exposes
/healthfor container/LB probes.
- Node.js 20+ and npm 10+.
- Access to at least one RPC endpoint per supported chain.
- Optional Redis deployment for persistence and HA setups.
npm install
npm run startUse PORT to change the listener. Available scripts:
npm run start– launch the API server.npm run lint– Prettier formatting checks.npm run test– reserved for integration/unit suites.npm run e2e– reserved for end-to-end flows.npm run e2e:headless– reserved for CI-safe e2e runs.
| Variable | Description | Default |
|---|---|---|
PORT |
HTTP port | 8080 |
REDIS_URL |
Optional Redis connection string (redis:// or rediss://) |
none |
| Additional advanced variables | Configure metadata ingestion, fallbacks, etc. via your private .env. |
not documented publicly |
Example custom RPC configuration:
RPC_URLS=https://mainnet.infura.io/v3/KEY,https://optimism.infura.io/v3/KEY npm run start| Method | Route | Description |
|---|---|---|
GET /:chainId/:safeAddress |
Returns staged transactions sorted by nonce. | |
POST /:chainId/:safeAddress |
Validates and stores signatures for a Safe transaction. | |
GET /health |
Returns { status: "ok", version } if dependencies are reachable. |
Payloads must include { txn, sigs, createdAt, updatedAt }. The service merges signatures and prunes stale entries automatically.
- Mount persistent Redis for multi-instance deployments so each replica can hydrate staged transactions on boot.
- Use the readiness check to gate rolling updates; the server toggles
_healthCheckingto prevent overload.
invalid signature– Ensure signatures follow Safe concatenation ordering; the backend sorts them but expects recoverable payloads.chain id not supported– Provide custom RPCs for networks not bundled inviem/chains.proposed nonce ...errors – Operators tried to stage out-of-order nonces; enforce sequential signing in runbooks.
Refer to SECURITY.md for responsible disclosure and ABOUT.md for the broader roadmap context.