Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: nodejs module for bitshares  (Read 368 times)

0 Members and 1 Guest are viewing this topic.

Offline spartako

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
nodejs module for bitshares
« on: December 26, 2014, 10:20:07 PM »

I have written a simple rpc client in nodejs for bitshares.
https://github.com/spartako-bitshares/node-bitshares

you can install with:
Code: [Select]
npm install bitshares

Enjoy!
wallet_account_set_approval spartako

Offline arubi

  • Sr. Member
  • ****
  • Posts: 209
    • View Profile
Re: nodejs module for bitshares
« Reply #1 on: December 28, 2014, 07:38:01 PM »
Cute :)

Some rejects (if I may):

Nobody wants RPC credentials in cleartext in the process list. Users who explicitly run an RPC server should always set the parameters in config.json . Have your software look up these credentials from that file and use 'em.
No reason passing usernames and passwords in cleartext from commandline.

Offline spartako

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
Re: nodejs module for bitshares
« Reply #2 on: December 28, 2014, 08:56:31 PM »
Cute :)

Some rejects (if I may):

Nobody wants RPC credentials in cleartext in the process list. Users who explicitly run an RPC server should always set the parameters in config.json . Have your software look up these credentials from that file and use 'em.
No reason passing usernames and passwords in cleartext from commandline.

Thanks for your feedback!
I added this note in readme file:

Code: [Select]
Note: This command is used only for convenience.
For security reason I strongly suggest you to change ~/.Bitshares/config.json file and launch bitshares_client without parameters.
« Last Edit: December 28, 2014, 09:02:06 PM by spartako »
wallet_account_set_approval spartako

Offline svk

Re: nodejs module for bitshares
« Reply #3 on: January 02, 2015, 01:12:18 PM »
Good job Spartako!

For future reference if anyone's looking for a nodejs rpc client, I've also just published one that's slightly different from this one, see:

https://bitsharestalk.org/index.php?topic=11272.msg168882#msg168882

Main differences are: uses promises, does not prefetch all rpc commands so you need to find them on your own.
Worker: dev.bitsharesblocks

 

Google+