Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: genjix on December 16, 2010, 01:34:33 PM



Title: RFC suggestions wrt JSON bitcoind api
Post by: genjix on December 16, 2010, 01:34:33 PM
Hey,

getaccountaddress <account> -> getaddress [account]
getnewaddress -> newaddress
sendtoaddress -> send

I think that the get prefix should only be used for getting existing information. Things like making a new address are an action.

These changes will make the API more logical and easier to use. Especially for someone like me who uses bitcoind over SSH and on my local machine also.

sendtoaddress <- the to address part is redundant. Where else would you send it to? (i know IP's are possible but aren't they not recommended/being fazed out?)

getnewaddress <- You have to make a new address before returning it. Therefore you're not 'getting' something that already exists but performing an action.

getaddress should have account be optional. Have the ability to just return an address from the default account "".


Title: Re: RFC suggestions wrt JSON bitcoind api
Post by: genjix on December 16, 2010, 01:37:12 PM
I don't mind to make a patch if needed- this should be a trivial change. Just deprecate the old functions for the new.

EDIT: ooops mods can you move this to Development? I made an error.


Title: Re: RFC suggestions wrt JSON bitcoind api
Post by: davout on December 16, 2010, 01:48:50 PM
+1 it sounds sensible


Title: Re: RFC suggestions wrt JSON bitcoind api
Post by: genjix on December 16, 2010, 06:58:08 PM
bumping back up.