{"action":"created","comment":{"url":"https://api.github.com/repos/CityOfZion/neon-js/pulls/comments/172781847","pull_request_review_id":101852429,"id":172781847,"diff_hunk":"@@ -0,0 +1,54 @@\n+import { Account, AccountLike } from './Account';\n+\n+export interface WalletLike {\n+  name: string\n+  scrypt: WalletScryptParams\n+  accounts: (Account|AccountLike)[]\n+  extra: object\n+}\n+\n+export interface WalletScryptParams {\n+  n: number\n+  r: number\n+  p: number\n+}\n+\n+/** Wallet class to read and integrate a Wallet file into the library. This class is responsible for ensuring that the Wallet File is read correctly and usable by the library. */\n+export class Wallet {\n+  name: string\n+  scrypt: WalletScryptParams\n+  accounts: Account[]\n+  extra: object\n+\n+  constructor(file: WalletLike)\n+\n+  /** Imports a Wallet through a JSON string */\n+  static import(jsonString: string): Wallet\n+\n+  /**Reads a Wallet file sync  */\n+  static readFile(filepath: string): Wallet\n+\n+  /** Adds an account. */\n+  addAccount(acct: Account | object): number\n+\n+  /** Attempts to decrypt Account at index in array. */\n+  decrypt(index: number, keyphrase: string): boolean\n+\n+  /** Attempts to decrypt all accounts with keyphrase. */\n+  decryptAll(keyphrase: string): boolean[]\n+\n+  /** Attempts to encrypt Account at index in array. */\n+  encrypt(index: number, keyphrase: string): boolean\n+\n+  /** Attempts to encrypt all accounts with keyphrase. */\n+  encryptAll(keyphrase: string): boolean[]\n+\n+  /** Export this class as a string */\n+  export(): string","path":"src/wallet/typings/Wallet.d.ts","position":47,"original_position":47,"commit_id":"a3b87dcd9496a76e48ee95558ce4463747e57cd2","original_commit_id":"a3b87dcd9496a76e48ee95558ce4463747e57cd2","user":{"login":"snowypowers","id":9101245,"avatar_url":"https://avatars1.githubusercontent.com/u/9101245?v=4","gravatar_id":"","url":"https://api.github.com/users/snowypowers","html_url":"https://github.com/snowypowers","followers_url":"https://api.github.com/users/snowypowers/followers","following_url":"https://api.github.com/users/snowypowers/following{/other_user}","gists_url":"https://api.github.com/users/snowypowers/gists{/gist_id}","starred_url":"https://api.github.com/users/snowypowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowypowers/subscriptions","organizations_url":"https://api.github.com/users/snowypowers/orgs","repos_url":"https://api.github.com/users/snowypowers/repos","events_url":"https://api.github.com/users/snowypowers/events{/privacy}","received_events_url":"https://api.github.com/users/snowypowers/received_events","type":"User","site_admin":false},"body":"I believe this returns `WalletLike`","created_at":"2018-03-07T09:25:07Z","updated_at":"2018-03-07T09:27:53Z","html_url":"https://github.com/CityOfZion/neon-js/pull/185#discussion_r172781847","pull_request_url":"https://api.github.com/repos/CityOfZion/neon-js/pulls/185","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/CityOfZion/neon-js/pulls/comments/172781847"},"html":{"href":"https://github.com/CityOfZion/neon-js/pull/185#discussion_r172781847"},"pull_request":{"href":"https://api.github.com/repos/CityOfZion/neon-js/pulls/185"}}},"pull_request":{"url":"https://api.github.com/repos/CityOfZion/neon-js/pulls/185","id":172716846,"html_url":"https://github.com/CityOfZion/neon-js/pull/185","diff_url":"https://github.com/CityOfZion/neon-js/pull/185.diff","patch_url":"https://github.com/CityOfZion/neon-js/pull/185.patch","issue_url":"https://api.github.com/repos/CityOfZion/neon-js/issues/185","number":185,"state":"open","locked":false,"title":"Refactor(typings): Modularize typings & Add descriptions","user":{"login":"nickfujita","id":6342442,"avatar_url":"https://avatars3.githubusercontent.com/u/6342442?v=4","gravatar_id":"","url":"https://api.github.com/users/nickfujita","html_url":"https://github.com/nickfujita","followers_url":"https://api.github.com/users/nickfujita/followers","following_url":"https://api.github.com/users/nickfujita/following{/other_user}","gists_url":"https://api.github.com/users/nickfujita/gists{/gist_id}","starred_url":"https://api.github.com/users/nickfujita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickfujita/subscriptions","organizations_url":"https://api.github.com/users/nickfujita/orgs","repos_url":"https://api.github.com/users/nickfujita/repos","events_url":"https://api.github.com/users/nickfujita/events{/privacy}","received_events_url":"https://api.github.com/users/nickfujita/received_events","type":"User","site_admin":false},"body":"As this repo grows, it makes sense to break the typings into modular files rather that a single typing file for each package folder. It will help to separate typing concerns and make it easier to find definitions.\r\n\r\nShort descriptions were added for each typing where possible. This will provide users with a short bit of information when hovering over usages in IDEs such as Atom or VSCode.","created_at":"2018-03-04T12:22:58Z","updated_at":"2018-03-07T09:27:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b6f0ddc28ed094a221022f40318714b710bfee7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CityOfZion/neon-js/pulls/185/commits","review_comments_url":"https://api.github.com/repos/CityOfZion/neon-js/pulls/185/comments","review_comment_url":"https://api.github.com/repos/CityOfZion/neon-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CityOfZion/neon-js/issues/185/comments","statuses_url":"https://api.github.com/repos/CityOfZion/neon-js/statuses/a3b87dcd9496a76e48ee95558ce4463747e57cd2","head":{"label":"nickfujita:typings-refactor","ref":"typings-refactor","sha":"a3b87dcd9496a76e48ee95558ce4463747e57cd2","user":{"login":"nickfujita","id":6342442,"avatar_url":"https://avatars3.githubusercontent.com/u/6342442?v=4","gravatar_id":"","url":"https://api.github.com/users/nickfujita","html_url":"https://github.com/nickfujita","followers_url":"https://api.github.com/users/nickfujita/followers","following_url":"https://api.github.com/users/nickfujita/following{/other_user}","gists_url":"https://api.github.com/users/nickfujita/gists{/gist_id}","starred_url":"https://api.github.com/users/nickfujita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickfujita/subscriptions","organizations_url":"https://api.github.com/users/nickfujita/orgs","repos_url":"https://api.github.com/users/nickfujita/repos","events_url":"https://api.github.com/users/nickfujita/events{/privacy}","received_events_url":"https://api.github.com/users/nickfujita/received_events","type":"User","site_admin":false},"repo":{"id":121735837,"name":"neon-js","full_name":"nickfujita/neon-js","owner":{"login":"nickfujita","id":6342442,"avatar_url":"https://avatars3.githubusercontent.com/u/6342442?v=4","gravatar_id":"","url":"https://api.github.com/users/nickfujita","html_url":"https://github.com/nickfujita","followers_url":"https://api.github.com/users/nickfujita/followers","following_url":"https://api.github.com/users/nickfujita/following{/other_user}","gists_url":"https://api.github.com/users/nickfujita/gists{/gist_id}","starred_url":"https://api.github.com/users/nickfujita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickfujita/subscriptions","organizations_url":"https://api.github.com/users/nickfujita/orgs","repos_url":"https://api.github.com/users/nickfujita/repos","events_url":"https://api.github.com/users/nickfujita/events{/privacy}","received_events_url":"https://api.github.com/users/nickfujita/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nickfujita/neon-js","description":"Javascript libraries that allow the applications to interact with NEO blockchain","fork":true,"url":"https://api.github.com/repos/nickfujita/neon-js","forks_url":"https://api.github.com/repos/nickfujita/neon-js/forks","keys_url":"https://api.github.com/repos/nickfujita/neon-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nickfujita/neon-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nickfujita/neon-js/teams","hooks_url":"https://api.github.com/repos/nickfujita/neon-js/hooks","issue_events_url":"https://api.github.com/repos/nickfujita/neon-js/issues/events{/number}","events_url":"https://api.github.com/repos/nickfujita/neon-js/events","assignees_url":"https://api.github.com/repos/nickfujita/neon-js/assignees{/user}","branches_url":"https://api.github.com/repos/nickfujita/neon-js/branches{/branch}","tags_url":"https://api.github.com/repos/nickfujita/neon-js/tags","blobs_url":"https://api.github.com/repos/nickfujita/neon-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nickfujita/neon-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nickfujita/neon-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/nickfujita/neon-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nickfujita/neon-js/statuses/{sha}","languages_url":"https://api.github.com/repos/nickfujita/neon-js/languages","stargazers_url":"https://api.github.com/repos/nickfujita/neon-js/stargazers","contributors_url":"https://api.github.com/repos/nickfujita/neon-js/contributors","subscribers_url":"https://api.github.com/repos/nickfujita/neon-js/subscribers","subscription_url":"https://api.github.com/repos/nickfujita/neon-js/subscription","commits_url":"https://api.github.com/repos/nickfujita/neon-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/nickfujita/neon-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/nickfujita/neon-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/nickfujita/neon-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/nickfujita/neon-js/contents/{+path}","compare_url":"https://api.github.com/repos/nickfujita/neon-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nickfujita/neon-js/merges","archive_url":"https://api.github.com/repos/nickfujita/neon-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nickfujita/neon-js/downloads","issues_url":"https://api.github.com/repos/nickfujita/neon-js/issues{/number}","pulls_url":"https://api.github.com/repos/nickfujita/neon-js/pulls{/number}","milestones_url":"https://api.github.com/repos/nickfujita/neon-js/milestones{/number}","notifications_url":"https://api.github.com/repos/nickfujita/neon-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nickfujita/neon-js/labels{/name}","releases_url":"https://api.github.com/repos/nickfujita/neon-js/releases{/id}","deployments_url":"https://api.github.com/repos/nickfujita/neon-js/deployments","created_at":"2018-02-16T09:54:46Z","updated_at":"2018-02-16T09:54:48Z","pushed_at":"2018-03-06T15:53:07Z","git_url":"git://github.com/nickfujita/neon-js.git","ssh_url":"git@github.com:nickfujita/neon-js.git","clone_url":"https://github.com/nickfujita/neon-js.git","svn_url":"https://github.com/nickfujita/neon-js","homepage":"https://cityofzion.io/neon-js","size":28372,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"CityOfZion:dev","ref":"dev","sha":"2bda6add50b0f26ff03d70cf3d62509777928669","user":{"login":"CityOfZion","id":29782569,"avatar_url":"https://avatars1.githubusercontent.com/u/29782569?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfZion","html_url":"https://github.com/CityOfZion","followers_url":"https://api.github.com/users/CityOfZion/followers","following_url":"https://api.github.com/users/CityOfZion/following{/other_user}","gists_url":"https://api.github.com/users/CityOfZion/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfZion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfZion/subscriptions","organizations_url":"https://api.github.com/users/CityOfZion/orgs","repos_url":"https://api.github.com/users/CityOfZion/repos","events_url":"https://api.github.com/users/CityOfZion/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfZion/received_events","type":"Organization","site_admin":false},"repo":{"id":96053720,"name":"neon-js","full_name":"CityOfZion/neon-js","owner":{"login":"CityOfZion","id":29782569,"avatar_url":"https://avatars1.githubusercontent.com/u/29782569?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfZion","html_url":"https://github.com/CityOfZion","followers_url":"https://api.github.com/users/CityOfZion/followers","following_url":"https://api.github.com/users/CityOfZion/following{/other_user}","gists_url":"https://api.github.com/users/CityOfZion/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfZion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfZion/subscriptions","organizations_url":"https://api.github.com/users/CityOfZion/orgs","repos_url":"https://api.github.com/users/CityOfZion/repos","events_url":"https://api.github.com/users/CityOfZion/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfZion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CityOfZion/neon-js","description":"Javascript libraries that allow the applications to interact with NEO blockchain","fork":false,"url":"https://api.github.com/repos/CityOfZion/neon-js","forks_url":"https://api.github.com/repos/CityOfZion/neon-js/forks","keys_url":"https://api.github.com/repos/CityOfZion/neon-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CityOfZion/neon-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CityOfZion/neon-js/teams","hooks_url":"https://api.github.com/repos/CityOfZion/neon-js/hooks","issue_events_url":"https://api.github.com/repos/CityOfZion/neon-js/issues/events{/number}","events_url":"https://api.github.com/repos/CityOfZion/neon-js/events","assignees_url":"https://api.github.com/repos/CityOfZion/neon-js/assignees{/user}","branches_url":"https://api.github.com/repos/CityOfZion/neon-js/branches{/branch}","tags_url":"https://api.github.com/repos/CityOfZion/neon-js/tags","blobs_url":"https://api.github.com/repos/CityOfZion/neon-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CityOfZion/neon-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CityOfZion/neon-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/CityOfZion/neon-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CityOfZion/neon-js/statuses/{sha}","languages_url":"https://api.github.com/repos/CityOfZion/neon-js/languages","stargazers_url":"https://api.github.com/repos/CityOfZion/neon-js/stargazers","contributors_url":"https://api.github.com/repos/CityOfZion/neon-js/contributors","subscribers_url":"https://api.github.com/repos/CityOfZion/neon-js/subscribers","subscription_url":"https://api.github.com/repos/CityOfZion/neon-js/subscription","commits_url":"https://api.github.com/repos/CityOfZion/neon-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/CityOfZion/neon-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/CityOfZion/neon-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/CityOfZion/neon-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/CityOfZion/neon-js/contents/{+path}","compare_url":"https://api.github.com/repos/CityOfZion/neon-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CityOfZion/neon-js/merges","archive_url":"https://api.github.com/repos/CityOfZion/neon-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CityOfZion/neon-js/downloads","issues_url":"https://api.github.com/repos/CityOfZion/neon-js/issues{/number}","pulls_url":"https://api.github.com/repos/CityOfZion/neon-js/pulls{/number}","milestones_url":"https://api.github.com/repos/CityOfZion/neon-js/milestones{/number}","notifications_url":"https://api.github.com/repos/CityOfZion/neon-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CityOfZion/neon-js/labels{/name}","releases_url":"https://api.github.com/repos/CityOfZion/neon-js/releases{/id}","deployments_url":"https://api.github.com/repos/CityOfZion/neon-js/deployments","created_at":"2017-07-02T23:10:03Z","updated_at":"2018-03-05T03:18:30Z","pushed_at":"2018-03-07T09:13:42Z","git_url":"git://github.com/CityOfZion/neon-js.git","ssh_url":"git@github.com:CityOfZion/neon-js.git","clone_url":"https://github.com/CityOfZion/neon-js.git","svn_url":"https://github.com/CityOfZion/neon-js","homepage":"https://cityofzion.io/neon-js","size":28589,"stargazers_count":66,"watchers_count":66,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":69,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":69,"open_issues":9,"watchers":66,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CityOfZion/neon-js/pulls/185"},"html":{"href":"https://github.com/CityOfZion/neon-js/pull/185"},"issue":{"href":"https://api.github.com/repos/CityOfZion/neon-js/issues/185"},"comments":{"href":"https://api.github.com/repos/CityOfZion/neon-js/issues/185/comments"},"review_comments":{"href":"https://api.github.com/repos/CityOfZion/neon-js/pulls/185/comments"},"review_comment":{"href":"https://api.github.com/repos/CityOfZion/neon-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CityOfZion/neon-js/pulls/185/commits"},"statuses":{"href":"https://api.github.com/repos/CityOfZion/neon-js/statuses/a3b87dcd9496a76e48ee95558ce4463747e57cd2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"snowypowers"}}