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

@mcp3/sui-wallets

v1.0.8

Published

Wallet management tools for Sui Network in MCP3

Readme

Sui Wallets (Model Context Protocol)

A TypeScript implementation for managing multiple Sui wallets within the Model Context Protocol.

Features

  • Manage multiple wallet addresses via CLI parameters
  • Assign friendly names to wallets for easier identification
  • Search for wallets by partial name or address match
  • Get wallets using partial matching when exact match not found
  • Load private keys or mnemonics from environment variables or config files
  • Wallet tools for checking balances and signing transactions
  • Resource representation of wallets for easy access
  • TypeScript support
  • Command-line interface

Prerequisites

  • Node.js (v16 or higher)
  • pnpm (v7 or higher)

Installation

  1. Clone the repository:
git clone <repository-url>
cd mcp3
  1. Install dependencies:
pnpm install
  1. Build the package:
pnpm --filter @mcp3/sui-wallets build

Usage

As a library

import { WalletManager } from '@mcp3/sui-wallets';

// Initialize the wallet manager
const walletManager = new WalletManager({
  nodeUrl: 'https://fullnode.mainnet.sui.io:443'
});

// Generate a new wallet
const { walletInfo, mnemonic } = walletManager.generateWallet('Generated Wallet');
console.log(`Generated wallet with address ${walletInfo.address} and mnemonic: ${mnemonic}`);

// Add wallets with optional names
walletManager.addWallet('0x123...', 'Main Wallet', { mnemonic: 'your-mnemonic-phrase' });
walletManager.addWallet('0xabc...', 'Secondary Wallet', { mnemonic: 'your-mnemonic-phrase' });

// Export a wallet's mnemonic
const exportedMnemonic = walletManager.exportMnemonic('Main Wallet');
console.log(`Exported mnemonic: ${exportedMnemonic}`);

// Get wallet by exact match
let wallet = walletManager.getWallet('Main Wallet');

// Get wallet with partial matching
wallet = walletManager.getWallet('Ma', { allowPartialMatch: true, caseSensitive: false });

// Get wallet balance (can use address or name)
const balance = await walletManager.getBalance('Main Wallet');
console.log(balance);

// Search for wallets by partial name or address
const searchResults = walletManager.searchWallets('Main', {
  matchName: true,
  matchAddress: true,
  caseSensitive: false,
  limit: 5
});
console.log(searchResults);

// Sign a transaction (can use address or name)
const signedTx = await walletManager.signTransaction('Main Wallet', txBytes);

As a CLI tool

# Get help
sui-wallets --help

# List all configured wallets
sui-wallets list

# Generate a new wallet with a random keypair and mnemonic
sui-wallets-generate --name "My New Wallet"

# Add a new wallet with a name
sui-wallets-add --address 0x123... --name "Main Wallet" --mnemonic "your mnemonic phrase"

# Export a wallet's mnemonic
sui-wallets-export-mnemonic --identifier "My New Wallet"

# Export a wallet's private key
sui-wallets-export-private-key --identifier "My New Wallet"

# Get balance for a specific wallet (can use address or name)
sui-wallets balance --address "Main Wallet"

# Get a specific wallet with partial matching
sui-wallets-get --identifier "Ma" --allowPartialMatch true

# Search for wallets by partial name or address
sui-wallets-search --query "Main" --matchName true --matchAddress true

# Get balance for all wallets
sui-wallets balance --all

Configuration

By default, wallet configuration is stored in $HOME/.sui-wallet/config.json. You can configure wallets using:

  1. Environment variables:

    • SUI_WALLET_ADDRESSES: Comma-separated list of wallet addresses
    • SUI_WALLET_NAMES: Comma-separated list of wallet names (in same order as addresses)
    • SUI_DEFAULT_WALLET: Default wallet (can be address or name)
    • SUI_PRIVATE_KEYS: Comma-separated list of private keys (in same order as addresses)
    • SUI_MNEMONICS: Comma-separated list of mnemonics (in same order as addresses)
  2. Config file:

    • Create a JSON file with wallet configurations
    • Set the path using SUI_WALLET_CONFIG_PATH environment variable

Example config file:

{
  "wallets": [
    {
      "address": "0x123...",
      "name": "Main Wallet",
      "privateKey": "your-private-key"
    },
    {
      "address": "0xabc...",
      "name": "Secondary Wallet",
      "mnemonic": "your-mnemonic-phrase"
    }
  ],
  "defaultWallet": "Main Wallet"
}

License

MIT