SkillAgentSearch skills...

Multichain Crypto Wallet

A Multichain crypto wallet library that supports Ethereum, Bitcoin, Solana, Tron, Waves and other EVM compatible blockchains E.g. Binance Smart Chain, Polygon, Avalanche etc.

Install / Use

npx skills add iamnotstatic/multichain-crypto-wallet

Installs into whichever agent you are using.

README

Multichain Crypto Wallet

A Multichain crypto wallet library that supports Ethereum, Bitcoin, Solana, Waves and other EVM compatible blockchains E.g. Binance Smart Chain, Polygon, Avalanche etc.

Build Version GitHub issues GitHub stars GitHub license Total Downloads

Installation

npm install multichain-crypto-wallet

Using yarn,

yarn add multichain-crypto-wallet

Usage

Javascript

const multichainWallet = require('multichain-crypto-wallet');

TypeScript

import * as multichainWallet from 'multichain-crypto-wallet';

Methods

The following methods are available with this SDK:

Generate mnemonic

This method is used to generate mnemonic. Default number of words is 12 but you can pass a number param if you want to generate more or less.

const mnemonic = multichainWallet.generateMnemonic();

// Note: Mnemonics with less than 12 words have low entropy and may be guessed by an attacker.

Response

net idle lava mango another capable inhale portion blossom fluid discover cruise

Create Wallet

This method creates a new wallet. The method accepts a payload object as the parameter. The parameter of this payload is:

// Creating an Ethereum wallet.
const wallet = multichainWallet.createWallet({
  derivationPath: "m/44'/60'/0'/0/0", // Leave empty to use default derivation path
  network: 'ethereum',
}); // NOTE - Address generated will work for EVM compatible blockchains E.g. Binance smart chain, Polygon etc


// Creating a Bitcoin wallet.
const wallet = multichainWallet.createWallet({
  derivationPath: "m/44'/0'/0'/0/0", // Leave empty to use default derivation path
  network: 'bitcoin', // 'bitcoin' or 'bitcoin-testnet'
});

// Creating a Solana wallet.
const wallet = multichainWallet.createWallet({
  derivationPath: "m/44'/501'/0'/0'", // Leave empty to use default derivation path
  network: 'solana',
});

// Creating a Waves wallet.
const wallet = await multichainWallet.createWallet({
  cluster: 'testnet' // Can also be mainnet,
  network: 'waves',
});

// Creating a Tron wallet
const wallet = await multichainWallet.createWallet({
  network: 'tron',
});

Response

{
  address: '0xfBE11AC0258cc8288cA24E818691Eb062f7042E9',
  privateKey: '0xfdf745f45d1942feea79b4c0a3fc1ca67da366899f7e6cebaa06496806ca8127',
  mnemonic: 'net idle lava mango another capable inhale portion blossom fluid discover cruise'
}

Get Balance

This gets the balance of the address passed in. The method accepts an object as the parameter. The parameters for this object depending on the kind of balance to be gotten is in the form:

Native coins

// Get the ETH balance of an address.
const data = await multichainWallet.getBalance({
  address: '0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22',
  network: 'ethereum',
  rpcUrl: 'https://ethereum-sepolia-rpc.publicnode.com',
}); // NOTE - For otherEVM compatible blockchains all you have to do is change the rpcUrl.

// Binance Smart chain
const data = await multichainWallet.getBalance({
  address: '0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22',
  network: 'ethereum',
  rpcUrl: 'https://ethereum-sepolia-rpc.publicnode.com',
});

// Get the BTC balance of an address.
const data = await multichainWallet.getBalance({
  address: '2NAhbS79dEUeqcnbC27UppwnjoVSwET5bat',
  network: 'bitcoin-testnet', // 'bitcoin' or 'bitcoin-testnet'
});

// Get the SOL balance of an address.
const data = await multichainWallet.getBalance({
  address: 'DYgLjazTY6kMqagbDMsNttRHKQj9o6pNS8D6jMjWbmP7',
  network: 'solana',
  rpcUrl: 'https://api.devnet.solana.com',
});

// Get the WAVES balance of an address.
const data = await multichainWallet.getBalance({
  network: 'waves',
  address: '3NBE5tjbQn9BHczjD6NSSuFDKVHKsBRzTv9',
  rpcUrl: 'https://nodes-testnet.wavesnodes.com',
});

// Get the Tron balance of an address.
const data = await multichainWallet.getBalance({
  network: 'tron',
  address: 'TDdHvW9nU1JaX1P7roYtDvjErTTR17GPJJ',
  rpcUrl: 'https://nile.trongrid.io',
});

Tokens

// Get the balance of an ERC20 token.
const data = await multichainWallet.getBalance({
  address: '0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22',
  network: 'ethereum',
  rpcUrl: 'https://ethereum-sepolia-rpc.publicnode.com',
  tokenAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7',
}); // NOTE - For other EVM compatible blockchains all you have to do is change the rpcUrl.

// Get the balance of a token on Solana.
const data = await multichainWallet.getBalance({
  address: '5PwN5k7hin2XxUUaXveur7jSe5qt2mkWinp1JEiv8xYu',
  tokenAddress: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
  network: 'solana',
  rpcUrl: 'https://rpc.ankr.com/solana',
});

// Get the balance of a token on Waves.
const data = await multichainWallet.getBalance({
  network: 'waves',
  address: '3NBE5tjbQn9BHczjD6NSSuFDKVHKsBRzTv9',
  rpcUrl: 'https://nodes-testnet.wavesnodes.com',
  tokenAddress: '39pnv8FVf3BX3xwtC6uhFxffy2sE3seXCPsf25eNn6qG',
});

// Get the balance of a token on tron.
const data = await multichainWallet.getBalance({
  network: 'tron',
  address: 'TDdHvW9nU1JaX1P7roYtDvjErTTR17GPJJ',
  rpcUrl: 'https://nile.trongrid.io',
  tokenAddress: 'TXLAQ63Xg1NAzckPwKHvzw7CSEmLMEqcdj',
});

Response

{
  balance: '2';
}

Generate Wallet from Mnemonic

This generates a wallet from Mnemonic phrase. The method accepts an object as the parameter. The parameters that this object takes are:

// Generate an Ethereum wallet from mnemonic.
const wallet = multichainWallet.generateWalletFromMnemonic({
  mnemonic:
    'candy maple cake sugar pudding cream honey rich smooth crumble sweet treat',
  derivationPath: "m/44'/60'/0'/0/0", // Leave empty to use default derivation path
  network: 'ethereum',
}); // NOTE - Address generated will work for EVM compatible blockchains E.g. Binance smart chain, Polygon etc

// Generate a Bitcoin wallet from mnemonic.
const wallet = multichainWallet.generateWalletFromMnemonic({
  mnemonic:
    'excess quit spot inspire stereo scrap cave wife narrow era pizza typical',
  derivationPath: "m/44'/0'/0'/0/0", // Leave empty to use default derivation path
  network: 'bitcoin', // 'bitcoin' or 'bitcoin-testnet'
});

// Generate a Solana wallet from mnemonic.
const wallet = multichainWallet.generateWalletFromMnemonic({
  mnemonic:
    'base dry mango subject neither labor portion weekend range couple right document',
  derivationPath: "m/44'/501'/0'/0'", // Leave empty to use default derivation path
  network: 'solana',
});

// Generate a Waves wallet from mnemonic.
const wallet = multichainWallet.generateWalletFromMnemonic({
  mnemonic:
    'mushroom deliver work spray hire nuclear wrong deputy march six midnight outside motor differ adult',
  cluster: 'testnet',
  network: 'waves',
});

// Generate a Waves wallet from mnemonic.
const wallet = multichainWallet.generateWalletFromMnemonic({
  mnemonic:
    'mushroom deliver work spray hire nuclear wrong deputy march six midnight outside motor differ adult',
  cluster: 'testnet',

Related Skills

View on GitHub
GitHub Stars320
CategoryCustomer
Updated6d ago
Forks122

Languages

TypeScript

Security Score

100/100

Audited on Aug 2, 2026

No findings