🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

chaingate

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chaingate

A complete TypeScript library for connecting to and making transactions on different blockchains

0.4.1
latest
Source
npm
Version published
Weekly downloads
29K
15.77%
Maintainers
1
Weekly downloads
 
Created
Source

🔗 ChainGate

A comprehensive TypeScript cryptocurrency framework for connecting to and executing transactions on multiple blockchains. Your private keys remain securely on your device, and all transaction signing is handled offline to ensure the highest level of security.

Bitcoin • Ethereum • Bnb • Dogecoin • Avalanche • Litecoin • Bitcoin Cash • Polygon • Arbitrum • Fantom • Base • Bitcoin Testnet

Version Test Build Build Web

banner.png

Installation

npm i chaingate

Get your API key now for free at https://chaingate.dev

👉 Full documentation (docs.chaingate.dev) 👈

Features

  • 💻❤️🌐 NodeJS & Browser compatible
  • 🔌 Plug and Play Wallet:
    • 🆕 Create new wallet from mnemonic (BIP39 phrase)
    • 📥 Import any wallet:
      • 📜 BIP39 (mnemonic)
      • 🔑 Private keys (hex string or Uint8Array)
      • 🌱 Seeds (raw format)
      • 🔐 Ethereum-like or DEX-like keystores
    • 🗺️ HD Wallet support (BIP32 derivation paths)
  • 🔗 Multi-Chain Functionality:
    • 🔄 Access multiple blockchains with the same library
    • 💱 Retrieve balances (BTC, ETH, BNB, etc.)
    • 📡 Create and broadcast transactions
    • 📏 Get blockchain info (block height, transaction details, etc.)
  • 🔮 Fee Estimation / Gas Prediction: Accurately predict fees for transactions

Warning
Use of this blockchain library is at your own risk. There are no warranties or liabilities assumed, and data accuracy is not guaranteed.

Basic Example

import { initializeWallet } from 'chaingate'

// Create a new wallet
const { wallet, phrase } = await initializeWallet.create({
  apiKey: 'YOUR_API_KEY'
})

// Access Bitcoin functionality
const bitcoin = wallet.currency('bitcoin')
console.log('BTC Address:', await bitcoin.getAddress())

// Check balance
const balance = await bitcoin.getBalance()
console.log('Balance:', balance.confirmed.baseAmount.str)

// Example transaction (see docs for full implementation)
const recipient = 'bc1q...'
const amount = await bitcoin.amount('0.001', 'btc')
const transfer = await bitcoin.createTransfer(recipient, amount)
const fees = await transfer.getSuggestedFees()

if (fees.normal.enoughFunds) {
  const txId = await transfer.broadcast('normal')
  console.log('Transaction ID:', txId)
}

For advanced usage, multichain operations, and API reference, visit the official documentation at docs.chaingate.dev.

Keywords

blockchain

FAQs

Package last updated on 01 Apr 2025

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