Reference

Packages

Public package and subpath reference for Onmax Mini Apps SDK.

Use this page when you know the package name and need its public subpaths, PKG.new install link, and first import.

All packages are ESM-only. Install packages from PKG.new, and include peer dependencies from the table when you use a subpath that needs them.

Package map

PackageUse whenDo not use forPeer dependencies
@onmax/nimiq-mini-app-kitBrowser mini-app provider access, Ethereum discovery, simulator tooling, Nuxt sidecarServer-side Nimiq RPC readsnuxt, vue
@onmax/better-auth-nimiqSame-device Nimiq wallet sign-in for Better AuthQR or second-device approvalbetter-auth, optional nuxt, vue
@onmax/better-auth-cross-deviceBetter Auth order lifecycle for login, sign, and transaction handoffNimiq proof verification by itselfbetter-auth
@onmax/cross-device-nimiqNimiq adapter and browser approver for cross-device ordersGeneric Better Auth session managementNone
@onmax/unimiqNimiq facade, address, signature, transaction, rate, Vue, Vite, Nuxt, mock helpersERC-20 contract callsvue, optional nuxt, vite
@onmax/unerc20ERC-20 reads and transfers through EIP-1193NIM transfersNone
@onmax/better-auth-ledgerApp-local balances on Better Auth usersRegulated payment settlementbetter-auth
@onmax/better-auth-nimiq-pay-e2eVitest auth scenarios and provider stubsProduction auth runtimeNode >=22

@onmax/nimiq-mini-app-kit

Mini-app runtime helpers for Nimiq, Ethereum discovery, simulator tooling, and Nuxt dev integration.

Install @onmax/nimiq-mini-app-kit

SubpathUse for
@onmax/nimiq-mini-app-kitProvider waits, Ethereum helpers, EIP-6963, language helpers
@onmax/nimiq-mini-app-kit/devLocal simulator, stub providers, bridge waits
@onmax/nimiq-mini-app-kit/host-runtimeCustom simulator host shells
@onmax/nimiq-mini-app-kit/provider-request-coordinatorSingle-flight provider request coordination
@onmax/nimiq-mini-app-kit/nuxtNuxt module and runtime exports
@onmax/nimiq-mini-app-kit/nuxt/runtimeNuxt runtime helpers
app/provider-status.ts
import { hasMiniAppProvider, resolveNimiqPayPreferredLanguage } from '@onmax/nimiq-mini-app-kit'

console.log({
  available: hasMiniAppProvider(),
  language: resolveNimiqPayPreferredLanguage(),
})

Use root imports in browser code. Use /dev only for local simulator and test setup.

@onmax/better-auth-nimiq

Better Auth plugin and client helpers for direct Nimiq authentication.

Install from PKG.new:

SubpathUse for
@onmax/better-auth-nimiqServer plugin, service, message helpers, address helpers
@onmax/better-auth-nimiq/clientClient plugin, sign-in helper, token helpers
@onmax/better-auth-nimiq/serverServer-side crypto and verification helpers
@onmax/better-auth-nimiq/server-coreLow-level Nimiq Core loading, key derivation, and signed transaction helpers
@onmax/better-auth-nimiq/providerMini-app provider types and provider lookup
@onmax/better-auth-nimiq/walletDeterministic wallet helpers
@onmax/better-auth-nimiq/kvKV nonce-store helpers
@onmax/better-auth-nimiq/nuxtNuxt integration helpers
@onmax/better-auth-nimiq/nuxt-moduleNuxt module entry
server/auth.ts
import { nimiqAuth } from '@onmax/better-auth-nimiq'

nimiqAuth({
  appName: 'Arcade Rewards',
  endpointPrefix: '/nimiq',
  nonceTtlSeconds: 300,
})

Use /client in browser code. Use /server, /kv, and root exports in server code.

@onmax/better-auth-cross-device

Better Auth plugin for login, sign, and transaction orders approved on another device.

Install from PKG.new:

SubpathUse for
@onmax/better-auth-cross-deviceServer plugin, adapter contract, lifecycle types
@onmax/better-auth-cross-device/clientStart, claim, approve, reject, cancel, finalize, and SSE helpers
app/desktop-order.ts
import { startCrossDeviceOrder, subscribeToCrossDeviceOrder } from '@onmax/better-auth-cross-device/client'

const order = await startCrossDeviceOrder(authClient.$fetch.bind(authClient), {
  endpointPrefix: '/cross-device',
  kind: 'login',
  displayTitle: 'Sign in to Arcade Rewards',
})

subscribeToCrossDeviceOrder({
  endpointPrefix: '/cross-device',
  orderId: order.orderId,
  desktopToken: order.desktopToken,
  onEvent: event => console.log(event),
})

Use this package for order state. Pair it with an adapter package such as @onmax/cross-device-nimiq to verify wallet proofs.

@onmax/cross-device-nimiq

Nimiq adapter for cross-device login and sign flows.

Install @onmax/cross-device-nimiq

SubpathUse for
@onmax/cross-device-nimiqBrowser approval helpers and server adapter
@onmax/cross-device-nimiq/serverServer-focused adapter exports
app/phone-approve.ts
import { createNimiqMiniAppApprover, parseCrossDeviceClaimUrl } from '@onmax/cross-device-nimiq'

const claim = parseCrossDeviceClaimUrl(window.location.href)
const approver = createNimiqMiniAppApprover()

await approver.approve(authClient.$fetch.bind(authClient), {
  ...claim,
  endpointPrefix: '/cross-device',
})

Use this in the phone approval surface. Do not expose the desktop token to this code path.

@onmax/unimiq

Universal Nimiq facade with Vite, Vue, and Nuxt integrations.

Install @onmax/unimiq

SubpathUse for
@onmax/unimiqFacade, address, signature, runtime, rate, and transaction helpers
@onmax/unimiq/mockMock driver
@onmax/unimiq/driversRPC, web-client, and mock drivers
@onmax/unimiq/viteVite plugin
@onmax/unimiq/vueVue address and identicon components
@onmax/unimiq/nuxtNuxt module
@onmax/unimiq/experimentalExperimental exports
server/nimiq.ts
import { createNimiq } from '@onmax/unimiq'
import { createRpcNimiqDriver } from '@onmax/unimiq/drivers'

export const nimiq = createNimiq({
  driver: createRpcNimiqDriver({
    networkId: 24,
    rpc: {
      url: process.env.NIMIQ_RPC_URL!,
    },
  }),
})

Use /mock or /drivers in tests and server code. Use /vue, /vite, and /nuxt only in matching framework runtimes.

@onmax/unerc20

Portable ERC-20 helpers for EIP-1193 providers.

Install @onmax/unerc20

Exports include readErc20Balance, readErc20Decimals, readErc20Symbol, transferErc20, formatTokenAmountAtomic, parseTokenAmountToAtomic, and ERC20_ABI.

ExportUse for
readErc20Balanceeth_call against balanceOf(address)
readErc20Decimalseth_call against decimals() unless token metadata provides decimals
readErc20Symboleth_call against symbol() unless token metadata provides symbol
transferErc20eth_sendTransaction with encoded transfer(address,uint256) calldata
parseTokenAmountToAtomicUser input to atomic bigint; returns null for invalid precision
formatTokenAmountAtomicAtomic bigint or string to decimal display
ERC20_ABIviem-compatible ABI for custom decoders or simulators
app/send-usdt.ts
import { parseTokenAmountToAtomic, transferErc20 } from '@onmax/unerc20'

const amount = parseTokenAmountToAtomic('10.50', 6)
if (amount === null)
  throw new Error('Invalid amount')

const hash = await transferErc20(window.ethereum, {
  token: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F',
  from: '0x1234567890abcdef1234567890abcdef12345678',
  to: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
  amount,
})

console.log(hash)

@onmax/better-auth-ledger

Better Auth plugin for app-local virtual balance ledgers.

Install from PKG.new:

SubpathUse for
@onmax/better-auth-ledgerServer plugin, service helpers, types
@onmax/better-auth-ledger/clientClient plugin and read helpers
server/auth.ts
import { ledger } from '@onmax/better-auth-ledger'

ledger({
  assets: ['coin', { id: 'gem', maxAmount: 100_000 }],
  createAccountOnSignUp: true,
})

Use mutation endpoints only when enableMutations and authorizeMutation are configured. Prefer service helpers for trusted server-side mutations.

@onmax/better-auth-nimiq-pay-e2e

Vitest-first E2E utilities for Nimiq Pay Better Auth integrations.

Install @onmax/better-auth-nimiq-pay-e2e

SubpathUse for
@onmax/better-auth-nimiq-pay-e2eScenarios, local fetchers, profiles
@onmax/better-auth-nimiq-pay-e2e/providersStub and bridge providers
@onmax/better-auth-nimiq-pay-e2e/vitestVitest E2E config
test/auth.e2e.test.ts
import { expect, test } from 'vitest'
import { runSignInScenario } from '@onmax/better-auth-nimiq-pay-e2e'

test('signs in with a local Nimiq provider', async () => {
  const result = await runSignInScenario()

  expect(result.ok).toBe(true)
})

Use local mode for CI stability. Use bridge mode only when the environment can publish the injected provider.

Full export index

Use the public API export index when you need to verify a named import or subpath.

Open public API exports.
Copyright © 2026