Installation
Get Buff SDK installed in your project in under a minute.
Install the package
$
npm install buff-protocol-sdkPeer Dependencies
Buff SDK requires @solana/web3.js as a peer dependency. If you don't already have it:
$
npm install @solana/web3.jsRequirements
Browser
Works out of the box in any modern browser. Uses Web Crypto API internally via @noble/hashes. No polyfills needed.
Node.js
Requires Node.js 18+ for native fetch support. No additional configuration needed.
Note
Buff uses
@noble/hashes for SHA-256 hashing (wallet derivation) — a pure JavaScript implementation with no WASM or native modules.Verify Installation
test.ts
typescript
1import { Buff } from "buff-protocol-sdk"23// Check it works4const buff = new Buff({ apiKey: "your-api-key" })5const plans = await buff.getPlans()6console.log(plans)7// { seed: { name: 'Seed', roundToUsd: 0.05, ... }, ... }89const result = await buff.calculateRoundUp(27.63)10console.log(result)11// { roundUpUsd: 0.07, skipped: false, capped: false }