{"action":"created","issue":{"url":"https://api.github.com/repos/btcsuite/btcd/issues/311","labels_url":"https://api.github.com/repos/btcsuite/btcd/issues/311/labels{/name}","comments_url":"https://api.github.com/repos/btcsuite/btcd/issues/311/comments","events_url":"https://api.github.com/repos/btcsuite/btcd/issues/311/events","html_url":"https://github.com/btcsuite/btcd/pull/311","id":58264590,"number":311,"title":"cmd/btcctl: Rewrite btcctl to use the new features of btcjson.","user":{"login":"davecgh","id":2115102,"avatar_url":"https://avatars.githubusercontent.com/u/2115102?v=3","gravatar_id":"","url":"https://api.github.com/users/davecgh","html_url":"https://github.com/davecgh","followers_url":"https://api.github.com/users/davecgh/followers","following_url":"https://api.github.com/users/davecgh/following{/other_user}","gists_url":"https://api.github.com/users/davecgh/gists{/gist_id}","starred_url":"https://api.github.com/users/davecgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecgh/subscriptions","organizations_url":"https://api.github.com/users/davecgh/orgs","repos_url":"https://api.github.com/users/davecgh/repos","events_url":"https://api.github.com/users/davecgh/events{/privacy}","received_events_url":"https://api.github.com/users/davecgh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-02-19T20:25:33Z","updated_at":"2015-02-25T19:34:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/btcsuite/btcd/pulls/311","html_url":"https://github.com/btcsuite/btcd/pull/311","diff_url":"https://github.com/btcsuite/btcd/pull/311.diff","patch_url":"https://github.com/btcsuite/btcd/pull/311.patch"},"body":"This pull request contains what is essentially a complete rewrite of the btcctl utility to make use of the new features provided by the latest version btcjson and improve several things along the way.  The following summarizes the changes:\r\n\r\n- The supported commands and handling now come directly from btcjson, so it is no longer necessary to manually add new commands.  Once a command has been registered with btcjson, it will automatically become usable by btcctl complete with full error handling (once it is re-compiled of  course)\r\n- Rather than dumping the entire list of commands on every error, the user now must specifically request the list of commands via the -l option\r\n- The list of commands is now categorized by chain and wallet and alphabetized\r\n- The help flag now only shows the help options instead of also dumping all of the commands\r\n- The error display on valid commands with invalid parameters has been greatly improved to show the specific parameter number, reason, and error code\r\n- When a valid command is specified with invalid parameter, only the usage for that specific command is shown now\r\n- It is now possible to use a SOCKS5 proxy for connection\r\n- The output of commands has been improved in the following ways:\r\n  - Strings on commands such as `getbestblockhash` no longer have quotes wrapped around them\r\n  - Fields that are integers no longer show in scientific notation when they are large (timestamps for example)\r\n\r\nThis closes #305 as a side effect."},"comment":{"url":"https://api.github.com/repos/btcsuite/btcd/issues/comments/76037888","html_url":"https://github.com/btcsuite/btcd/pull/311#issuecomment-76037888","issue_url":"https://api.github.com/repos/btcsuite/btcd/issues/311","id":76037888,"user":{"login":"davecgh","id":2115102,"avatar_url":"https://avatars.githubusercontent.com/u/2115102?v=3","gravatar_id":"","url":"https://api.github.com/users/davecgh","html_url":"https://github.com/davecgh","followers_url":"https://api.github.com/users/davecgh/followers","following_url":"https://api.github.com/users/davecgh/following{/other_user}","gists_url":"https://api.github.com/users/davecgh/gists{/gist_id}","starred_url":"https://api.github.com/users/davecgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecgh/subscriptions","organizations_url":"https://api.github.com/users/davecgh/orgs","repos_url":"https://api.github.com/users/davecgh/repos","events_url":"https://api.github.com/users/davecgh/events{/privacy}","received_events_url":"https://api.github.com/users/davecgh/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T19:34:40Z","updated_at":"2015-02-25T19:34:40Z","body":"1. `listCommands` is defined in that file since it's the only place it's called from (in `loadConfig`)\r\n2. I think it reads cleaner converting it to a string, but I'll change it over."}}