Closed vipertechofficial closed 3 years ago
Does the API works from localhost?
const chain = new Blockchain(NODE_IP, NETWORK_BYTE)
Here, testnet node IP http://test.v.systems:9922
is not working for now. I suggest using http://marble.vos.systems:9924
I hope my advice can help you.
Currently, we are moving nodes. marble.vos.systems
could be shutdown recently. Please use the following nodes instead
http://vaivora.vos.systems:9924
http://gabija.vos.systems:9924
http://test-node.v.systems:9924
You can create chain class like this:
const vsys = require("@virtualeconomy/js-v-sdk");
const constants = vsys.constants;
const node_address = "http://vaivora.vos.systems:9924"; // change to your node address
const network_byte = constants.TESTNET_BYTE;
var chain = new vsys.Blockchain(node_address, network_byte);
chain.getBalanceDetail('AUAX5tBz94KmpRdZuaX3FGXBMCQUxgb1hj5').then(response => {
console.log(response);
}, respError =>{
console.log(respError);
});
Ok thanks both @SheldonYS @Haynar216 , I used
const node_address = "http://test.v.systems:9922";
I'll close it later, I am currently developing something, I'll check it out in a few hours.
EDIT: It works, thanks. I'll list node addresses in my application.
How can I use the API trough callbacks ?
In the image I wanted to perform a test to show account balance on login in the console, but it don't work.
Here I got a promise.
Here I got nothing.
COULD SOMEONE EXPLAIN ME HOW TO be able to work with the API just like pouchDB ? https://pouchdb.com/api.html
The following code shows nothing in the console.