Welcome, and thank you for taking time in contributing to SDK! You can contribute to SDK in different ways:
- Submit new features
- Report bugs
- Review code
If you want to read or modify the SDK code, set up your development environment as follows:
- Install Deno.
- Use VSCode Deno LSP or a similar extension if you are using a different editor.
deno test -AOptional: Set PRIVATE_KEY env for complete tests. Required testnet balance: ~100 usdc-perps, ~3 usdc-spot, ~0.0000001
hype-spot.
- Style: After making all changes, run:
deno task check - Dependencies: Use small and easily auditable dependencies (e.g. @noble/hashes or @std).
- Testing: Write tests for any new functionality.
- Docs: Update or add JSDoc comments where appropriate.
- Create a file named after the method in the matching group's
_methodsdirectory:src/api/[exchange|info|subscription|explorer]/_methods/[methodName].ts - Implement it using the patterns from existing method files.
- Re-export the file from the group barrel: add
export * from "./_methods/[methodName].ts";tosrc/api/[group]/mod.ts. - Add the matching wrapper method to the client in
src/api/[group]/client.ts. - Create a test at
tests/api/[group]/[methodName].test.ts(use patterns from other tests) and run it. - Run the
deno task checkcommand and fix any errors that are reported.
- Go to
src/api/[group]/_methods/[methodName].ts - Update the valibot schemas in the "Schemas" section (types are inferred from schemas).
- Run the test at
tests/api/[group]/[methodName].test.tsto check the schemas against the actual API response.