Skip to content

Node.js package to interact with official BscScan API

License

Notifications You must be signed in to change notification settings

jpgarcia/bsc-scan

Repository files navigation

Node.js BscScan API

version minzipped size downloads Tweet

Node.js package to interact with official BscScan API powered by TypeScript.

Documentation

API reference

Installation

$ yarn add bsc-scan

Usage

import bscscan, { account } from 'bsc-scan'

bscscan.setUrl('https://testnet.bscscan.com')
bscscan.setApiKey('YourApiKeyToken')

const start = async () => {
  try {
    const balance = await account.getBnbBalance('0x765090aB712984081aeE059eA7025C48a4198183')

    console.log(`Your balance is: ${balance}`)
  } catch (err) {
    console.log(err)
  }
}

start()

About

Node.js package to interact with official BscScan API

Resources

License

Stars

Watchers

Forks

Packages

No packages published