Warning
This is a POC for an Anchor SDK generated by Robots 🤖. Not for use in a production setting.
TypeScript monorepo for Stellar anchor infrastructure. Build compliant anchor services and client integrations with minimal boilerplate.
| Package | Description | Docs |
|---|---|---|
@stellarconnect/anchor |
Anchor server framework — SEP-1, SEP-6, SEP-10, SEP-24 | README |
@stellarconnect/sdk |
Client SDK — discovery, auth, deposits, withdrawals, polling | README |
@stellarconnect/core |
Core primitives — Signer, NetworkClient, TomlDiscovery, XDR | README |
@stellarconnect/signers |
Signer utilities — keypairSigner, callbackSigner | README |
Stand up a SEP-compliant anchor server in ~40 lines:
pnpm add @stellarconnect/anchor
pnpm add express cors @stellar/stellar-sdk # peer dependenciesimport express from 'express';
import cors from 'cors';
import { AnchorServer } from '@stellarconnect/anchor';
const anchor = new AnchorServer({
secretKey: process.env.STELLAR_SIGNING_KEY!,
jwtSecret: process.env.JWT_SECRET!,
domain: 'localhost:8000',
network: 'testnet',
assets: {
native: {
deposit: { enabled: true, minAmount: 1, maxAmount: 10000 },
withdraw: { enabled: true, minAmount: 1, maxAmount: 10000 },
},
},
});
const app = express();
app.use(cors({ origin: '*' }));
app.use(express.json());
app.use(anchor.toml()); // SEP-1: /.well-known/stellar.toml
app.use('/auth', anchor.sep10()); // SEP-10: Web Authentication
app.use('/sep24', anchor.sep24({ interactive: { url: 'http://localhost:8000/interactive-flow' } })); // SEP-24
app.use('/', anchor.sep24({ interactive: { url: 'http://localhost:8000/interactive-flow' } })); // SEP-24 pages
app.listen(8000, () => console.log('Anchor running on http://localhost:8000'));See the example anchor server for a working reference.
stellar-connect/
├── packages/
│ ├── core/ @stellarconnect/core
│ ├── anchor/ @stellarconnect/anchor
│ ├── sdk/ @stellarconnect/sdk
│ └── signers/ @stellarconnect/signers
├── examples/
│ └── anchor-server/ Working anchor server example
├── pnpm-workspace.yaml
├── tsconfig.json
└── package.json
- Node.js 18+
- pnpm 10+
pnpm install
pnpm build| Command | Description |
|---|---|
pnpm build |
Build all packages |
pnpm test |
Run all tests (199 tests across 4 packages) |
pnpm typecheck |
Type-check without emitting |
pnpm lint |
Lint all packages |
pnpm format |
Format with Prettier |
pnpm clean |
Remove all build artifacts and node_modules |
pnpm test| Package | Tests |
|---|---|
| core | 70 |
| anchor | 108 |
| sdk | 11 |
| signers | 11 |
Validate your anchor against the official Stellar Anchor Tests suite:
# Start the example server
cd examples/anchor-server
STELLAR_SIGNING_KEY=SBRVW5MTD2FGEQMYG77CAB5LYDVVNY7UOUOC2WUGPLUMRB5VJ27MSL2K \
JWT_SECRET=test-secret-key-minimum-32-characters-required-for-security \
PORT=8000 node dist/index.js
# Run compliance tests (in another terminal)
docker run --network host stellar/anchor-tests:latest \
--home-domain http://localhost:8000 --seps 1 10 24Expected: 55/55 tests pass.
┌─────────────────────────────────────────────┐
│ Client App │
│ @stellarconnect/sdk │
│ discovery · auth · deposits · polling │
├─────────────────────────────────────────────┤
│ @stellarconnect/signers │
│ keypairSigner · callbackSigner │
├─────────────────────────────────────────────┤
│ @stellarconnect/core │
│ Signer · NetworkClient · TomlDiscovery │
│ AccountInspector · XDR · Crypto │
└─────────────────────────────────────────────┘
┌─────────────────────────────────────────────┐
│ Anchor Server │
│ @stellarconnect/anchor │
│ AnchorServer · SEP-1 · SEP-6 · SEP-10 · │
│ SEP-24 · TransferStore · Hooks │
├─────────────────────────────────────────────┤
│ @stellarconnect/core │
│ Signer · Crypto · XDR │
└─────────────────────────────────────────────┘
- anchor depends on core — server-side framework
- sdk depends on core — client-side SDK
- signers depends on core — signer implementations
- core has no internal dependencies — foundational primitives
- TypeScript 5.3+ (ESM only)
- Express 4.x (anchor peer dependency)
@stellar/stellar-sdk^12.0.0- Vitest (testing)
- pnpm workspaces (monorepo)
MIT