AnchorKit is an open-source Stellar developer toolkit maintained under the GitHub organisation
stellar-commons-labs. It helps builders create, test, and debug Stellar payment flows, anchor
SEP-style workflows, wallet integrations, and Soroban-based treasury/escrow logic.
This repo is structured as a pnpm + Turborepo monorepo with:
@anchorkit/stellar-kit– TypeScript utilities for Stellar accounts, assets, payments, memos, transaction hashes, Stellar Expert links, and typed error mapping.@anchorkit/anchor-utils– SEP-style anchor flow helpers: deposit/withdrawal metadata parsing, anchor transaction status types and user-facing messages, mock record fixtures and lifecycle generators.@anchorkit/types,@anchorkit/config,@anchorkit/validators– shared types, network configuration, and Zod validation schemas.apps/web– a Next.js dashboard that surfaces accounts, payments, anchors, and escrow flows with testnet-first warnings.contracts/treasury-escrow– a Rust Soroban smart contract that implements a basic community treasury escrow with milestones, evidence, approvals, disputes, and releases.
Most Stellar builders repeatedly re-implement small primitives around keypair validation, memo sanitisation, payment amount normalisation, asset parsing, Horizon error handling, and anchor status mapping. AnchorKit packages these primitives as tested, secret-safe, TypeScript packages and pairs them with a Soroban contract example and a local dashboard that developers can run against testnet without needing any API keys.
- Testnet first. Mainnet support is configuration-only and explicitly disabled by default.
- Secret-safe. Secret keys are never logged, echoed, or transmitted by the utilities. They are redacted in errors, logs, and UI output.
- Typed errors. Stellar SDK / Horizon failures are mapped into typed
StellarKitErrorvalues so callers can react programmatically. - SEP-flavoured without over-reach. Anchor utilities are parsing and fixture helpers, not a fully compliant SEP server. A production anchor should build on top.
- Contributor friendly. Monorepo task graph, lint/typecheck/test scripts, issue templates, PR template, labels, and a GrantFox workflow are shipped in the MVP.
AnchorKit/
├─ apps/
│ └─ web/ Next.js dashboard (Tailwind CSS, App Router)
├─ packages/
│ ├─ types/ Shared branded types
│ ├─ config/ Network + environment config
│ ├─ validators/ Zod validation schemas
│ ├─ stellar-kit/ Core Stellar utilities + tests
│ └─ anchor-utils/ SEP-style anchor utilities + tests
├─ contracts/
│ └─ treasury-escrow/ Soroban Rust contract + tests
├─ docs/ All project documentation
├─ examples/ Seed fixtures and example JSON files
├─ scripts/ Helper shell / TS scripts
├─ .github/
│ ├─ workflows/ CI actions (install, lint, typecheck, test, build, contract tests)
│ ├─ ISSUE_TEMPLATE/ Issue templates
│ └─ PULL_REQUEST_TEMPLATE.md
├─ pnpm-workspace.yaml
├─ turbo.json
└─ tsconfig.base.json
See ARCHITECTURE.md for deeper package boundaries.