Skip to main content
The SDK is built on @solana/kit, MIT licensed, and published as ESM only.

Environment support

The package targets ESM ("type": "module"), but its ESM resolution has real limitations — supported consumption splits into two scenarios:

Server-side

Node scripts, tests, tooling: use Bun.

Client-side

Anything bundler-fronted (webpack, Vite, Rollup, …): works as-is. Webpack specifically needs resolve.fullySpecified: false on .m?js$; most other bundlers are lenient by default.
Not currently supported: bare node with no Bun and no bundler in front of it.

Why the split exists

Part of the SDK — the swap-quote engine — is a Rust crate compiled to WebAssembly and shipped inside the package (see Quoting without the SDK for what that crate does standalone). Loading that WASM module correctly across Bun, bundlers, and bare Node’s differing ESM/module resolution behavior is exactly the kind of thing that’s easy to get right for two of the three and miss for the third — bare Node is the one that isn’t currently verified working, so treat it as unsupported until it’s explicitly documented otherwise, even though nothing prevents trying it.