chaingate
v0.7.1
Published
A complete TypeScript library for connecting to and making transactions on different blockchains
Maintainers
Readme
🔗 ChainGate

Installation
npm i chaingateGet your API key now for free at https://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.
