Contributing to ASG Pay
April 12, 2026 · View on GitHub
Thank you for your interest in contributing to ASG Pay! This document provides guidelines and information about contributing to this project.
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/ASGCompute-ows-agent-pay.git cd ASGCompute-ows-agent-pay - Install dependencies:
npm install - Run tests to verify your setup:
npm test
Development Workflow
Branch Naming
feat/description— new featuresfix/description— bug fixesdocs/description— documentation changesrefactor/description— code refactoring
Before Submitting a PR
- Type check:
npm run typecheck - Run tests:
npm test - Build:
npm run build - Verify package:
npm pack --dry-run
All four must pass before your PR will be reviewed.
Adding a New Chain Adapter
ASG Pay is designed to be pluggable. To add a new blockchain:
- Create
src/adapters/yourchain.tsimplementing thePaymentAdapterinterface (~40 lines) - Add tests in
src/__tests__/yourchain.test.ts - Export from
src/adapters/index.tsandsrc/index.ts - Add the network to the README tables
- Update
CHANGELOG.md
See src/adapters/types.ts for the interface definition.
Code Style
- TypeScript strict mode — no
anytypes without explicit justification - Functional patterns — prefer pure functions over side effects
- Naming — use descriptive names; no abbreviations
- Comments — explain why, not what
Testing
# Run all unit tests (no secrets required)
npm test
# Run tests in watch mode during development
npm run test:watch
# Full suite including live Stripe integration (requires credentials)
STRIPE_SECRET_KEY=sk_live_... npm test
All new features must include tests. We target 100% coverage on critical paths (policy engine, protocol detection, payment settlement).
Reporting Issues
- Use GitHub Issues for bugs and feature requests
- For security vulnerabilities, see SECURITY.md
- Include reproduction steps, expected vs actual behavior, and Node.js version
License
By contributing, you agree that your contributions will be licensed under the MIT License.