Skip to main content

Chain Events — ETR Webhook Sidecar

trustvc-chain-events is a self-hosted Docker container that watches your Token Registry contracts on-chain and delivers every ETR lifecycle event — mint, transfer, surrender, burn — to your system as a signed HTTP webhook within seconds of chain finality.

How It Works

TrustVC Secure Webhook Event Flow

Each event arrives as a CloudEvents 1.0 JSON payload with an X-TrustVC-Signature header you can verify independently.

Why Self-Hosted

ConcernSidecar approach
Data sovereigntyEvents never leave your network
Provider flexibilityUse your own Alchemy / QuickNode RPC
ComplianceRuns in a private VPC — no outbound except to your RPC and webhook
IsolationEach deployment is fully independent
AvailabilityDecoupled from TrustVC infrastructure

Supported Chains

chainKeyNetworkTransport
ethereumEthereum MainnetWebSocket
ethereum-sepoliaEthereum SepoliaWebSocket
polygonPolygon MainnetWebSocket
polygon-amoyPolygon AmoyWebSocket
xdcXDC NetworkWebSocket
xdc-apothemXDC ApothemWebSocket
stabilityStability MainnetHTTP polling
stability-testnetStability TestnetHTTP polling
astronAstron MainnetHTTP polling
astron-testnetAstron TestnetHTTP polling

Actual delivery timing depends on your confirmations setting in config.json — events are held until that many blocks have passed after the transaction. For example, with "confirmations": 3 on Ethereum, delivery takes roughly 36 seconds (3 × 12 sec).

Prerequisites

  • A container runtime or managed service — Docker, AWS ECS, EC2, or any environment that can run a container image
  • Access to an RPC endpoint for each chain you want to watch (WebSocket for EVM chains, HTTP for Stability/Astron)
  • A database — PostgreSQL, MySQL, MariaDB, or MSSQL (optional but recommended — enables state persistence and hot restarts)
  • An HTTP endpoint on your system that can receive POST requests
No database?

The container runs without a database using in-memory state. If the container restarts it will replay missed events from the last known block. For production use, connect a database so state survives restarts.

Next Steps

  1. Quick Start — get running in under 5 minutes
  2. Configuration Reference — all config.json and environment variable options
  3. Webhook Payload & Verification — event schema and signature verification
  4. Registry API — add and remove registries at runtime