Title: websocket node access: gauging intrest Post by: mocacinno on November 05, 2018, 01:57:07 PM I'm currently developing websocket access to some of the functions of my full node. For a small fee, a developer, site owner or private person could use a secure websocket connection to execute most of the not-wallet-related node functions. This way, he or she get access to some core functionality without having to maintain a full node, he or she can even use javascript to include functionality on webpages on very limited shared hosting formulas.
In the beginning, i was thinking about creating such a websocket daemon for private use and throw away most of the outdated code on mocacinno.com and use a websocket connection instead... However, i tought by myself: maybe somebody else would be interested in such a websocket connection to? Without further comments, here's a dev console view of the initial test of my websocket daemon... Be advised, only a very small part of the functionality i want to include is currently included: https://193.70.78.148:9090/node I've modified my code for now, anybody connected is now automatically authenticated for the time being :) Currently implemented Authentication to the websocket:
Blockchain queries:
Todo Blockchain queries:
Mining:
Network:
Raw transactions:
Util:
Custom:
Title: Re: websocket node access: gauging intrest Post by: Kouiao on November 05, 2018, 03:06:43 PM What stack are your WS implementation ? Do you need help with development ?
Title: Re: websocket node access: gauging intrest Post by: mocacinno on November 06, 2018, 07:46:34 AM What stack are your WS implementation ? Do you need help with development ? I'm actually using websocketd (http://websocketd.com/), so the language of the script itself doesn't really matter ;) Thanks for your offer to help with the development, but at the moment i can handle it... I'm just gauging intrest to see if i'll only develop the functions i need for myself or if i need to develop the full range of functions. Title: Re: websocket node access: gauging intrest Post by: HeRetiK on November 06, 2018, 09:51:49 AM For more complex projects I'd probably run a node myself, but I'll still keep an eye on this thread to see how it evolves.
FYI: Code: {"method": "getlatestblock"} returns invalid JSON :-X Code: {u'merkleroot': u'ae60086ad3d9d53c3213a271c1117449f77f70d89ff7536beb194b5009a12543', u'nonce': 1580982470, [...] (eg. u'merkleroot' should be "merkleroot") Title: Re: websocket node access: gauging intrest Post by: mocacinno on November 06, 2018, 09:56:00 AM For more complex projects I'd probably run a node myself, but I'll still keep an eye on this thread to see how it evolves. FYI: Code: {"method": "getlatestblock"} returns invalid JSON :-X Code: {u'merkleroot': u'ae60086ad3d9d53c3213a271c1117449f77f70d89ff7536beb194b5009a12543', u'nonce': 1580982470, [...] (eg. u'merkleroot' should be "merkleroot") Thanks for notifying me... It's indeed an invalid json, i'll fix it tomorrow morning :) EDIT: had some time, fixed it right away! Thanks for the heads up! BTW: it's perfectly normal to use your own node, even for smaller projects. As a matter of fact, i'd encourage anybody to use their own node. Using my service requires trust... I could easily modify the respons i send to any query, my node can lag, my node can be the victim of an attack... That being said: i don't offer wallet services, you can't create desposit addresses, sign transactions,... By keeping these sensitive services away, i kind of mitigate the problem (afaik). This service is just an easy sollution for anybody who wants medium-complex core functions without running core, probably even from a shared server without any functionality (you can create static pages and use javascript to communicate with an open socket, thus add dynamic functionality without any server side scripts). |