Connecting to testnet on nem-python

I’m trying to run an app on nem blockchain and I’m using nem-python. does anybody know how to connect to testnet instead of mainnet in this library? https://github.com/namuyan/nem-python

It’s my guess but did you tried set mainnet to false? :slight_smile:

from nem_python.nem_connect import NemConnect
nem = NemConnect(main_net=False)
nem.start()

that works :slight_smile: but I have another question. how can I create a new sk and pk pair using this library?

I did not used this libary but when I’m looking at it I don’t see such function.

1 Like

does the timestamp provided by this link http://hugealice.nem.ninja:7890/time-sync/network-time can be used for both testnet and mainnet?

hugealice.nem.ninja is mainnet node. You need to use testnet node if you want fetch testnet time.

List of mainnet nodes: https://explorer.nemtool.com/#/nodelist
List of testnet nodes: https://testnet-explorer.nemtool.com/#/nodelist

but I could send a tx to testnet network with the timestamp read from http://hugealice.nem.ninja:7890/time-sync/network-time and my tx got confirmed!!

Times are near and that could happen. Anyway you should use testnet one :slight_smile:

1 Like