How to connect to bitshares private testnet using bitsharesjs apis

Started by yfan, July 24, 2019, 03:15:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yfan

Thank you so much, it is very nice of you.
That is exactly what I did.

But I ran into different errors when using my testnet... where and do I need to specify my network name?
the example script won't recognize my network name, thus the response will return an error
 
TypeError: Cannot read property 'network' of undefined

It's been a nightmare for someone like me doesn't have the background in javascript to do the integration test...

pc

Edit the config file of your testnet node and enable the "rpc-endpoint" option, then restart the node.

You can then connect using the address "ws://<your-endpoint-ip:port>" instead of "wss://node.testnet.bitshares.eu".

Other changes may be necessary if your core token name is different etc. . I'm not very familiar with the JS lib.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 [url="http://bitcoin.quisquis.de"]http://bitcoin.quisquis.de[/url]

yfan

Hi everyone,

I am new in bitshares and the first thing I do is try the private testnet myself.
It works out ok and I now want to use javascript to write code to play with my local private testnet, would it be possible?

I noticed the tutorial and examples from bitsharesjs GitHub repository but the apis.instance("wss://node.testnet.bitshares.eu", true) which indicates that the api will connect to the public testnet..

Am I taking this the wrong way?

Thank you guys!