Installation

Get Buff SDK installed in your project in under a minute.

Install the package

$npm install @buff/sdk

Peer Dependencies

Buff SDK requires @solana/web3.js as a peer dependency. If you don't already have it:

$npm install @solana/web3.js

Requirements

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 { PLAN_TIERS, calculateRoundUp } from "@buff/sdk"
2
3// Check it works
4console.log(PLAN_TIERS)
5// { seed: { name: 'Seed', roundToUsd: 0.05, ... }, ... }
6
7const result = calculateRoundUp(27.63, 0.50)
8console.log(result)
9// { roundUpUsd: 0.37, skipped: false, capped: false }