Skip to main content

Node.js Setup

This guide covers using the Privacy Boost WASM SDK in Node.js environments.

Prerequisites

  • Node.js 18.0 or later (for native WASM support)
  • npm/yarn/pnpm

Installation

Basic Usage

Server-Side Wallet Adapter

For server-side usage, create a wallet adapter using ethers.js or viem:

With ethers.js

With viem

Complete Server Example

Express.js API Server

Batch Processing Script

Environment Variables

Create a .env file:
Load with dotenv:

Error Handling

Next Steps