Skip to main content
All four packages share one version number. Install the one for your runtime.
The current release is v0.12.0. Use that tag for the Rust crate.

Supported runtimes

TypeScript: load the WebAssembly binary

The TypeScript package wraps the Rust engine compiled to WebAssembly. Call init() once before you construct any client. It takes no argument in browsers or in Node.
Your bundler must emit the packaged vendor/bindings_wasm_bg.wasm asset. To serve the binary from your own CDN, pass its location:
wasmUrl points at the packaged binary if you need to copy it. For a pre-compiled WebAssembly.Module, use initWithModule.
Bundling the Node entry into a single file (a CLI or serverless artifact) moves the module away from its packaged vendor/ folder, and the default lookup finds nothing. Copy bindings_wasm_bg.wasm next to your output and pass it to init(). This only fails at runtime, so check it before you ship.

Subpath entry points

React Native

The browser package cannot run on a device because Hermes has no WebAssembly. @kaleidorg/swap-sdk-react-native is the same Rust engine compiled for iOS and Android and exposed as a turbo module.
  • Prebuilt native binaries are downloaded from the release on install and verified against a SHA-256 manifest shipped in the npm package. No Rust toolchain, NDK, or Xcode is needed. Run pod install for iOS afterwards.
  • With pnpm 10 or later, allow the package’s install script, or the binaries are never fetched and the module is missing at first import:
    pnpm-workspace.yaml
  • With Expo, use expo prebuild and a development build.
  • The Arkade venue is a separate entry, @kaleidorg/swap-sdk-react-native/arkade. It needs @kaleidorg/swap-sdk, @arkade-os/sdk, and @arkade-os/swap installed alongside, and Metro must resolve package exports (the default from React Native 0.79).
Phones sleep and swaps have deadlines. Read Common mistakes before you ship.

Pinning a version

The SDK is 0.x: a minor release can change the public surface, and patch releases never do. Depend on the minor you tested and take its patches: “@kaleidorg/swap-sdk”: ”^0.12.0” in package.json, or kaleidorg_swap_sdk~=0.12.0 in Python. On a 0.x version both forms accept patches and never cross into the next minor. Read the changelog before moving to a new minor. Breaking changes are listed at the top of each release entry.

Next steps

Quickstart

Reach the signet maker and make a first swap.

Networks

Pick the network and matching chain access.