Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 1.08 KB

File metadata and controls

27 lines (20 loc) · 1.08 KB

MBGA - Make Bitcoin Great Again

WAGMI-like library for the Spark ecosystem (Bitcoin L2/Lightning).

Project Structure

Monorepo with pnpm workspaces:

  • packages/core - @mbga/core: Framework-agnostic core (config, connectors, actions, state)
  • packages/connectors - @mbga/connectors: Wallet connector implementations (sats-connect, etc.)
  • packages/react - mbga: React hooks wrapping core
  • packages/test - @mbga/test: Test utilities and mock connectors

Commands

  • pnpm build - Build all packages (core -> connectors -> react)
  • pnpm test - Run tests with vitest
  • pnpm check - Lint and format with biome
  • pnpm check:types - TypeScript type checking

Conventions

  • TypeScript strict mode, ESM only
  • Biome for linting/formatting (single quotes, trailing commas, no semicolons)
  • Each package uses src/exports/ for public entrypoints
  • Connector interface pattern: createConnector() factory returning a connector object
  • React hooks follow useX naming, wrap core actions with TanStack Query
  • All packages build with tsup to dist/ (dual CJS/ESM + DTS)