Guides
NEXUS
Guides

JS-Wagmi

ONEpocket Wagmi SDK

wagmi v2/v3 compatible ONEpocket (formerly CROSSx) connector package for seamless integration with the wagmi ecosystem.

What you can do

  • Connect ONEpocket embedded wallet via standard wagmi connector
  • Use all wagmi hooks (useAccount, useBalance, useSendTransaction, etc.)
  • Integrate with viem for low-level EVM interactions
  • Combine with other wagmi connectors (MetaMask, WalletConnect, etc.)

Quick start path

  1. Getting Started
    Install packages and configure wagmi with the ONEpocket connector.
  2. Authentication
    Connect / disconnect wallet using wagmi hooks.
  3. Wallet
    Send transactions and sign messages with wagmi hooks.
  4. EIP-1193 Provider
    Understand how wagmi wraps the ONEpocket provider.
  5. API Reference
    Check connector options and exported types.

Minimum integration example

import { createConfig, http } from 'wagmi'
import { crossxConnector } from '@nexus-cross/crossx-sdk-wagmi'

export const config = createConfig({
  connectors: [crossxConnector({ projectId: 'YOUR_PROJECT_ID' })],
  chains: [oneMainnet],
  transports: { [oneMainnet.id]: http() },
})

Notes

  • Current package version: @nexus-cross/crossx-sdk-wagmi 2.4.0.
  • Requires wagmi >=2.0.0 and viem >=2.0.0 as peer dependencies. Both wagmi v2 and v3 are supported.
  • The ONEpocket connector handles OAuth sign-in and wallet creation internally when connect() is called (via signInWithCreate()).
  • All signing/sending operations display a user confirmation modal.