npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sodax/wallet-sdk

v0.0.1-rc.18

Published

Wallet SDK of Sodax

Readme

@sodax/wallet-sdk

A comprehensive wallet SDK for the Sodax ecosystem that provides unified wallet connectivity across multiple blockchain networks.

Features

  • Seamless wallet connectivity for all supported wallets in the Sodax network

    • EVM Wallets: All browser extensions that support EIP-6963 (Hana Wallet, MetaMask, Phantom, etc.) ✅
    • Sui Wallets: All browser extension that @mysten/dapp-kit supports (Hana, Sui Wallet, Suiet, etc.) ✅
    • Solana Wallets: ✅
    • Stellar Wallets: ✅
    • Injective Wallets: ✅
    • ICON Wallets: ✅ (Hana Wallet and other ICON-compatible extensions)
  • Address and connection state management

    • EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon) ✅
    • Sui ✅
    • Solana ✅
    • Stellar ✅
    • Injective ✅
    • ICON ✅

Installation

# Using npm
npm install @sodax/wallet-sdk

# Using yarn
yarn add @sodax/wallet-sdk

# Using pnpm
pnpm add @sodax/wallet-sdk

Peer Dependencies

This package requires the following peer dependencies:

{
  "react": ">=19",
  "@tanstack/react-query": "latest"
}

Quick Start

import { XWagmiProviders, useXConnectors, useXConnect, useXAccount } from '@sodax/wallet-sdk';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import {
  ARBITRUM_MAINNET_CHAIN_ID,
  AVALANCHE_MAINNET_CHAIN_ID,
  BASE_MAINNET_CHAIN_ID,
  BSC_MAINNET_CHAIN_ID,
  OPTIMISM_MAINNET_CHAIN_ID,
  POLYGON_MAINNET_CHAIN_ID,
  SONIC_MAINNET_CHAIN_ID,
} from '@sodax/types';

// Create a QueryClient instance
const queryClient = new QueryClient();

function App() {
  return (
    <QueryClientProvider client={queryClient}>
      <XWagmiProviders
        config={{
          EVM: {
            chains: [
              ARBITRUM_MAINNET_CHAIN_ID,
              AVALANCHE_MAINNET_CHAIN_ID,
              BASE_MAINNET_CHAIN_ID,
              BSC_MAINNET_CHAIN_ID,
              OPTIMISM_MAINNET_CHAIN_ID,
              POLYGON_MAINNET_CHAIN_ID,
              SONIC_MAINNET_CHAIN_ID,
            ],
          },
          SUI: {
            isMainnet: true,
          },
          SOLANA: {
            endpoint: 'https://your-rpc-endpoint',
          },
          ICON: {},
          INJECTIVE: {},
          STELLAR: {},
        }}
      >
        <WalletConnect />
      </XWagmiProviders>
    </QueryClientProvider>
  );
}

function WalletConnect() {
  // Get available connectors for EVM chain
  const connectors = useXConnectors('EVM');
  
  // Get connect mutation
  const { mutateAsync: connect } = useXConnect();

  // Get connected account info
  const account = useXAccount('EVM');

  return (
    <div className="space-y-4">
      {/* Display connected wallet address if connected */}
      {account?.address && (
        <div className="p-4 bg-gray-100 rounded-lg">
          <p className="text-sm text-gray-600">Connected Wallet:</p>
          <p className="font-mono">{account.address}</p>
        </div>
      )}

      {/* Display available connectors */}
      <div className="space-y-2">
        {connectors.map((connector) => (
          <button
            key={connector.id}
            onClick={() => connect(connector)}
            className="flex items-center gap-2 p-2 border rounded-lg hover:bg-gray-50"
          >
            <img 
              src={connector.icon} 
              alt={connector.name} 
              width={24} 
              height={24} 
              className="rounded-md" 
            />
            <span>Connect {connector.name}</span>
          </button>
        ))}
      </div>
    </div>
  );
}

This example demonstrates:

  1. Setting up the required providers (QueryClientProvider and XWagmiProviders)
  2. Using useXConnectors to get available wallet connectors
  3. Using useXConnect to handle wallet connections
  4. Using useXAccount to display the connected wallet address
  5. A basic UI to display and connect to available wallets

Requirements

  • Node.js >= 18.0.0
  • React >= 19
  • TypeScript

API Reference

Components

Hooks

Core Wallet Hooks

Chain-Specific Hooks

Balance Hooks

Service Hooks

Types

Core Types

Classes

XConnector

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development

# Install dependencies
pnpm install

# Build the package
pnpm build      

# Run in development mode
pnpm dev

# Run type checking
pnpm checkTs

# Format code
pnpm pretty

# Lint code
pnpm lint

License

MIT

Support