Bitcoin Forum
December 13, 2018, 09:24:28 PM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: different return codes when sending coins from CLI?  (Read 8252 times)
bitcoinex
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250


probiwon.com


View Profile WWW
August 04, 2010, 07:00:42 PM
 #1

Please make a different return codes for bitcoin client when sending coins from command line.

Now amount error and address error have equal return codes and becomes difficult to distinguish error while writing a high-level interface.


New bitcoin lottery: probiwon.com
- Moжeт, ты eщё и в Heвидимyю Pyкy Pынкa вepyeшь? - Зaчeм жe вepoвaть в тo, чтo мoжнo нaблюдaть нeпocpeдcтвeннo?
1544736268
Hero Member
*
Offline Offline

Posts: 1544736268

View Profile Personal Message (Offline)

Ignore
1544736268
Reply with quote  #2

1544736268
Report to moderator
100% New Software
PC, Mac, Android, & HTML5 Clients
Krill Rakeback
Low Rake
Bitcoin Poker 3.0
Bad Beat Jackpot
SwC Poker Relaunch
PLAY NOW
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1544736268
Hero Member
*
Offline Offline

Posts: 1544736268

View Profile Personal Message (Offline)

Ignore
1544736268
Reply with quote  #2

1544736268
Report to moderator
1544736268
Hero Member
*
Offline Offline

Posts: 1544736268

View Profile Personal Message (Offline)

Ignore
1544736268
Reply with quote  #2

1544736268
Report to moderator
lachesis
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
August 04, 2010, 11:13:45 PM
 #2

You should be using Python or Perl or something when writing a high level interface. The CLI code is really just there to let you play with the server. You should try the python-jsonrpc library.

Bitcoin Calculator | Scallion | GPG Key | WoT Rating | 1QGacAtYA7E8V3BAiM7sgvLg7PZHk5WnYc
bitcoinex
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250


probiwon.com


View Profile WWW
August 05, 2010, 05:47:16 PM
 #3

You should be using Python or Perl or something when writing a high level interface. The CLI code is really just there to let you play with the server. You should try the python-jsonrpc library.

Not agree with you.

JSON-RPC provides too many permissions. For webshop you need only address generation and info about receiving coins to address. JSON-RPC will provide an opportunity after site hack steal coins through it with website's uid.

That is, you still need a wrapper that implenets only the necessary functions and that changes the uid (by sudo or suid)

New bitcoin lottery: probiwon.com
- Moжeт, ты eщё и в Heвидимyю Pyкy Pынкa вepyeшь? - Зaчeм жe вepoвaть в тo, чтo мoжнo нaблюдaть нeпocpeдcтвeннo?
knightmb
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


mymdn.io


View Profile WWW
August 05, 2010, 06:24:28 PM
 #4

Aren't the JSON-RPC commands the same as the command line, just ported over the http ? Both would return the same problem I believe.




      ▄▄          ▄▄
     ▄███▄      ▄███▄
     ███████▄ ▄██████▄
    ██████████████████▄
   ███████████████████
  ▄█████████████████████
 ▄███████████████████████
▄█████████████████████████
███████████████████████████
▀▀███████████████████████▀▀
    ▀▀███████████████▀▀
        ▀▀██████▀▀
            ▀
Meridian

myMDN.io
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Digital Collateral


JOIN ICO
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 1014


Chief Scientist


View Profile WWW
August 05, 2010, 06:40:16 PM
 #5

Ummm, the command-line RPC is implemented on top of the JSON-RPC mechanism.

So if the command-line RPC is working on your machine, then the JSON-RPC is, too.

How often do you get the chance to work on a potentially world-changing project?
bitcoinex
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250


probiwon.com


View Profile WWW
August 05, 2010, 06:58:41 PM
 #6

Ummm, the command-line RPC is implemented on top of the JSON-RPC mechanism.

So if the command-line RPC is working on your machine, then the JSON-RPC is, too.


On my project bitcoin client runs as special 'bitcoin' user's program.
All communications between www-data (webserver user) and bitcoin client works through wrappers. User www-data don't knows JSON-RPC password.

New bitcoin lottery: probiwon.com
- Moжeт, ты eщё и в Heвидимyю Pyкy Pынкa вepyeшь? - Зaчeм жe вepoвaть в тo, чтo мoжнo нaблюдaть нeпocpeдcтвeннo?
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!