{"action":"created","comment":{"url":"https://api.github.com/repos/ElementsProject/lightning/pulls/comments/166906597","pull_request_review_id":95039724,"id":166906597,"diff_hunk":"@@ -395,6 +396,90 @@ static const struct json_command newaddr_command = {\n };\n AUTODATA(json_command, &newaddr_command);\n \n+static void json_listaddrs(struct command *cmd,\n+\t\t\t\t\t\t   const char *buffer, const jsmntok_t *params)\n+{\n+\tstruct json_result *response = new_json_result(cmd);\n+\tjsmntok_t *bip32tok;\n+\tu64 bip32_max_index;\n+\tconst tal_t *tmpctx = tal_tmpctx(NULL);\n+\n+    if (!json_get_params(cmd, buffer, params,\n+                         \"?bip32_max_index\", &bip32tok, NULL)) {\n+\t\ttal_free(tmpctx);\n+        return;\n+    }\n+\n+\tif (!bip32tok || !json_tok_u64(buffer, bip32tok, &bip32_max_index)) {\n+        bip32_max_index = db_get_intvar(cmd->ld->wallet->db, \"bip32_max_index\", 0);","path":"wallet/walletrpc.c","position":27,"original_position":27,"commit_id":"ed09dd28ed4fd50636980a11bf5420f8be7ceefe","original_commit_id":"ed09dd28ed4fd50636980a11bf5420f8be7ceefe","user":{"login":"cdecker","id":120117,"avatar_url":"https://avatars2.githubusercontent.com/u/120117?v=4","gravatar_id":"","url":"https://api.github.com/users/cdecker","html_url":"https://github.com/cdecker","followers_url":"https://api.github.com/users/cdecker/followers","following_url":"https://api.github.com/users/cdecker/following{/other_user}","gists_url":"https://api.github.com/users/cdecker/gists{/gist_id}","starred_url":"https://api.github.com/users/cdecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdecker/subscriptions","organizations_url":"https://api.github.com/users/cdecker/orgs","repos_url":"https://api.github.com/users/cdecker/repos","events_url":"https://api.github.com/users/cdecker/events{/privacy}","received_events_url":"https://api.github.com/users/cdecker/received_events","type":"User","site_admin":false},"body":"Minor nit: inconsistent use of spaces vs. tabs","created_at":"2018-02-08T11:29:44Z","updated_at":"2018-02-08T11:29:44Z","html_url":"https://github.com/ElementsProject/lightning/pull/940#discussion_r166906597","pull_request_url":"https://api.github.com/repos/ElementsProject/lightning/pulls/940","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ElementsProject/lightning/pulls/comments/166906597"},"html":{"href":"https://github.com/ElementsProject/lightning/pull/940#discussion_r166906597"},"pull_request":{"href":"https://api.github.com/repos/ElementsProject/lightning/pulls/940"}}},"pull_request":{"url":"https://api.github.com/repos/ElementsProject/lightning/pulls/940","id":167678051,"html_url":"https://github.com/ElementsProject/lightning/pull/940","diff_url":"https://github.com/ElementsProject/lightning/pull/940.diff","patch_url":"https://github.com/ElementsProject/lightning/pull/940.patch","issue_url":"https://api.github.com/repos/ElementsProject/lightning/issues/940","number":940,"state":"open","locked":false,"title":"Add dev-listaddrs command","user":{"login":"lvaccaro","id":11627784,"avatar_url":"https://avatars0.githubusercontent.com/u/11627784?v=4","gravatar_id":"","url":"https://api.github.com/users/lvaccaro","html_url":"https://github.com/lvaccaro","followers_url":"https://api.github.com/users/lvaccaro/followers","following_url":"https://api.github.com/users/lvaccaro/following{/other_user}","gists_url":"https://api.github.com/users/lvaccaro/gists{/gist_id}","starred_url":"https://api.github.com/users/lvaccaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvaccaro/subscriptions","organizations_url":"https://api.github.com/users/lvaccaro/orgs","repos_url":"https://api.github.com/users/lvaccaro/repos","events_url":"https://api.github.com/users/lvaccaro/events{/privacy}","received_events_url":"https://api.github.com/users/lvaccaro/received_events","type":"User","site_admin":false},"body":"Add dev-listaddrs command to show bip32 addresses list (up to bip32_max_index).\r\n#### help\r\n\r\n``` shell\r\n$ lightning-cli help\r\n...\r\ncommand=dev-listaddrs\r\ndescription=Show addresses list up to derivation {index} (default is the last bip32 index)\r\n...\r\n```\r\n#### output\r\n``` shell\r\n$ lightning-cli dev-listaddrs\r\n{ \"addresses\" : \r\n        [ \r\n                { \r\n                         \"keyidx\" : 0, \r\n                         \"address\" : \"...\", \r\n                         \"pubkey\" : \"...\", \r\n                         \"redeemscript\" : \"...\" \r\n                }, \r\n                .... \r\n        ]\r\n}\r\n```\r\nSet optional value {index} to show also future derivations up to {index}. This could be useful for testing and recovery. \r\n","created_at":"2018-02-07T12:22:17Z","updated_at":"2018-02-08T11:29:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c9e5951afee890bbe958665c7dac49163b56490","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/ElementsProject/lightning/pulls/940/commits","review_comments_url":"https://api.github.com/repos/ElementsProject/lightning/pulls/940/comments","review_comment_url":"https://api.github.com/repos/ElementsProject/lightning/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ElementsProject/lightning/issues/940/comments","statuses_url":"https://api.github.com/repos/ElementsProject/lightning/statuses/ed09dd28ed4fd50636980a11bf5420f8be7ceefe","head":{"label":"lvaccaro:listaddr","ref":"listaddr","sha":"ed09dd28ed4fd50636980a11bf5420f8be7ceefe","user":{"login":"lvaccaro","id":11627784,"avatar_url":"https://avatars0.githubusercontent.com/u/11627784?v=4","gravatar_id":"","url":"https://api.github.com/users/lvaccaro","html_url":"https://github.com/lvaccaro","followers_url":"https://api.github.com/users/lvaccaro/followers","following_url":"https://api.github.com/users/lvaccaro/following{/other_user}","gists_url":"https://api.github.com/users/lvaccaro/gists{/gist_id}","starred_url":"https://api.github.com/users/lvaccaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvaccaro/subscriptions","organizations_url":"https://api.github.com/users/lvaccaro/orgs","repos_url":"https://api.github.com/users/lvaccaro/repos","events_url":"https://api.github.com/users/lvaccaro/events{/privacy}","received_events_url":"https://api.github.com/users/lvaccaro/received_events","type":"User","site_admin":false},"repo":{"id":118467369,"name":"lightning","full_name":"lvaccaro/lightning","owner":{"login":"lvaccaro","id":11627784,"avatar_url":"https://avatars0.githubusercontent.com/u/11627784?v=4","gravatar_id":"","url":"https://api.github.com/users/lvaccaro","html_url":"https://github.com/lvaccaro","followers_url":"https://api.github.com/users/lvaccaro/followers","following_url":"https://api.github.com/users/lvaccaro/following{/other_user}","gists_url":"https://api.github.com/users/lvaccaro/gists{/gist_id}","starred_url":"https://api.github.com/users/lvaccaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvaccaro/subscriptions","organizations_url":"https://api.github.com/users/lvaccaro/orgs","repos_url":"https://api.github.com/users/lvaccaro/repos","events_url":"https://api.github.com/users/lvaccaro/events{/privacy}","received_events_url":"https://api.github.com/users/lvaccaro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lvaccaro/lightning","description":"c-lightning — a Lightning Network implementation in C","fork":true,"url":"https://api.github.com/repos/lvaccaro/lightning","forks_url":"https://api.github.com/repos/lvaccaro/lightning/forks","keys_url":"https://api.github.com/repos/lvaccaro/lightning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lvaccaro/lightning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lvaccaro/lightning/teams","hooks_url":"https://api.github.com/repos/lvaccaro/lightning/hooks","issue_events_url":"https://api.github.com/repos/lvaccaro/lightning/issues/events{/number}","events_url":"https://api.github.com/repos/lvaccaro/lightning/events","assignees_url":"https://api.github.com/repos/lvaccaro/lightning/assignees{/user}","branches_url":"https://api.github.com/repos/lvaccaro/lightning/branches{/branch}","tags_url":"https://api.github.com/repos/lvaccaro/lightning/tags","blobs_url":"https://api.github.com/repos/lvaccaro/lightning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lvaccaro/lightning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lvaccaro/lightning/git/refs{/sha}","trees_url":"https://api.github.com/repos/lvaccaro/lightning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lvaccaro/lightning/statuses/{sha}","languages_url":"https://api.github.com/repos/lvaccaro/lightning/languages","stargazers_url":"https://api.github.com/repos/lvaccaro/lightning/stargazers","contributors_url":"https://api.github.com/repos/lvaccaro/lightning/contributors","subscribers_url":"https://api.github.com/repos/lvaccaro/lightning/subscribers","subscription_url":"https://api.github.com/repos/lvaccaro/lightning/subscription","commits_url":"https://api.github.com/repos/lvaccaro/lightning/commits{/sha}","git_commits_url":"https://api.github.com/repos/lvaccaro/lightning/git/commits{/sha}","comments_url":"https://api.github.com/repos/lvaccaro/lightning/comments{/number}","issue_comment_url":"https://api.github.com/repos/lvaccaro/lightning/issues/comments{/number}","contents_url":"https://api.github.com/repos/lvaccaro/lightning/contents/{+path}","compare_url":"https://api.github.com/repos/lvaccaro/lightning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lvaccaro/lightning/merges","archive_url":"https://api.github.com/repos/lvaccaro/lightning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lvaccaro/lightning/downloads","issues_url":"https://api.github.com/repos/lvaccaro/lightning/issues{/number}","pulls_url":"https://api.github.com/repos/lvaccaro/lightning/pulls{/number}","milestones_url":"https://api.github.com/repos/lvaccaro/lightning/milestones{/number}","notifications_url":"https://api.github.com/repos/lvaccaro/lightning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lvaccaro/lightning/labels{/name}","releases_url":"https://api.github.com/repos/lvaccaro/lightning/releases{/id}","deployments_url":"https://api.github.com/repos/lvaccaro/lightning/deployments","created_at":"2018-01-22T14:22:48Z","updated_at":"2018-01-22T14:22:52Z","pushed_at":"2018-02-07T23:19:24Z","git_url":"git://github.com/lvaccaro/lightning.git","ssh_url":"git@github.com:lvaccaro/lightning.git","clone_url":"https://github.com/lvaccaro/lightning.git","svn_url":"https://github.com/lvaccaro/lightning","homepage":"","size":12132,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ElementsProject:master","ref":"master","sha":"b3d4e161b5b361bb0b86fb35530d994908412633","user":{"login":"ElementsProject","id":12729539,"avatar_url":"https://avatars2.githubusercontent.com/u/12729539?v=4","gravatar_id":"","url":"https://api.github.com/users/ElementsProject","html_url":"https://github.com/ElementsProject","followers_url":"https://api.github.com/users/ElementsProject/followers","following_url":"https://api.github.com/users/ElementsProject/following{/other_user}","gists_url":"https://api.github.com/users/ElementsProject/gists{/gist_id}","starred_url":"https://api.github.com/users/ElementsProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElementsProject/subscriptions","organizations_url":"https://api.github.com/users/ElementsProject/orgs","repos_url":"https://api.github.com/users/ElementsProject/repos","events_url":"https://api.github.com/users/ElementsProject/events{/privacy}","received_events_url":"https://api.github.com/users/ElementsProject/received_events","type":"Organization","site_admin":false},"repo":{"id":37350472,"name":"lightning","full_name":"ElementsProject/lightning","owner":{"login":"ElementsProject","id":12729539,"avatar_url":"https://avatars2.githubusercontent.com/u/12729539?v=4","gravatar_id":"","url":"https://api.github.com/users/ElementsProject","html_url":"https://github.com/ElementsProject","followers_url":"https://api.github.com/users/ElementsProject/followers","following_url":"https://api.github.com/users/ElementsProject/following{/other_user}","gists_url":"https://api.github.com/users/ElementsProject/gists{/gist_id}","starred_url":"https://api.github.com/users/ElementsProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElementsProject/subscriptions","organizations_url":"https://api.github.com/users/ElementsProject/orgs","repos_url":"https://api.github.com/users/ElementsProject/repos","events_url":"https://api.github.com/users/ElementsProject/events{/privacy}","received_events_url":"https://api.github.com/users/ElementsProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ElementsProject/lightning","description":"c-lightning — a Lightning Network implementation in C","fork":false,"url":"https://api.github.com/repos/ElementsProject/lightning","forks_url":"https://api.github.com/repos/ElementsProject/lightning/forks","keys_url":"https://api.github.com/repos/ElementsProject/lightning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ElementsProject/lightning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ElementsProject/lightning/teams","hooks_url":"https://api.github.com/repos/ElementsProject/lightning/hooks","issue_events_url":"https://api.github.com/repos/ElementsProject/lightning/issues/events{/number}","events_url":"https://api.github.com/repos/ElementsProject/lightning/events","assignees_url":"https://api.github.com/repos/ElementsProject/lightning/assignees{/user}","branches_url":"https://api.github.com/repos/ElementsProject/lightning/branches{/branch}","tags_url":"https://api.github.com/repos/ElementsProject/lightning/tags","blobs_url":"https://api.github.com/repos/ElementsProject/lightning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ElementsProject/lightning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ElementsProject/lightning/git/refs{/sha}","trees_url":"https://api.github.com/repos/ElementsProject/lightning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ElementsProject/lightning/statuses/{sha}","languages_url":"https://api.github.com/repos/ElementsProject/lightning/languages","stargazers_url":"https://api.github.com/repos/ElementsProject/lightning/stargazers","contributors_url":"https://api.github.com/repos/ElementsProject/lightning/contributors","subscribers_url":"https://api.github.com/repos/ElementsProject/lightning/subscribers","subscription_url":"https://api.github.com/repos/ElementsProject/lightning/subscription","commits_url":"https://api.github.com/repos/ElementsProject/lightning/commits{/sha}","git_commits_url":"https://api.github.com/repos/ElementsProject/lightning/git/commits{/sha}","comments_url":"https://api.github.com/repos/ElementsProject/lightning/comments{/number}","issue_comment_url":"https://api.github.com/repos/ElementsProject/lightning/issues/comments{/number}","contents_url":"https://api.github.com/repos/ElementsProject/lightning/contents/{+path}","compare_url":"https://api.github.com/repos/ElementsProject/lightning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ElementsProject/lightning/merges","archive_url":"https://api.github.com/repos/ElementsProject/lightning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ElementsProject/lightning/downloads","issues_url":"https://api.github.com/repos/ElementsProject/lightning/issues{/number}","pulls_url":"https://api.github.com/repos/ElementsProject/lightning/pulls{/number}","milestones_url":"https://api.github.com/repos/ElementsProject/lightning/milestones{/number}","notifications_url":"https://api.github.com/repos/ElementsProject/lightning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ElementsProject/lightning/labels{/name}","releases_url":"https://api.github.com/repos/ElementsProject/lightning/releases{/id}","deployments_url":"https://api.github.com/repos/ElementsProject/lightning/deployments","created_at":"2015-06-13T00:04:22Z","updated_at":"2018-02-08T01:47:42Z","pushed_at":"2018-02-08T10:35:43Z","git_url":"git://github.com/ElementsProject/lightning.git","ssh_url":"git@github.com:ElementsProject/lightning.git","clone_url":"https://github.com/ElementsProject/lightning.git","svn_url":"https://github.com/ElementsProject/lightning","homepage":"","size":12117,"stargazers_count":723,"watchers_count":723,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":183,"mirror_url":null,"archived":false,"open_issues_count":123,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":183,"open_issues":123,"watchers":723,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ElementsProject/lightning/pulls/940"},"html":{"href":"https://github.com/ElementsProject/lightning/pull/940"},"issue":{"href":"https://api.github.com/repos/ElementsProject/lightning/issues/940"},"comments":{"href":"https://api.github.com/repos/ElementsProject/lightning/issues/940/comments"},"review_comments":{"href":"https://api.github.com/repos/ElementsProject/lightning/pulls/940/comments"},"review_comment":{"href":"https://api.github.com/repos/ElementsProject/lightning/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ElementsProject/lightning/pulls/940/commits"},"statuses":{"href":"https://api.github.com/repos/ElementsProject/lightning/statuses/ed09dd28ed4fd50636980a11bf5420f8be7ceefe"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cdecker"}}