Skip to content

Abstract-Foundation/abstract-packages

Repository files navigation

abstract banner

abstract-packages

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.


Overview

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.

Packages

Published SDKs

Package Description Version
@abstract-foundation/agw-client Core viem-based client for AGW — transactions, sponsored gas, session keys, typed signatures. npm
@abstract-foundation/agw-react React hooks and connectors for AGW — Wagmi, Privy, and Thirdweb integrations. npm
@abstract-foundation/agw-web Generic EIP-6963 provider for AGW. Framework-agnostic. npm
@abstract-foundation/web3-react-agw @web3-react/core connector for AGW. npm
@abstract-foundation/agw-cli Agent-first CLI and MCP server for AGW workflows. JSON-first, sanitizable, with Claude Code and Gemini extension scaffolds. npm
@abstract-foundation/mpp mppx payment method plugin for Abstract — ERC-3009 one-shot charges and ERC-20 payment-channel sessions. npm

Internal packages

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).

Apps

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.

Examples

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.

Tools

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).

Quick start

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-cli

Minimal 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.

Repository layout

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

Tooling

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

Prerequisites

  • Node.js ≥ 20 (CI runs on Node 24).
  • pnpm 10.30.2 or later — corepack enable then corepack prepare pnpm@10.30.2 --activate.
  • Foundry (only if working on packages/contracts or running @abstract-foundation/agw-client tests that spin up anvil).

Development

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 --write

Work 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 dev

Solidity 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:zksync

Releasing

Public packages ship via Changesets with npm provenance. In short:

  1. Author a changeset in your PR: pnpm changeset (choose affected packages and bump type).
  2. Merge to main.
  3. The Release PR workflow opens or updates a "Version Packages" PR that applies version bumps and changelog entries.
  4. Merging that PR triggers the Publish workflow, which re-runs the release-surface + agw-client verification jobs and then runs pnpm 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.

Documentation

Contributing

See CONTRIBUTING.md. Issues and PRs are welcome.

License

MIT. Each published package declares MIT in its own package.json; see the package directories for details.

About

SDKs and tooling for building on Abstract, including AGW clients, React/web integrations, CLI workflows, and MPP payments

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors