Git Product home page Git Product logo

bscscan-ts's Introduction

Hi there, I'm Jean-Philippe Monette πŸ‘‹πŸ»

Work and Travel

Whether through my experience as a Senior Software Engineer delivering projects in Europe, North America and the Middle East, across various industries - that's how I was able to perfect my abilities to solve real world challenges using technologies.

  • 🌏. From MontrΓ©al, QC, πŸ“ based in London, UK
  • πŸ‘¨πŸ»β€πŸ’» Interested all things TypeScript, React Native, Salesforce and more
  • πŸ’Ό. Currently working @ Komodo Health, reducing the burden of disease πŸ’‰

bscscan-ts's People

Contributors

dependabot[bot] avatar jpmonette avatar minhhien177 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bscscan-ts's Issues

ReferenceError: Headers is not defined

I got this when run accounts module and get txList:

xxxxx\binance-caller\node_modules\@jpmonette\bscscan\lib\client.js:71
        var headers = new Headers();
                      ^

ReferenceError: Headers is not defined
    at BscScan.newRequest (xxxxx\binance-caller\node_modules\@jpmonette\bscscan\lib\client.js:71:23)
    at BscScan.<anonymous> (xxxxx\binance-caller\node_modules\@jpmonette\bscscan\lib\client.js:82:41)
    at step (xxxxx\binance-caller\node_modules\@jpmonette\bscscan\lib\client.js:33:23)
    at Object.next (xxxxx\binance-caller\node_modules\@jpmonette\bscscan\lib\client.js:14:53)
    at xxxxx\binance-caller\node_modules\@jpmonette\bscscan\lib\client.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (xxxxx\binance-caller\node_modules\@jpmonette\bscscan\lib\client.js:4:12)
    at BscScan.query (xxxxx\binance-caller\node_modules\@jpmonette\bscscan\lib\client.js:80:16)
    at Accounts.<anonymous> (xxxxx\binance-caller\node_modules\@jpmonette\bscscan\lib\modules\accounts.js:111:40)
    at step (xxxxx\binance-caller\node_modules\@jpmonette\bscscan\lib\modules\accounts.js:33:23)

Process finished with exit code 1

ReferenceError: Headers is not defined

This error happens everytime I try to request client.accounts.getBalance({ address: 'my-address'}). The error is the same for other requests.

My code is pretty straight forward :

const { BscScan } = require('@jpmonette/bscscan')
const client = new BscScan({ apikey: process.env.BSC_API_KEY })
module.exports = async req => {
	try {
		let request = await client.accounts.getBalance({ address: req.query.address })
		return request.result
	} catch (error) {
		throw error
	}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.