Skip to content

DpacJones/effectstream

 
 

Repository files navigation

Effectstream

A multi-chain Web3 engine for building multi-chain dApps, infrastructure and onchain games.

Home · Docs · Blog

  • Multi-chain by default. EVM, Midnight, Bitcoin, Cardano, Avail, Celestia, and NEAR — one state machine, many chains.
  • Sovereign rollups. App-specific L2s that inherit finality from the underlying L1, with no custodial bridge.
  • Modular. Pick the chains and modules you need. Everything ships as a separate @effectstream/* package.
  • Bun-native. The whole monorepo runs on Bun. No build step for development; TypeScript executes directly.

Quick start

Run a sample project:

git clone https://github.com/effectstream/effectstream.git
cd effectstream/templates/evm-midnight-v2
bun i
bun run dev

bun run dev brings up the full local stack: PGLite, Hardhat, a Midnight node, contract deployment, the sync node, the batcher, and the frontend. Open http://localhost:10599 once everything is up.

What it is

Effectstream is a framework for building dApps that read state from multiple chains and fold their updates into a single deterministic state machine. You write your app logic in TypeScript, point it at one or more chains, and Effectstream handles sync (read), batching (write), indexing, and the frontend connection.

For more information visit the docs site.

Templates

templates/ has ready-to-run examples. Each one is a self-contained Bun workspace you can copy and modify.

Template What it shows
minimal Smallest possible Effectstream app
evm-midnight-v2 EVM + Midnight, ERC-721 sync, ZK contracts, full React frontend
chess-v2 Onchain chess with matchmaking
batcher-validations Custom Batcher Validation
preorder dApp (Cardano+EVM) for Assets Presale
zswap-da Midnight Zswap for decentralized liquidity
more Explore the examples

Repository layout

Directory What lives here
packages/effectstream-sdk/ Core SDK: config, events, crypto, wallets, log, schemas, chain types
packages/node-sdk/ Runtime engine: database, state machine, sync, node entry point
packages/chains/ Per-chain contract interfaces (EVM, Midnight, Bitcoin, Cardano, Avail)
packages/batcher/ Cross-chain transaction batching
packages/binaries/ NPM-wrapped blockchain node binaries
packages/build-tools/ Orchestrator, explorer, TUI
packages/frontend/ React frontend SDK
e2e/ Integration test suites (one per chain)
docs/site/ Docusaurus documentation site

Orchestrator

The orchestrator runs your dev stack. It supervises every process an Effectstream app needs (chains, contract deployment, sync node, batcher, frontend, plus any custom action you wire in) and gives you one place to start, stop, and inspect them. You don't have to be building a multi-chain app to want it; a single-chain dev loop is nicer with it too.

bunx orchestrator start --background   # --background enables status and logs
bunx orchestrator status
bunx orchestrator logs
bunx orchestrator stop

Package Development

# Unit tests
bun test ./packages

# All e2e suites (run serially because they share ports)
cd e2e && bun run runner.ts

# Run a single suite (or a few)
cd e2e && bun run runner.ts evm bitcoin

Available suites: evm, bitcoin, cardano, midnight, avail, celestia, near, features, wallets.

Contribution guide: docs/site/docs/home/1000-effectstream-engine/1100-contributions.md.

Some templates ship a link.sh script that points the dApp at the local @effectstream/* source instead of the published packages, so you can make improvements on the engine itself.

Published packages

Everything below is published on npm under @effectstream/*. All packages share the same version line and are released together.

Core SDK

Package Description
@effectstream/utils Shared utilities
@effectstream/log OpenTelemetry observability
@effectstream/config Chain and runtime configuration
@effectstream/precompile Precompile utilities
@effectstream/chain-types Chain-specific type definitions
@effectstream/crypto Multi-chain signature verification
@effectstream/concise Type-safe schemas
@effectstream/event-client MQTT-based event client
@effectstream/wallets Wallet connector integrations
@effectstream/coroutine Async control flow

Node runtime

Package Description
@effectstream/db PostgreSQL and PgLite database layer
@effectstream/db-emulator In-memory test database
@effectstream/sync Blockchain sync service
@effectstream/sm State machine DSL
@effectstream/runtime State machine runtime
@effectstream/event-server Event server
@effectstream/node-sdk Main application node SDK

Chains

Package Description
@effectstream/evm-contracts EVM smart contract interfaces
@effectstream/evm-hardhat Hardhat deployment and JSON-RPC utilities
@effectstream/midnight-contracts Midnight network contract interfaces
@effectstream/bitcoin-contracts Bitcoin script utilities
@effectstream/cardano-contracts Cardano contract interfaces
@effectstream/avail-contracts Avail DA contract interfaces

Batcher

Package Description
@effectstream/batcher Cross-chain transaction batching
@effectstream/batcher-sdk Batcher SDK

Build tools & frontend

Package Description
@effectstream/orchestrator Multi-chain local development environment
@effectstream/tui Terminal UI
@effectstream/frontend-sdk React frontend SDK

Binary wrappers

Third-party blockchain binaries packaged for npm so you can install them with bun add instead of curl-pipe-bash.

Package Description
@effectstream/bitcoin-core Bitcoin Core
@effectstream/ord Ord
@effectstream/avail-light-client Avail light client
@effectstream/avail-node Avail node
@effectstream/midnight-node Midnight node
@effectstream/midnight-indexer Midnight indexer
@effectstream/midnight-proof-server Midnight proof server
@effectstream/near-sandbox NEAR sandbox
@effectstream/celestia Celestia
@effectstream/grafana-alloy Grafana Alloy
@effectstream/grafana-loki Grafana Loki

About

Chain abstraction orchestrator

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 69.8%
  • TypeScript 27.3%
  • Solidity 1.7%
  • CSS 0.6%
  • Shell 0.3%
  • HTML 0.1%
  • Other 0.2%