Nimiq

Nimiq Hub

The secure wallet integration API that lets your users sign transactions, manage accounts, and interact with the blockchain — without you ever touching their private keys.

Get started now

Request a payment and get the signed transaction.

pnpm add @nimiq/hub-api
import HubApi from '@nimiq/hub-api'

const hubApi = new HubApi('https://hub.nimiq.com')

const result = await hubApi.checkout({
  appName: 'My Shop',
  recipient: 'NQ07 0000 0000 0000 0000 0000 0000 0000 0000',
  value: 1_000, // 0.01 NIM in Luna
})

console.log('Payment complete:', result.hash)
Why Use Hub API

Secure Wallet Integration Made Simple

The Hub provides a unified interface for all Nimiq wallet operations. Your users maintain full control of their keys while you get a simple, powerful API.
Zero Key Management
Private keys never leave the secure Keyguard environment
Trusted by Users
Same interface across all Nimiq apps
Multi-Chain Ready
Support for Nimiq today; Bitcoin and Polygon flows require a privileged Hub origin
Simple Integration
CDN or NPM — start in minutes
Type-Safe API
Full TypeScript definitions included
Mobile Friendly
Popup or redirect flows for all devices
How the Hub Architecture Works — Learn about the Hub-Keyguard relationship, request behaviors, and security model.
Quick Start

Jump right in

Choose your integration path and start building.
Getting Started Guide
Install the Hub API and make your first request in 5 minutes
API Reference
Complete documentation for all Hub methods and types
Starter Template
Ready-to-use integration boilerplate
Need Lower-Level Control? — For advanced use cases requiring direct blockchain access, consider using the Web Client or RPC API.

Hub Capabilities

Flexible integration options. Choose your integration style, access powerful methods, and support multiple chains.

Security First

The Hub uses a separate secure origin (Keyguard) to store and manage private keys. Your application never has access to user keys — all signing happens in the isolated Keyguard environment.

Choose your integration style

Select how the Hub appears to your users.

Request behaviour

Popup (Default)
Opens in a centered popup window
Redirect
Full-page redirect for mobile-friendly flows
IFrame
Seamless integration for privileged origins

Core Methods

Payments
Accept NIM with checkout() and signTransaction()
Authentication
Sign messages for secure user login with signMessage()
Cashlinks
Create shareable payment links with createCashlink()

Multi-Chain Support

Bitcoin
Sign Bitcoin transactions with signBtcTransaction()
Polygon
Sign EVM transactions with signPolygonTransaction()
Atomic Swaps
Trustless cross-chain trading with setupSwap()
Copyright © 2026