Thank you for your interest in contributing! You can contribute in several ways:
- Report bugs
- Suggest features
- Submit pull requests
- Improve documentation
# Clone
git clone https://github.com/wezzcoetzee/grvt.git
cd grvt
# Verify setup
deno task checksrc/
├── mod.ts # Main entry point, re-exports all modules
├── _base.ts # Base error class (GrvtError)
├── types/ # Enums and type definitions
│ ├── mod.ts
│ └── enums.ts
├── config/ # Environment and endpoint configuration
│ ├── mod.ts
│ ├── environment.ts
│ └── endpoints.ts
├── transport/ # HTTP and WebSocket transports
│ ├── mod.ts
│ ├── _base.ts
│ ├── http/
│ └── websocket/
├── signing/ # Order signing utilities
│ ├── mod.ts
│ ├── eip712.ts
│ ├── orderSigning.ts
│ ├── _abstractWallet.ts
│ └── _privateKeySigner.ts
├── raw/ # Low-level API client
│ ├── mod.ts
│ ├── client.ts
│ └── types.ts
└── ccxt/ # High-level CCXT-style client
├── mod.ts
├── client.ts
├── types.ts
└── utils.ts
# Run all tests
deno test -A
# Run specific test file
deno test -A tests/raw/client.test.tsFor integration tests, set GRVT_PRIVATE_KEY and GRVT_API_KEY environment variables with testnet credentials.
Run these commands before submitting:
# Format code
deno fmt
# Lint
deno lint
# Type check
deno check src/mod.ts- Dependencies: Minimize dependencies. Prefer small, auditable packages (e.g.,
@noble/hashes,@paulmillr/micro-eth-signer). - Types: Use explicit TypeScript types. Avoid
any. - Testing: Add tests for new functionality.
- Documentation: Update JSDoc comments for public APIs.
- Commits: Write clear, concise commit messages.
- Add the request/response types to
src/raw/types.ts - Implement the method in
src/raw/client.ts - Add tests in
tests/raw/ - Update documentation if needed
- Add parameter types to
src/ccxt/types.ts - Implement the method in
src/ccxt/client.ts - Add tests in
tests/ccxt/
- Modify files in
src/transport/http/orsrc/transport/websocket/ - Update the base interfaces in
src/transport/_base.tsif needed - Re-export new types from
src/transport/mod.ts
- Update
src/config/environment.tsorsrc/config/endpoints.ts - Re-export from
src/config/mod.ts - Re-export from
src/mod.tsif it's a public API
Open an issue or discussion if you have questions about contributing.