How to Use
Installation
yarn add @xchainjs/xchain-binancePeer Dependencies
Testing
yarn install
yarn testExample
Connect Wallet to New Binance Chain Client
//Imports
import { Client } from '@xchainjs/xchain-binance'
import { FeeOption } from "@xchainjs/xchain-client"
// Connect wallet to new btc client
const connectWallet = async () => {
let phrase = "phrase"
const bncClient = new Client({phrase })
let address = bncClient.getAddress()
console.log(`Asset Address is: ${address}`)
let balances = await bncClient.getBalance(address)
try {
let assetAmount = (baseToAsset(balances[0].amount)).amount()
console.log(`with balance: ${assetAmount}`)
} catch (error) {
console.log('no balance')
}
}Transfer BNB Using BncClient
Get Transaction Data & Transaction History
Get Current Fees
Multisend Transaction
Last updated