{"action":"created","issue":{"url":"https://api.github.com/repos/bitpay/gulp-bitcore/issues/3","labels_url":"https://api.github.com/repos/bitpay/gulp-bitcore/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/bitpay/gulp-bitcore/issues/3/comments","events_url":"https://api.github.com/repos/bitpay/gulp-bitcore/issues/3/events","html_url":"https://github.com/bitpay/gulp-bitcore/issues/3","id":54403691,"number":3,"title":"uglify mangles object names that bitcore requires","user":{"login":"johnkozan","id":140828,"avatar_url":"https://avatars.githubusercontent.com/u/140828?v=3","gravatar_id":"","url":"https://api.github.com/users/johnkozan","html_url":"https://github.com/johnkozan","followers_url":"https://api.github.com/users/johnkozan/followers","following_url":"https://api.github.com/users/johnkozan/following{/other_user}","gists_url":"https://api.github.com/users/johnkozan/gists{/gist_id}","starred_url":"https://api.github.com/users/johnkozan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnkozan/subscriptions","organizations_url":"https://api.github.com/users/johnkozan/orgs","repos_url":"https://api.github.com/users/johnkozan/repos","events_url":"https://api.github.com/users/johnkozan/events{/privacy}","received_events_url":"https://api.github.com/users/johnkozan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-15T02:02:36Z","updated_at":"2015-01-15T18:11:59Z","closed_at":null,"body":"I'm using bitcore 0.8.5 from bower.\r\n\r\nUsing the minified brower bundle, several bitcore functions fail because they expect arguments to be of a certain type, which uglify has mangled to a single letter name.\r\n\r\nFor example\r\nhttps://github.com/bitpay/bitcore/blob/master/lib/address.js#L231\r\n```javascript\r\n  if (!(pubkey instanceof PublicKey)) {\r\n    throw new TypeError('Address must be an instance of PublicKey.');\r\n  }\r\n```\r\n\r\nbut `PublicKey` has been mangled to a single letter and I get the following error:\r\n\r\n```\r\n TypeError: Address must be an instance of PublicKey.\r\n    at Function.n._transformPublicKey (http://localhost:9000/bower_components/bitcore/browser/bitcore.min.js:1:5708)\r\n    at Function.n.fromPublicKey (http://localhost:9000/bower_components/bitcore/browser/bitcore.min.js:1:6453)\r\n    at l.d.toAddress (http://localhost:9000/bower_components/bitcore/browser/bitcore.min.js:4:4457)\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bitpay/gulp-bitcore/issues/comments/70132634","html_url":"https://github.com/bitpay/gulp-bitcore/issues/3#issuecomment-70132634","issue_url":"https://api.github.com/repos/bitpay/gulp-bitcore/issues/3","id":70132634,"user":{"login":"johnkozan","id":140828,"avatar_url":"https://avatars.githubusercontent.com/u/140828?v=3","gravatar_id":"","url":"https://api.github.com/users/johnkozan","html_url":"https://github.com/johnkozan","followers_url":"https://api.github.com/users/johnkozan/followers","following_url":"https://api.github.com/users/johnkozan/following{/other_user}","gists_url":"https://api.github.com/users/johnkozan/gists{/gist_id}","starred_url":"https://api.github.com/users/johnkozan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnkozan/subscriptions","organizations_url":"https://api.github.com/users/johnkozan/orgs","repos_url":"https://api.github.com/users/johnkozan/repos","events_url":"https://api.github.com/users/johnkozan/events{/privacy}","received_events_url":"https://api.github.com/users/johnkozan/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T18:11:59Z","updated_at":"2015-01-15T18:11:59Z","body":"I updated my bower.json to bitcore 0.8.6 and the issue seems to have been resolved.\r\n\r\nTested on Chrome and Firefox on Linux."}}