The Problem

Building onchain applications means wiring wallets, swaps, identity, and transactions against blockchain RPCs and Coinbase APIs — repetitive, error-prone boilerplate that has nothing to do with the product. OnchainKit packages that plumbing into ready-made React components and TypeScript utilities so a team can ship a working onchain app without reimplementing wallet connection, token swaps, or Farcaster frames.

What This Does

This is a fork of coinbase/onchainkit (1,043 upstream stars) containing four self-contained projects. The core is packages/onchainkit — React components for buy, swap, fund, earn, wallet, identity, and appchain bridge flows, plus an api/ layer for Coinbase transactions. packages/create-onchain is a scaffolding CLI. packages/miniapp-manifest-generator is a browser tool for generating mini-app manifests. examples/minikit-example is a Next.js reference app demonstrating Farcaster frames (app/actions/AddFrame.tsx, SendToken.tsx, SwapToken.tsx).

How It Is Wired

Execution starts at init in packages/create-onchain/src/cli.ts, which reaches 18 functions; the only traced path leaving the process is init -> getVersion, a filesystem read via fs.readFile. The rest of the system is React context and hooks, not a linear pipeline.

Everything routes through a small set of shared modules. styles/theme.ts is a hub with 62 dependents — churn there has a wide blast radius. swap/types.ts (39 dependents), fund/types.ts (37), and api/types.ts (31) are type hubs. Four modules sit in import cycles (swap/types, WalletProvider, api/types, transaction/types), which makes isolated changes and testing harder than the file count suggests.

The most-called functions carry the runtime: sendAnalytics (18 call sites), useFundContext (17), useEarnContext and useAnalytics (16 each). FundCardProvider.tsx and EarnProvider.tsx each feed 13 files; buildErrorStruct in api/utils/buildErrorStruct.ts centralizes error shaping across 10 callers.

How To Use It

git clone https://github.com/moses-y/onchainkit.git
pnpm install
pnpm f:ock build        # build the core package
npm create onchain       # scaffold a new app

Requires Node.js v20 and pnpm v10. No environment variables are documented in the repo. The README's quickstart is npm create onchain; package shorthands like pnpm f:play dev:watch run the playground at localhost:3000.

Real-World Use

A team building a Farcaster mini-app uses examples/minikit-example as the starting point: app/rootProvider.tsx wires the OnchainKit provider, app/actions/SendToken.tsx and SwapToken.tsx expose frame actions, and app/api/me/route.ts serves user data. The frame manifest generated by miniapp-manifest-generator gets deployed with the app.

Code Health & Issues

Static analysis found 94 findings (50 high, 44 medium): 34 import-cycle members, 22 hub modules, 2 oversized files (identity/abis/L2ResolverAbi.ts and appchain/bridge/abi.ts, 1,282 lines each), and high branching density in OnchainKitProvider.tsx and useGetETHBalance.ts. 418 test files exist and CI runs via GitHub Actions.

SDLC findings from the workflow files:

  • High — CI never executes the test suite: 407 test files, no test command in the 4 workflows read. A green check that ran no assertions is worse than none. Add a test step to the existing workflow.
  • Med — No Dependabot/Renovate config; 7 manifests, no update bot. Advisories sit unpatched until manual audit.
  • Med — No dependency vulnerability scan in CI; add dependency-review-action or osv-scanner.
  • Med — build.yml checkout keeps persist-credentials true; set it false so a malicious postinstall script can't read a pushable token.
  • Low — No timeout-minutes on workflow jobs; a wedged step runs to the six-hour platform default.

The Bottom Line

A competent fork of a mature, well-tested onchain component library with solid structure and real reference examples. The one thing to fix before trusting CI is making the workflows actually run the existing test suite. Use it if you're building Coinbase-ecosystem onchain apps and want the wallet/swap/frame boilerplate pre-solved.