Nimiq
Integrations

Nimiq Web Client ESM Integration

Use the Nimiq Web Client with native ES modules in modern browsers without a bundler.

Use this approach when you're serving JavaScript directly to the browser without a bundler — for example, from a plain HTML file, a CDN, or a static site. If you're using Vite, Nuxt, or Next.js, use their dedicated integration instead.

The ESM build (@nimiq/core/web) requires a manual init() call to load the WebAssembly module. See Browser vs Server for details on the different build targets.

Installation

pnpm add @nimiq/core

Configuration

No additional configuration needed! ESM works out of the box in modern browsers and bundlers that support ES modules.

Usage Example

JavaScript
import init, { Client, ClientConfiguration } from '@nimiq/core/web'

await init()

const config = new ClientConfiguration()
const client = await Client.create(config.build())

await client.waitForConsensusEstablished()

Next steps

Once your client is connected, see the guides to start building. For other integration options, see Vite, Nuxt, Next.js, or CommonJS.

Copyright © 2026