1

Core Dependencies

Install the following packages:

npm install @gardenfi/core @gardenfi/orderbook @gardenfi/react-hooks @tanstack/react-query wagmi

In case your app supports Starknet you will also need these:

npm install @starknet-react/core starknet starknetkit
2

Required Polyfills

Install the Vite plugins:

npm install --save-dev vite-plugin-wasm vite-plugin-top-level-await vite-plugin-node-polyfills

Update your vite.config.ts as follows:

import { defineConfig } from "vite";
import wasm from "vite-plugin-wasm";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import topLevelAwait from "vite-plugin-top-level-await";

export default defineConfig({
plugins: [
    nodePolyfills(),
    wasm(),
    topLevelAwait(),
    // Other plugins
],
// Other settings
});