NERO
Getting Started

Installation

Install the NERO MPC SDK, peer dependencies, and choose the right package modules for your use case

Installation

Install the SDK

npm install @nerochain/mpc-sdk

Required Peer Dependencies

The SDK depends on @noble/curves and @noble/hashes for all MPC and cryptographic operations:

npm install @noble/curves @noble/hashes
PackageVersionPurpose
@noble/curves^1.4.0All MPC and cryptographic operations
@noble/hashes^1.4.0Key derivation (HKDF) and hashing

Optional Peer Dependencies

Install these based on the features you need:

PackageVersionWhen to install
react^18.0.0React hooks, context provider, or modal UI
ethers^6.0.0Account Abstraction (ERC-4337) or Pedersen signing
@metamask/sdk^0.20.0MetaMask wallet adapter
@walletconnect/ethereum-providerWalletConnect support
@coinbase/wallet-sdkCoinbase Wallet support

Package Modules

The SDK is distributed as a multi-entry package. Import only the modules you need to optimize your bundle size:

Import PathEntry FilePurpose
@nerochain/mpc-sdksrc/index.tsCore SDK class, MPC protocols, and shared types
@nerochain/mpc-sdk/reactsrc/react/index.tsReact Context providers and hooks for state management
@nerochain/mpc-sdk/chainssrc/chains/index.tsPre-defined chain configurations and network managers
@nerochain/mpc-sdk/modalsrc/modal/index.tsPre-built UI components for login and wallet management
@nerochain/mpc-sdk/no-modalsrc/no-modal/index.tsHeadless SDK surface for custom UI implementations
@nerochain/mpc-sdk/aasrc/aa/index.tsERC-4337 Account Abstraction utilities and clients

Primary Exports by Module

  • Main (@nerochain/mpc-sdk): NeroMpcSDK, ClientKeyManager, APIClient, NeroProvider
  • React (@nerochain/mpc-sdk/react): NeroMpcAuthProvider, useNeroConnect, useNeroWallet
  • Chains (@nerochain/mpc-sdk/chains): ChainManager, ChainConfig, NERO_TESTNET
  • Modal (@nerochain/mpc-sdk/modal): LoginButton, LoginModal, AllWalletsView
  • AA (@nerochain/mpc-sdk/aa): BundlerClient, PaymasterClient, SimpleAccount

Build Configuration

The SDK ships with these build settings:

SettingValue
TargetES2020
PlatformBrowser (Node.js crypto disabled)
FormatsDual ESM and CommonJS
TreeshakingEnabled

Requirements

  • Browser with Web Crypto API support (all modern browsers)
  • Node.js 18+ for build tooling
  • React 18+ if using the React or Modal entry points

On this page