stacks.js icon indicating copy to clipboard operation
stacks.js copied to clipboard

Enable all blockstack-cli commands in rpc

Open aagorelik opened this issue 10 years ago • 4 comments

How about adding ability to call all of blockstack cli's commands via it's rpc? It does make sense when talking about non-python apps willing to use blockstack's client. Right now, for example, to call a price command from my non-python app, I need to run corresponding console command from app and read output. But wallet can be locked, for example.

aagorelik avatar Aug 17 '16 12:08 aagorelik

or, t least, add -walletpassword flag for blockstack, maybe? To overcome prompts

aagorelik avatar Aug 17 '16 15:08 aagorelik

Hi @aagorelik, they're not all turned on by default as a security precaution. In particular, any process that can read your client.ini file (and get the RPC token) can make requests with your client's daemon without having to know your password. For example, if a malicious Web page were to serve you a Flash exploit that causes your browser to read your client.ini file, it could do things like register names using your BTC or steal names from you.

What we really need to do is add a second authentication factor for RPC methods that can spend BTC. For example, the daemon could not only require that the requester serve it the RPC token, but also an HTTP auth header with the digest of the user's password (so that any process that wants to spend BTC or register/transfer names has to prompt the user).

jcnelson avatar Aug 17 '16 18:08 jcnelson

or, t least, add -walletpassword flag for blockstack, maybe? To overcome prompts

This is a good idea :) I've separated it into issue #122.

jcnelson avatar Aug 17 '16 19:08 jcnelson

We have consolidated the API here: https://github.com/blockstack/blockstack-core/tree/master/api (running version is here: core.blockstack.org).

jcnelson avatar Mar 20 '17 22:03 jcnelson