Installation
npm
npm install clutch-hub-sdk-js
Version strategies
| Use case | Package spec | Example |
|---|---|---|
| Production | Pinned version | "1.22.1" |
| Development | Caret range | "^1.22.0" |
| Canary | Tag | @canary |
# Install latest
npm install clutch-hub-sdk-js
# Install canary (bleeding edge)
npm install clutch-hub-sdk-js@canary
# Check available versions
npm view clutch-hub-sdk-js versions --json
Requirements
- Node.js 18+ (20+ recommended)
- ES2020+ (BigInt support)
- Browser or Node.js environment with
fetch/ axios support
Constructor
Both arguments are required:
new ClutchHubSdk(apiUrl: string, publicKey: string)
The SDK automatically obtains a JWT via generateToken when calling authenticated methods.