The TypeScript and Solidity monorepo for building on Abstract — smart-account SDKs, a headless CLI for agents, on-chain payment primitives, and the contracts behind them.
This repository publishes the client-side surface area for Abstract Global Wallet (AGW) — a cross-application smart contract wallet powered by Abstract's native account abstraction — along with the mppx payment method plugin for Abstract and the Solidity contracts it settles against.
Everything is built on viem, ships ESM + CJS dual builds with full type definitions, and is released with npm provenance.
| Package | Description | Version |
|---|---|---|
@abstract-foundation/agw-client |
Core viem-based client for AGW — transactions, sponsored gas, session keys, typed signatures. | |
@abstract-foundation/agw-react |
React hooks and connectors for AGW — Wagmi, Privy, and Thirdweb integrations. | |
@abstract-foundation/agw-web |
Generic EIP-6963 provider for AGW. Framework-agnostic. | |
@abstract-foundation/web3-react-agw |
@web3-react/core connector for AGW. |
|
@abstract-foundation/agw-cli |
Agent-first CLI and MCP server for AGW workflows. JSON-first, sanitizable, with Claude Code and Gemini extension scaffolds. | |
@abstract-foundation/mpp |
mppx payment method plugin for Abstract — ERC-3009 one-shot charges and ERC-20 payment-channel sessions. |
| Path | Description |
|---|---|
packages/agw-core |
Shared command registry and error envelopes consumed by agw-cli. Private, not published. |
packages/contracts |
Foundry/ZKsync Solidity project. Houses AbstractStreamChannel.sol (payment channel escrow used by @abstract-foundation/mpp). |
| Path | Description |
|---|---|
apps/cli-companion |
Next.js browser-side trust boundary for AGW session approval (onboarding, delegated signer approval, revoke). Deployed as the companion URL the CLI opens. |
| Path | Description |
|---|---|
examples/agent-client |
Minimal mppx client paying an Abstract-gated API with @abstract-foundation/mpp. |
examples/hono-server |
Hono server that charges ERC-3009 and opens payment channel sessions via @abstract-foundation/mpp. |
examples/mpp-demo |
Next.js demo combining AGW login with the MPP payment flow end-to-end. |
| Path | Description |
|---|---|
tools/skills |
Abstract Skills — Claude Code plugin with opinionated skills for building on Abstract (wallet integration, contract deployment, MCP usage, prediction markets, ERC-8004, Safe multisig). |
Install the SDK you need. Most applications start with one of:
# React app using wagmi / Privy / Thirdweb
npm install @abstract-foundation/agw-react
# Framework-agnostic / vanilla TypeScript
npm install @abstract-foundation/agw-client
# Agent / CLI workflows
npm install -g @abstract-foundation/agw-cliMinimal React example:
import { useLoginWithAbstract } from "@abstract-foundation/agw-react";
export function Login() {
const { login, logout } = useLoginWithAbstract();
return <button onClick={login}>Connect with Abstract</button>;
}Minimal client example:
import { createAbstractClient } from "@abstract-foundation/agw-client";
import { abstractTestnet } from "viem/chains";
const client = await createAbstractClient({ signer, chain: abstractTestnet });
const hash = await client.sendTransaction({ to, value });See each package's README for full API reference and sponsored transaction / session key examples.
abstract-packages/
├── apps/ # Deployable applications
│ └── cli-companion/ # Next.js session approval UI
├── examples/ # Runnable reference integrations
│ ├── agent-client/ # mppx client example
│ ├── hono-server/ # Hono + mpp server example
│ └── mpp-demo/ # Full Next.js demo
├── packages/ # Published + internal packages
│ ├── agw-cli/ # Published — agent-first CLI
│ ├── agw-client/ # Published — core viem client
│ ├── agw-core/ # Internal — shared CLI core
│ ├── agw-react/ # Published — React bindings
│ ├── agw-web/ # Published — EIP-6963 provider
│ ├── contracts/ # Internal — Foundry/ZKsync contracts
│ ├── mpp/ # Published — mppx payment plugin
│ └── web3-react-agw/ # Published — web3-react connector
├── tools/ # Developer tooling
│ └── skills/ # Abstract Skills plugin for Claude Code
├── .changeset/ # Changesets config and queued releases
└── .github/ # CI workflows and release scripts
| Concern | Tool |
|---|---|
| Package manager | pnpm (10.x, enforced via packageManager) |
| Task runner | Turborepo |
| Lint + format | Biome |
| TypeScript | 5.x (shared tsconfig.base.json, strict + noUncheckedIndexedAccess) |
| Unit tests | Vitest |
| Solidity | Foundry with ZKsync toolchain |
| Versioning | Changesets |
| Git hooks | husky + lint-staged |
- Node.js ≥ 20 (CI runs on Node 24).
- pnpm 10.30.2 or later —
corepack enablethencorepack prepare pnpm@10.30.2 --activate. - Foundry (only if working on
packages/contractsor running@abstract-foundation/agw-clienttests that spin up anvil).
Install, build, and verify:
pnpm install
pnpm build # turbo run build across the graph
pnpm typecheck # turbo run typecheck
pnpm test # turbo run test across the graph (requires Foundry for contracts + agw-client anvil tests)
pnpm lint # biome lint
pnpm format # biome format --writeWork on a single package with Turbo's filter syntax:
pnpm --filter @abstract-foundation/agw-client build
pnpm --filter @abstract-foundation/agw-react typecheck
pnpm --filter @abstract-foundation/agw-cli devSolidity work happens inside packages/contracts via Foundry:
pnpm --filter contracts install # runs ./scripts/install.mjs (soldeer)
pnpm --filter contracts build
pnpm --filter contracts test
pnpm --filter contracts build:zksync
pnpm --filter contracts test:zksyncPublic packages ship via Changesets with npm provenance. In short:
- Author a changeset in your PR:
pnpm changeset(choose affected packages and bump type). - Merge to
main. - The
Release PRworkflow opens or updates a "Version Packages" PR that applies version bumps and changelog entries. - Merging that PR triggers the
Publishworkflow, which re-runs the release-surface +agw-clientverification jobs and then runspnpm changeset:publish.
Private packages (contracts, agw-core, example apps, cli-companion) are ignored by Changesets (see .changeset/config.json) and never published.
See CONTRIBUTING.md for the full workflow, including CI layout, package-specific checks, and the ci:release-surface validation that every publishable package must pass.
- Abstract docs: https://docs.abs.xyz
- AGW overview: https://docs.abs.xyz/how-abstract-works/abstract-global-wallet/overview
- Native account abstraction: https://docs.abs.xyz/how-abstract-works/native-account-abstraction
See CONTRIBUTING.md. Issues and PRs are welcome.
MIT. Each published package declares MIT in its own package.json; see the package directories for details.