Giter Site home page Giter Site logo

Connex NodeJs driver about connex HOT 18 CLOSED

vechain avatar vechain commented on June 13, 2024
Connex NodeJs driver

from connex.

Comments (18)

qianbin avatar qianbin commented on June 13, 2024

How about the object directly returned by new Framework(...)? Seems the object was JSON encoded/decoded.

from connex.

desingraja avatar desingraja commented on June 13, 2024

kindly explain it clearly, I used this Driver.

code :- // NodeJs Driver

import { Framework } from '@vechain/connex-framework'
import { Driver, SimpleNet, SimpleWallet, options } from '@vechain/connex.driver-nodejs'
const wallet = new SimpleWallet()
const driver = await Driver.connect(new SimpleNet('http://localhost:8669/'), wallet)
const connex = new Framework(driver)
// here I get the connex object.

what was the problem in these. kindly explain clearly to me.

from connex.

qianbin avatar qianbin commented on June 13, 2024

the Connex object got here should be fully functional. just try

connex.thor.block('best').then(b => console.log(b))

from connex.

desingraja avatar desingraja commented on June 13, 2024

yeah it is working, connex.thor.account and connex.thor.block which are all working fine. but I didn't get any object in the connex. which displays only the genesis and status at here.
const connex = new Framework(driver)
// here I get the connex object.

from connex.

qianbin avatar qianbin commented on June 13, 2024

What does 'displays' mean here?

from connex.

desingraja avatar desingraja commented on June 13, 2024

It returns the object { connex version, connex.thor ('genesis', 'status') }
I need 'ticker', 'account', 'block', 'transaction', 'filter', and 'explain' these things in the connex object.

from connex.

qianbin avatar qianbin commented on June 13, 2024

They're there, a you said you can access 'connex.thor.account and connex.thor.block which are all working fine'

from connex.

desingraja avatar desingraja commented on June 13, 2024

yeah the functionality is working but I didn't receive that key in connex framework object.
It displays the only two keys in the object code [ "const connex = new Framework(driver)"] // here I get the connex object.I attached the image below.

I need the rest off keys 'ticker', 'account', 'block', 'transaction', 'filter', and 'explain' in the connex object
connex obj

from connex.

qianbin avatar qianbin commented on June 13, 2024

the object must have been transformed with JSON.stringify and JSON.parse. then, functions will be all ignored.

from connex.

desingraja avatar desingraja commented on June 13, 2024

If it possible to fetch the remaining keys 'ticker', 'account', 'block', 'transaction', 'filter', and 'explain' in that connex object. Any possible ways to fetch it

from connex.

qianbin avatar qianbin commented on June 13, 2024

No. You can't remotely fetch a function.

from connex.

desingraja avatar desingraja commented on June 13, 2024

Then how I fetch it from connex Framework.Kindly help me

from connex.

qianbin avatar qianbin commented on June 13, 2024

how about placing the Framework creation code to where using it?

from connex.

desingraja avatar desingraja commented on June 13, 2024

To use in the server side object,
Framework creation code is
import { Framework } from '@vechain/connex-framework'
import { Driver, SimpleNet, SimpleWallet, options } from '@vechain/connex.driver-nodejs'
const wallet = new SimpleWallet()
const driver = await Driver.connect(new SimpleNet('http://localhost:8669/'), wallet)
const connex = new Framework(driver)
// connex --- here I get the connex object.

from connex.

qianbin avatar qianbin commented on June 13, 2024

I mean put the code at the place where using connex, e.g. client/browser side.

from connex.

desingraja avatar desingraja commented on June 13, 2024

Hi team,
Okay Now I need to access the connex package from client/browser side.Is there any possible ways to use in client side.kindly help me.

from connex.

desingraja avatar desingraja commented on June 13, 2024

I used the connex Driver package in NodeJs . so now how I used that in client/browser side. Kindly help me to integrate.

from connex.

desingraja avatar desingraja commented on June 13, 2024

I find the way to built in client side, thanks !

from connex.

Related Issues (20)

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.