Skip to main content

Overview

Bridge Hub is a multi-chain indexing and claiming system for Agglayer bridge transactions. It polls each chain’s AggKit Bridge Service, indexes transaction data into MongoDB, and exposes the results through a unified REST API. Bridge Hub is designed for integrators who need a single interface to query and manage bridge transactions across all chains connected to the Agglayer.

Bridge Hub vs. AggKit Bridge Service

Data flow

CDK chain → AggKit Bridge Service → Bridge Hub Consumer → Bridge Hub API → Bridge UI / Auto-Claim

Packages

Transaction lifecycle

1

BRIDGED

A user initiates a bridge transaction on the source chain. The Consumer detects the deposit through the AggKit Bridge Service and saves the transaction to MongoDB with status BRIDGED.
2

READY_TO_CLAIM

The Consumer monitors L1 info tree updates and determines when the transaction becomes claimable. It updates the transaction status to READY_TO_CLAIM and sets the leaf index needed for proof generation.
3

CLAIMED

The Auto-Claim service (or an external caller) fetches a merkle proof from the API and submits a claim transaction on the destination chain. Once confirmed, the Consumer detects the claim event and updates the status to CLAIMED.

Technology stack

  • Bun: JavaScript runtime
  • Hono: Web framework for the REST API
  • viem: TypeScript Ethereum library for blockchain interactions
  • MongoDB: Document database for transaction storage
  • Lerna: Monorepo package management

Next steps

Architecture

System design, consumer internals, and database schema.

Deployment

Configuration, environment variables, and production setup.

API reference

REST endpoints, request parameters, and response schemas.

Auto-Claim

Automated claiming service setup and operation.