Development
Scripts, adding new tools, and code style.
Available scripts
| Script | Description |
|---|---|
npm run build | Compile TypeScript to JavaScript |
npm run start:dev | Run in development mode with hot reload |
npm run start:prod | Clean, build, then run the compiled output |
npm run lint | Run ESLint |
npm run format | Format with Prettier |
npm test | Run the Jest test suite |
Adding a new tool
With the feature-based layout, adding a Stellar tool takes four steps:
- Define the tool's Zod schema in
src/features/<classic|soroban>/schemas.ts. - Implement the tool logic in
src/features/<classic|soroban>/<classic|soroban>.ts. - Add the tool definition (name, description, input schema) in
src/tools/<classic|soroban>.ts. - Add the corresponding
casein the request handler insrc/index.ts.
Code style
- Use TypeScript for all new code.
- Add JSDoc comments for public functions and classes.
- Follow the existing patterns and conventions.
- Use conventional commit messages.
Formatting and linting run automatically on staged files via a Husky
pre-commit hook (lint-staged → Prettier + ESLint).