Install @galliun/sdk from npm. The SDK depends on @galliun/shared types internally — you do not need to install shared separately for typical usage.
npm
npm install @galliun/sdk
pnpm
pnpm add @galliun/sdk
bun
bun add @galliun/sdk
Requirements
- Node.js 18+ or Bun 1.0+
- A wallet adapter for your target chain (Sui or Solana)
- Network access to
https://api.galliun.com(or your self-hosted API base URL)
TypeScript
The SDK ships with TypeScript declarations. Enable "moduleResolution": "bundler" or "node16" in your tsconfig.json for best compatibility.
Monorepo development
If you are developing inside the Galliun monorepo:
bun add @galliun/sdk@workspace:*
Build shared packages first:
bun run build:packages
Common mistakes
- Missing wallet adapter — the SDK does not bundle browser wallet libraries. You provide a
PaymentWalletAdapterimplementation. - Wrong chain — your client's
chainoption must match an option in the 402acceptsarray. - Stale SDK — check the changelog when upgrading.