JS-Core
CROSSx JavaScript SDK — Core
Native TypeScript SDK for OAuth authentication, embedded wallet, and EVM RPC access.
What you can do
- Authenticate users with OAuth (popup / redirect flow)
- Restore/refresh session state (
initialize,ensureLoggedIn) - Get wallet addresses and create wallet
- Sign message / typed data / transaction via confirmation modal
- Send transaction and wait for receipt
- Use RPC helpers (
walletRpc,getBalance,getNonce) - Obtain EIP-1193 provider for ethers.js / viem / wagmi integration
Quick start path
- Getting Started Install SDK, initialize, and sign in.
- Authentication Implement session lifecycle and auth state management.
- Wallet Integrate sign/send, balance query, and receipt polling.
- EIP-1193 Provider Use with ethers.js, viem, web3.js, and contract interaction.
- API Reference Check full signatures and object details.
Minimum integration example
import { createCROSSxSDK } from '@nexus-cross/crossx-sdk-core'
const sdk = createCROSSxSDK({
projectId: 'YOUR_PROJECT_ID',
theme: 'light',
})
await sdk.initialize()Notes
- Chain routing is explicit for wallet/RPC flows (
chainIdrequired in CAIP-2 format, e.g.eip155:612044). walletRpcis for read-only calls (e.g.eth_call), not transaction sign/send.- All signing/sending operations display a user confirmation modal.
- SDK supports event-driven state management via
on('authChanged', ...)/on('addressChanged', ...).
Updated 15 days ago