Socket
Book a DemoInstallSign in
Socket

@codegame.dev/wallet-cli

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codegame.dev/wallet-cli

A CLI tool for managing wallets across multiple blockchains, supporting operations like wallet creation, balance checking, transfers, and fee estimation.

1.1.13
latest
Source
npmnpm
Version published
Weekly downloads
4
-73.33%
Maintainers
0
Weekly downloads
 
Created
Source

Wallet CLI - Multi-Blockchain Wallet Management Tool

Wallet CLI is a powerful command-line tool for managing multi-blockchain wallets. It allows you to generate public keys, manage balances, transfer funds, and estimate transaction fees with ease. The tool supports a wide range of blockchains and tokens, making it an essential utility for developers and blockchain enthusiasts.

Installation

Install the @codegame.dev/wallet-cli globally using npm:

npm install -g @codegame.dev/wallet-cli

This makes the wallet-cli command accessible from anywhere on your system.

Features

  • Generate public keys for multiple blockchains from an existing or new mnemonic.
  • View wallet balances in real-time.
  • Perform secure and efficient transfers.
  • Estimate transaction fees for supported networks.
  • Wallet creation is supported for most major blockchains, but other features are currently supported for these blockchains: Ethereum, Binance Smart Chain, Polygon, Tron, Ton. In the future, other chains will be added.

Commands Overview

General Options

  • -V, --version: Display the version number.
  • -h, --help: Show help for any command.

Commands

coin-list

Display a list of all supported coins.

Options:

  • -s <text>: Search for a specific coin.
  • --json: Output results in JSON format.

Example:

wallet-cli coin-list -s bitcoin

get-address

Retrieve the public address for a specific coin.

Options:

  • --mnemonic <mnemonic>: Specify an existing mnemonic.
  • --coin <coin>: Name of the coin (based on Trust Wallet Core).
  • --coingecko-platform <platform>: Platform name (based on CoinGecko API).
  • --json: Output results in JSON format.

Example:

wallet-cli get-address --mnemonic "your mnemonic" --coin ethereum

create-wallet

Generate a new mnemonic and wallet.

Options:

  • --coin <coin>: Name of the coin (based on Trust Wallet Core).
  • --coingecko-platform <platform>: Platform name (based on CoinGecko API).
  • --json: Output results in JSON format.

Example:

wallet-cli create-wallet --coin bitcoin

get-balance

Check the balance of a wallet for a coin or token.

Options:

  • --coin <coin>: Name of the coin (based on Trust Wallet Core).
  • --coingecko-platform <platform>: Platform name (based on CoinGecko API).
  • --address <address>: Wallet address.
  • --token-address <token-address>: Contract address of the token.
  • --json-rpc-provider <url>: URL of the JSON-RPC provider.
  • --http-provider <url>: URL of the HTTP provider.
  • --json: Output results in JSON format.
  • --testnet: Use the testnet provider.

Example:

wallet-cli get-balance --coin ethereum --address 0xYourAddress

transfer

Send coins or tokens to another wallet.

Options:

  • --mnemonic <mnemonic>: Specify an existing mnemonic.
  • --coin <coin>: Name of the coin (based on Trust Wallet Core).
  • --coingecko-platform <platform>: Platform name (based on CoinGecko API).
  • --address <address>: Recipient wallet address.
  • --amount <amount>: Amount to transfer.
  • --token-address <token-address>: Contract address of the token.
  • --json-rpc-provider <url>: URL of the JSON-RPC provider.
  • --json: Output results in JSON format.
  • --testnet: Use the testnet provider.

Example:

wallet-cli transfer --mnemonic "your mnemonic" --coin ethereum --address 0xReceiverAddress --amount 0.1

estimate-fee

Estimate the fees for a coin or token transfer.

Options:

  • --mnemonic <mnemonic>: Specify an existing mnemonic.
  • --coin <coin>: Name of the coin (based on Trust Wallet Core).
  • --coingecko-platform <platform>: Platform name (based on CoinGecko API).
  • --address <address>: Recipient wallet address.
  • --amount <amount>: Amount to transfer.
  • --token-address <token-address>: Contract address of the token.
  • --json-rpc-provider <url>: URL of the JSON-RPC provider.
  • --json: Output results in JSON format.
  • --testnet: Use the testnet provider.

Example:

wallet-cli estimate-fee --mnemonic "your mnemonic" --coin ethereum --address 0xReceiverAddress --amount 0.1

Supported Networks

The following networks are supported for get-balance, transfer, and estimate-fee commands:

  • Ethereum (ETH)
  • Binance Smart Chain (BSC)
  • Polygon POS (POL)
  • Tron (TRX)
  • Ton (TON) - static estimate-fee

Acknowledgements

Wallet CLI leverages the following libraries:

  • @trustwallet/wallet-core for blockchain wallet operations.
  • ethers.js for Ethereum-related operations.
  • tronweb for interacting with the Tron network.

Special thanks to these projects for their contributions to the blockchain ecosystem.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Keywords

blockchain

FAQs

Package last updated on 30 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.