Giter Club home page Giter Club logo

connex.driver-nodejs's People

Contributors

libotony avatar qianbin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

connex.driver-nodejs's Issues

connex driver Instance Issue

sample code:
var Framework = require('@vechain/connex-framework')
var Driver, SimpleNet, SimpleWallet, options = require('@vechain/connex.driver-nodejs')
const wallet = new SimpleWallet()
wallet.import('.........') // here imported my testnet account private key
const driver = await Driver.connect(new SimpleNet('http://localhost:8669/'), wallet)
const connex = new Framework(driver)
// here get connex object ready to use
console.log(connex);
driver.txParams.expiration = 18
driver.txParams.gasPriceCoef = 128
driver.onTxCommit = txObj => {
//
}

Followed steps
I install all the modules.
I set the my testnet account private key.
I also tested in Vechain testnet also "https://sync-testnet.vechain.org".

Issue faced in above source code:
const wallet = new SimpleWallet()
^
TypeError: SimpleWallet is not a constructor

Kindly let me know, if I was missed anything, or any other procedure to follow.If anyone know,kindly help me

Socket & Http timeouts

Hi! I'm using @vechain/connex.driver-nodejs": "^1.1.1" & @vechain/connex-framework": "^1.1.2" to connect to mainnet node.
Sometimes struggle with innumerous timeout errors. Examples:
headTracker(http): Error: timeout of 15000ms exceeded
headTracker(http): Error: socket hang up
headTracker(ws): Error: ws read timeout
All of the points to @vechain/connex.driver-nodejs/dist/simple-net.js or @vechain/connex.driver-nodejs/dist/simple-websocket-reader.js
The most strange thing that all of them occur already after successful request execution.

Here's the code of creating Connex instance for requests:

const net = new SimpleNet(netAddr);
const driver = await Driver.connect(net);
const client = new Framework(driver).thor;

What can cause the reason of timeout?

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.