Skip to main content

Installation

npm

npm install clutch-hub-sdk-js

Version strategies

Use casePackage specExample
ProductionPinned version"1.22.1"
DevelopmentCaret range"^1.22.0"
CanaryTag@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

The first two arguments are required:

new ClutchHubSdk(apiUrl: string, publicKey: string, privateKey?: string)

The SDK automatically obtains a JWT via generateToken when calling authenticated methods. generateToken requires a signed proof-of-key-ownership challenge, so pass the wallet's private key (or call setPrivateKey later) before using authenticated methods; it stays local and is never sent to the API.

Next steps