How khayaai/openfireblocks works
OpenFireblocks is a multi-tenant Ethereum settlement platform. Tenant clients authenticate with API keys and submit synchronous signing requests or durable settlements; the gateway applies policy and risk checks, delegates signing, records transaction and audit data, and can broadcast to Ethereum. Settlements use Temporal workflows for approval, retries, broadcast, and monitoring. Admins manage tenants and inspect usage; Prometheus metrics expose operational and business activity. The README documents Vault-backed keys, immutable audit, and OPA, but their runtime wiring is not fully visible in the excerpts, so those links are omitted or marked unverified.
Main entry points: sign.service.ts Sign orchestration · sign.controller.ts Signing API · signer.go MPC signer · main.ts API gateway
Components 29
Gateway and tenants
- API gateway
services/api-gateway/src/main.ts - API-key auth
services/api-gateway/src/auth/api-key.guard.ts - Tenant management
services/api-gateway/src/customers/customer.service.ts - Admin routes
services/api-gateway/src/customers/customer.controller.ts - Signing API
services/api-gateway/src/sign/sign.controller.ts
Signing and controls
- Sign orchestration
services/api-gateway/src/sign/sign.service.ts - Policy checks
services/api-gateway/src/policies/policy.service.ts - Risk controls
services/api-gateway/src/risk/risk.service.ts - MPC signer
services/mpc-signer/signer.go - TSS core
services/mpc-signer/tss/tss.go - Ethereum RPC
services/api-gateway/src/blockchain/ethereum.service.ts - Transaction preparation
services/api-gateway/src/blockchain/prepare.service.ts - OPA policy service
services/policy-service/main.go
Settlement orchestration
- Settlement API
services/api-gateway/src/settlements/settlements.controller.ts - Temporal client
services/api-gateway/src/settlements/temporal.service.ts - Workflow worker
services/temporal-worker/main.go - Settlement workflow
services/temporal-worker/workflows/transaction_settlement.go - Workflow activities
services/temporal-worker/activities/activities.go
Persistence and observability
- PostgreSQL transactions
services/api-gateway/src/database/postgres.service.ts - Audit trail
services/api-gateway/src/database/audit.service.ts - Prometheus metrics
services/api-gateway/src/monitoring/metrics.service.ts
Client SDKs
- JavaScript SDK
sdks/sdk-js/src/index.ts - Go SDK
sdks/sdk-go/client.go - Python SDK
sdks/sdk-python/openfireblocks/client.py
Other components
- Tenant client
- Platform admin
- Vault key store
- immudb audit store
- Ethereum network
Connections 33
- Tenant client → JavaScript SDK: uses
- Tenant client → Go SDK: uses
- Tenant client → Python SDK: uses
- JavaScript SDK → API gateway: calls API
- Go SDK → API gateway: calls API
- Python SDK → API gateway: calls API
- Platform admin → Admin routes: manages tenants
services/api-gateway/src/customers/customer.controller.ts - Admin routes → Tenant management: manages
services/api-gateway/src/customers/customer.controller.ts - Tenant client → Signing API: submits request
services/api-gateway/src/sign/sign.controller.ts - Signing API → API-key auth: guards routes
services/api-gateway/src/sign/sign.controller.ts - API-key auth → Tenant management: resolves key
services/api-gateway/src/auth/api-key.guard.ts - Signing API → Sign orchestration: delegates signing
services/api-gateway/src/sign/sign.controller.ts - Sign orchestration → Policy checks: evaluates policy
services/api-gateway/src/sign/sign.service.ts - Sign orchestration → Risk controls: checks velocity
services/api-gateway/src/sign/sign.service.ts - Sign orchestration → MPC signer: requests signature
services/api-gateway/src/sign/sign.service.ts - Sign orchestration → PostgreSQL transactions: saves transaction
services/api-gateway/src/sign/sign.service.ts - Sign orchestration → Audit trail: records events
services/api-gateway/src/sign/sign.service.ts - Sign orchestration → Ethereum RPC: broadcasts signed tx
services/api-gateway/src/sign/sign.service.ts - Signing API → Transaction preparation: prepares request
services/api-gateway/src/sign/sign.controller.ts - Transaction preparation → Ethereum RPC: gets network data
services/api-gateway/src/blockchain/prepare.service.ts - Ethereum RPC → Ethereum network: submits transaction
- Signing API → PostgreSQL transactions: reads transactions
services/api-gateway/src/sign/sign.controller.ts - Signing API → Audit trail: reads audit trail
services/api-gateway/src/sign/sign.controller.ts - MPC signer → TSS core: uses core
- MPC signer → Vault key store: loads keys
- MPC signer → immudb audit store: writes audit
- Settlement API → API-key auth: guards routes
services/api-gateway/src/settlements/settlements.controller.ts - Settlement API → Temporal client: starts workflow
services/api-gateway/src/settlements/settlements.controller.ts - Temporal client → Workflow worker: dispatches workflow
- Workflow worker → Settlement workflow: runs
services/temporal-worker/main.go - Settlement workflow → Workflow activities: executes activities
services/temporal-worker/workflows/transaction_settlement.go - API gateway → Prometheus metrics: exposes metrics
- Policy checks → OPA policy service: evaluates remotely