{"action":"closed","issue":{"url":"https://api.github.com/repos/bcoin-org/bcoin/issues/575","repository_url":"https://api.github.com/repos/bcoin-org/bcoin","labels_url":"https://api.github.com/repos/bcoin-org/bcoin/issues/575/labels{/name}","comments_url":"https://api.github.com/repos/bcoin-org/bcoin/issues/575/comments","events_url":"https://api.github.com/repos/bcoin-org/bcoin/issues/575/events","html_url":"https://github.com/bcoin-org/bcoin/issues/575","id":351415727,"node_id":"MDU6SXNzdWUzNTE0MTU3Mjc=","number":575,"title":"Address.getHash(address) does not accept a string as an input ","user":{"login":"jdetle","id":10944582,"node_id":"MDQ6VXNlcjEwOTQ0NTgy","avatar_url":"https://avatars1.githubusercontent.com/u/10944582?v=4","gravatar_id":"","url":"https://api.github.com/users/jdetle","html_url":"https://github.com/jdetle","followers_url":"https://api.github.com/users/jdetle/followers","following_url":"https://api.github.com/users/jdetle/following{/other_user}","gists_url":"https://api.github.com/users/jdetle/gists{/gist_id}","starred_url":"https://api.github.com/users/jdetle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdetle/subscriptions","organizations_url":"https://api.github.com/users/jdetle/orgs","repos_url":"https://api.github.com/users/jdetle/repos","events_url":"https://api.github.com/users/jdetle/events{/privacy}","received_events_url":"https://api.github.com/users/jdetle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-08-17T00:32:07Z","updated_at":"2018-08-24T21:45:54Z","closed_at":"2018-08-24T21:45:54Z","author_association":"NONE","body":"in bcoin/lib/primitives/address:\r\n\r\nIt is documented as receiving a string as input, but it does not appear to. Can someone help explain if I'm missing something here? \r\n```javascript\r\n  /**\r\n   * Get the hash of a base58 address or address-related object.\r\n   * @param {String|Address|Hash} data\r\n   * @param {String?} enc\r\n   * @param {Network?} network\r\n   * @returns {Hash}\r\n   */\r\n\r\n  static getHash(data, network) {\r\n    if (!data)\r\n      throw new Error('Object is not an address.');\r\n\r\n    let hash;\r\n\r\n    if (Buffer.isBuffer(data)) {\r\n      if (data.length !== 20 && data.length !== 32)\r\n        throw new Error('Object is not an address.');\r\n      hash = data;\r\n    } else if (data instanceof Address) {\r\n      hash = data.hash;\r\n    } else {\r\n      throw new Error('Object is not an address.');\r\n    }\r\n\r\n    return hash;\r\n  }\r\n```\r\n\r\n"}}
{"actor":{"display_login":"bucko13"}}