Skip to main content

Getting Started

Installation

Install the latest version of the SDK with:
Recommended: We strongly recommend using bun as your package manager. All examples are tested with bun.
bun add @kynesyslabs/demosdk@latest

Polyfills

When working on a browser environment, you need to configure polyfills for Buffer. For a Vite project, this can be done using the vite-plugin-node-polyfills plugin.
bun add --dev vite-plugin-node-polyfills
Then update your vite.config.ts to register the plugin and select polyfills.
import { defineConfig } from "vite";
import { nodePolyfills } from "vite-plugin-node-polyfills";

export default defineConfig({
  plugins: [
    // ...
    nodePolyfills({
      globals: {
        Buffer: true,
      },
    }),
  ],
});

Check out the plugin documentation for configuring other polyfills.

Next Steps