Wallet Tools #549

pull enmaku wants to merge 2 commits into bitcoin:master from enmaku:master changing 3 files +333 −0
  1. enmaku commented at 9:09 PM on October 3, 2011: contributor

    Added walletchangepass.py and walletunlock.py to contrib/wallettools.

    These are two simple python scripts which send the appropriate RPC commands to unlock a wallet and change a wallet password. They are intended to prevent users from having to enter their password as a command-line argument which could then be stored in the console buffer/history in plaintext.

    Both tools rely on bitcoin/bitcoind running with server=1 and an rpcuser and rpcpassword set in bitcoin.conf. They can be easily modified for non-standard ports. walletunlock.py unlocks the wallet for 60 seconds by default, changeable in code, and both modules rely upon python-json-rpc (http://json-rpc.org/wiki/python-json-rpc)

    Signed-off-by: David Perry enmaku@gmail.com

  2. Added wallet tools
    Signed-off-by: David Perry <enmaku@gmail.com>
    8ad100a55b
  3. tcatm commented at 9:34 PM on October 3, 2011: none

    I think this could (and should) easily turned into a more general client. e.g. one that knows how many arguments bitcoin expects (can this be queried via RPC?) and asks for each argument. A blank value for optional arguments will use the default value for all following optional arguments. A first version could just ask for arguments arg1...argn and send execute the RPC when a blank value is entered.

    $ bitcoin-rpc sendfrom
    account> foo
    address> 1Jkas....
    amount> 3.14
    minconf (optional)>  (return)
    543edaf....
    
    $ bitcoin-rpc walletpassphrase
    passphrase> na83klam...
    timeout> 30
    ...
    
  4. enmaku commented at 9:46 PM on October 3, 2011: contributor

    Happy to do the work (when I can find the time) but I have no idea what can be queried via RPC like this. If anyone has an answer (and perhaps some snippet of sample code?) I'd be happy to modify.

  5. Added bitrpc.py which allows for sending of all standard Bitcoin commands via RPC rather than as command line args.
    Signed-off-by: David Perry <enmaku@gmail.com>
    5a105cdb7d
  6. enmaku commented at 11:13 PM on October 3, 2011: contributor

    https://github.com/enmaku/bitcoin/tree/master/contrib/bitrpc

    Supports all the basic commands. I'm sure there's an easier way to run the command in sys.argv[1] without such tremendously long branching but I'm not familiar enough with ServiceProxy. If anyone knows I'd appreciate it.

  7. sipa commented at 8:16 AM on October 4, 2011: member

    Maybe we need to add a meta-RPC call that returns (in a machine-parseable format) all supported RPC calls and their argument types, so tools like this do not need to be be updated everytime an RPC call is added?

  8. tcatm commented at 10:38 AM on October 4, 2011: none

    The output of help can already be parsed. Mandotary arguments are enclosed in <>, optional arguments in []. Lists (sendmany) are enclosed in {}

  9. gavinandresen referenced this in commit 5c5d310a0a on Oct 4, 2011
  10. gavinandresen merged this on Oct 4, 2011
  11. gavinandresen closed this on Oct 4, 2011

  12. enmaku commented at 2:43 PM on October 4, 2011: contributor

    I guess my real question is how to use json-rpc's ServiceProxy more dynamically. For example, I create a ServiceProxy object called "access" and then I can run things like "access.getinfo()" - how can I run something like getinfo() dynamically without already knowing what the procedure is called? Is there some special function like SQL's "exec" that would allow me to do something like "access.exec("getinfo()")" or similar?

  13. coblee referenced this in commit 2e3f535d76 on Jul 17, 2012
  14. ptschip referenced this in commit 9e1620e5fb on Dec 5, 2017
  15. fjahr referenced this in commit 912680ed86 on Jul 24, 2019
  16. kallewoof referenced this in commit a904f02fb1 on Oct 4, 2019
  17. KolbyML referenced this in commit 565e630f64 on Sep 4, 2020
  18. rajarshimaitra referenced this in commit 0c27defb00 on Aug 5, 2021
  19. rajarshimaitra referenced this in commit 060be23df1 on Aug 5, 2021
  20. rajarshimaitra referenced this in commit 52cb91bd44 on Aug 5, 2021
  21. rajarshimaitra referenced this in commit ebf409e0e0 on Aug 5, 2021
  22. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 15:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me