Calimero mero-js

JavaScript client for the Calimero node — auth, admin, contract execution, and real-time subscriptions.

Start Here

New to mero-js? Follow this path.

1

Getting Started

Install the SDK, authenticate, and make your first API call in minutes.

Quick Start →

2

Architecture

Understand how the SDK layers work — HttpClient, auth, admin, RPC, and event clients.

Read Architecture →

3

API Reference

Full reference for MeroJs, all property accessors, methods, and TypeScript types.

API Reference →

SDK Architecture

Your App Browser / Node / Edge MeroJs authenticate() setTokenData() isAuthenticated() token lifecycle AuthApiClient generateTokens · refresh · keys .auth AdminApiClient contexts · apps · groups .admin RpcClient execute WASM methods .rpc SseClient real-time events .events Calimero Node REST API · JSON-RPC · SSE port 2428 merod process

Quick Install

npm

npm install @calimero-network/mero-js

pnpm

pnpm add @calimero-network/mero-js

yarn

yarn add @calimero-network/mero-js

What's in the SDK

Clients

MeroJs
Main SDK class — wraps all clients, manages JWT token lifecycle
AuthApiClient
Login, token refresh, root keys, client keys
AdminApiClient
Contexts, applications, namespaces, groups (65+ methods)
RpcClient
Execute WASM contract methods via JSON-RPC
SseClient
Server-Sent Events for real-time application events
WsClient
WebSocket client (experimental — use SSE for production)

Utilities

parseAuthCallback
Parse SSO tokens from URL hash (Desktop SSO integration)
buildAuthLoginUrl
Build redirect URL for the Calimero auth flow
MemoryTokenStore
In-memory token persistence (no side-effects)
LocalStorageTokenStore
localStorage-backed token persistence
HTTPError
Typed HTTP error with status and statusText
RpcError
JSON-RPC error with numeric code and optional data