Hello, I am Tosch, I am active on developing websites and applications with Nxt for some longer time now. While doing this, I have noticed that you can not connect to any sticked server to receive the data you want but you can connect from any website or device to other Nxt public nodes and start using the NXT Dataflow directly from the Blockchain. But to receive the list of nodes, you would need to be connected to the Nxt Network yourself. So I thought it might be a good idea to have a server connected to the network which displays exactly these data:
http://nxtpeers.com
Now that we have a list of the public nodes, we could choose one of those who accepts calls from the outside (GET), which are hallmarked, have cors (javascript) enabled, a special version or whatever is needed for developing something with the Blockchain Data.
But these are public nodes maintained by other Nxter, which decided to make this available for development and public access. You cannot know, if they go offline at anytime, so I am saving them into a local database and regularly check for access. The current list is displayed on the main page.
The APIhttp://nxtpeers.com/api.phpWith the API I am providing a stable tunnel to Nxt Server. These can be directly accessed, saved and tested locally etc. I am hoping this way people that do not have the possibility to host Nxt yet, can access the API via public nodes which they receive from the nxtpeers.com API. (example:
http://nxtpeers.com/api/) If everything is working, it is recommended to switch to an own server with hosted Nxt, so calls can be made localhost. The API is just recommended to display data from the Blockchain (using GET requests).
The nxtpeers platform is still under development. If this is something which is used regularly I could initiate to get stronger server etc to get it all more comprehensive and stable.
Instead of manually inserting the node anytime yourself into your API call (or update) I have included several node accessing API's:
Last checked single node, with newest NRS version, hallmarked (good ping):
http://nxtpeers.com/api/index.phpA list of 30 nodes:
http://nxtpeers.com/api/peers.phpA list of hallmarked nodes:
http://nxtpeers.com/api/hallmark.phpLast checked single node, with newest NRS version, hallmarked, cors enabled:
http://nxtpeers.com/api/cors/In this forum I am going to provide examples what you could do with this development kit. I have a vision where a tool like this can keep supporting the thought of decentralization and user empowerement. The peers are taken randomly from the list while preferring hallmarked and fast nodes from the network.
For easy and advanced usagePHPUsing
nxtpeers.com as development helping tool, I am providing some example scripts in this forum. The code will be open source. While I hope that people using and adjusting the script could share what they have done with it so the examples keep improving over time and are not dependend on just my time.
Since I am most familiar with accessing Nxt via PHP, I have made the first access and usage examples available in PHP.
They should work with just having PHP installed. Every feedback on this would be helpful.
http://nxtpeers.com/examples.phpSee how to simple connect and make calls to Nxt via PHP:
http://nxtpeers.com/api_php.php Every feedback is appreciated. The scripts are under development and I can need any help to optimize them.