{"action":"created","comment":{"url":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/comments/42212287","id":42212287,"diff_hunk":"@@ -1,13 +1,23 @@\n /*jslint node: true, continue: true, eqeq: true, forin: true, nomen: true, plusplus: true, todo: true, vars: true, white: true */\n \n var assert = require(\"assert\");\n-var sjcl = require(\"sjcl\");\n+var nacl = require(\"tweetnacl\");\n var macaroon = require(\"../macaroon\");\n \n \"use strict\";\n \n-function strBitArray(s) {\n-\treturn sjcl.codec.utf8String.toBits(s);\n+function strUint8Array(s) {\n+\treturn nacl.util.decodeUTF8(s);\n+}\n+\n+function Uint8ArrayToHex(ua) {\n+\tif(!(ua instanceof Uint8Array)){\n+\t\tthrow new Error(\"invalid Uint8Array:\" + ua);\n+\t}\n+  var hex = '';","path":"test/test.js","position":null,"original_position":20,"commit_id":"49e207a2d5cb664f701a7148e69db12c418d3da3","original_commit_id":"a74b28cb3dd82930505e2d2030bc41613254ebc0","user":{"login":"fabricematrat","id":1395842,"avatar_url":"https://avatars.githubusercontent.com/u/1395842?v=3","gravatar_id":"","url":"https://api.github.com/users/fabricematrat","html_url":"https://github.com/fabricematrat","followers_url":"https://api.github.com/users/fabricematrat/followers","following_url":"https://api.github.com/users/fabricematrat/following{/other_user}","gists_url":"https://api.github.com/users/fabricematrat/gists{/gist_id}","starred_url":"https://api.github.com/users/fabricematrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabricematrat/subscriptions","organizations_url":"https://api.github.com/users/fabricematrat/orgs","repos_url":"https://api.github.com/users/fabricematrat/repos","events_url":"https://api.github.com/users/fabricematrat/events{/privacy}","received_events_url":"https://api.github.com/users/fabricematrat/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2015-10-16T06:29:10Z","updated_at":"2015-10-16T06:29:10Z","html_url":"https://github.com/go-macaroon/js-macaroon/pull/5#discussion_r42212287","pull_request_url":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/comments/42212287"},"html":{"href":"https://github.com/go-macaroon/js-macaroon/pull/5#discussion_r42212287"},"pull_request":{"href":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/5","id":47785785,"html_url":"https://github.com/go-macaroon/js-macaroon/pull/5","diff_url":"https://github.com/go-macaroon/js-macaroon/pull/5.diff","patch_url":"https://github.com/go-macaroon/js-macaroon/pull/5.patch","issue_url":"https://api.github.com/repos/go-macaroon/js-macaroon/issues/5","number":5,"state":"open","locked":false,"title":"Modify signature to accept Uint8Array instead of sjcl bit array.","user":{"login":"fabricematrat","id":1395842,"avatar_url":"https://avatars.githubusercontent.com/u/1395842?v=3","gravatar_id":"","url":"https://api.github.com/users/fabricematrat","html_url":"https://github.com/fabricematrat","followers_url":"https://api.github.com/users/fabricematrat/followers","following_url":"https://api.github.com/users/fabricematrat/following{/other_user}","gists_url":"https://api.github.com/users/fabricematrat/gists{/gist_id}","starred_url":"https://api.github.com/users/fabricematrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabricematrat/subscriptions","organizations_url":"https://api.github.com/users/fabricematrat/orgs","repos_url":"https://api.github.com/users/fabricematrat/repos","events_url":"https://api.github.com/users/fabricematrat/events{/privacy}","received_events_url":"https://api.github.com/users/fabricematrat/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-15T13:27:59Z","updated_at":"2015-10-16T06:29:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b2b14b8f13218d25772146882d90ef963578375","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/5/commits","review_comments_url":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/5/comments","review_comment_url":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/go-macaroon/js-macaroon/issues/5/comments","statuses_url":"https://api.github.com/repos/go-macaroon/js-macaroon/statuses/49e207a2d5cb664f701a7148e69db12c418d3da3","head":{"label":"fabricematrat:change-interface-to-uint8array","ref":"change-interface-to-uint8array","sha":"49e207a2d5cb664f701a7148e69db12c418d3da3","user":{"login":"fabricematrat","id":1395842,"avatar_url":"https://avatars.githubusercontent.com/u/1395842?v=3","gravatar_id":"","url":"https://api.github.com/users/fabricematrat","html_url":"https://github.com/fabricematrat","followers_url":"https://api.github.com/users/fabricematrat/followers","following_url":"https://api.github.com/users/fabricematrat/following{/other_user}","gists_url":"https://api.github.com/users/fabricematrat/gists{/gist_id}","starred_url":"https://api.github.com/users/fabricematrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabricematrat/subscriptions","organizations_url":"https://api.github.com/users/fabricematrat/orgs","repos_url":"https://api.github.com/users/fabricematrat/repos","events_url":"https://api.github.com/users/fabricematrat/events{/privacy}","received_events_url":"https://api.github.com/users/fabricematrat/received_events","type":"User","site_admin":false},"repo":{"id":44319087,"name":"js-macaroon","full_name":"fabricematrat/js-macaroon","owner":{"login":"fabricematrat","id":1395842,"avatar_url":"https://avatars.githubusercontent.com/u/1395842?v=3","gravatar_id":"","url":"https://api.github.com/users/fabricematrat","html_url":"https://github.com/fabricematrat","followers_url":"https://api.github.com/users/fabricematrat/followers","following_url":"https://api.github.com/users/fabricematrat/following{/other_user}","gists_url":"https://api.github.com/users/fabricematrat/gists{/gist_id}","starred_url":"https://api.github.com/users/fabricematrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabricematrat/subscriptions","organizations_url":"https://api.github.com/users/fabricematrat/orgs","repos_url":"https://api.github.com/users/fabricematrat/repos","events_url":"https://api.github.com/users/fabricematrat/events{/privacy}","received_events_url":"https://api.github.com/users/fabricematrat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fabricematrat/js-macaroon","description":"Javascript implementation of macaroons","fork":true,"url":"https://api.github.com/repos/fabricematrat/js-macaroon","forks_url":"https://api.github.com/repos/fabricematrat/js-macaroon/forks","keys_url":"https://api.github.com/repos/fabricematrat/js-macaroon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabricematrat/js-macaroon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabricematrat/js-macaroon/teams","hooks_url":"https://api.github.com/repos/fabricematrat/js-macaroon/hooks","issue_events_url":"https://api.github.com/repos/fabricematrat/js-macaroon/issues/events{/number}","events_url":"https://api.github.com/repos/fabricematrat/js-macaroon/events","assignees_url":"https://api.github.com/repos/fabricematrat/js-macaroon/assignees{/user}","branches_url":"https://api.github.com/repos/fabricematrat/js-macaroon/branches{/branch}","tags_url":"https://api.github.com/repos/fabricematrat/js-macaroon/tags","blobs_url":"https://api.github.com/repos/fabricematrat/js-macaroon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabricematrat/js-macaroon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabricematrat/js-macaroon/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabricematrat/js-macaroon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabricematrat/js-macaroon/statuses/{sha}","languages_url":"https://api.github.com/repos/fabricematrat/js-macaroon/languages","stargazers_url":"https://api.github.com/repos/fabricematrat/js-macaroon/stargazers","contributors_url":"https://api.github.com/repos/fabricematrat/js-macaroon/contributors","subscribers_url":"https://api.github.com/repos/fabricematrat/js-macaroon/subscribers","subscription_url":"https://api.github.com/repos/fabricematrat/js-macaroon/subscription","commits_url":"https://api.github.com/repos/fabricematrat/js-macaroon/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabricematrat/js-macaroon/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabricematrat/js-macaroon/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabricematrat/js-macaroon/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabricematrat/js-macaroon/contents/{+path}","compare_url":"https://api.github.com/repos/fabricematrat/js-macaroon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabricematrat/js-macaroon/merges","archive_url":"https://api.github.com/repos/fabricematrat/js-macaroon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabricematrat/js-macaroon/downloads","issues_url":"https://api.github.com/repos/fabricematrat/js-macaroon/issues{/number}","pulls_url":"https://api.github.com/repos/fabricematrat/js-macaroon/pulls{/number}","milestones_url":"https://api.github.com/repos/fabricematrat/js-macaroon/milestones{/number}","notifications_url":"https://api.github.com/repos/fabricematrat/js-macaroon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabricematrat/js-macaroon/labels{/name}","releases_url":"https://api.github.com/repos/fabricematrat/js-macaroon/releases{/id}","created_at":"2015-10-15T13:24:27Z","updated_at":"2015-10-15T13:24:27Z","pushed_at":"2015-10-15T13:44:49Z","git_url":"git://github.com/fabricematrat/js-macaroon.git","ssh_url":"git@github.com:fabricematrat/js-macaroon.git","clone_url":"https://github.com/fabricematrat/js-macaroon.git","svn_url":"https://github.com/fabricematrat/js-macaroon","homepage":null,"size":95,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"go-macaroon:master","ref":"master","sha":"bc3b051e9947116ec6e53abea2d5453638a6e9c9","user":{"login":"go-macaroon","id":7963855,"avatar_url":"https://avatars.githubusercontent.com/u/7963855?v=3","gravatar_id":"","url":"https://api.github.com/users/go-macaroon","html_url":"https://github.com/go-macaroon","followers_url":"https://api.github.com/users/go-macaroon/followers","following_url":"https://api.github.com/users/go-macaroon/following{/other_user}","gists_url":"https://api.github.com/users/go-macaroon/gists{/gist_id}","starred_url":"https://api.github.com/users/go-macaroon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-macaroon/subscriptions","organizations_url":"https://api.github.com/users/go-macaroon/orgs","repos_url":"https://api.github.com/users/go-macaroon/repos","events_url":"https://api.github.com/users/go-macaroon/events{/privacy}","received_events_url":"https://api.github.com/users/go-macaroon/received_events","type":"Organization","site_admin":false},"repo":{"id":28780674,"name":"js-macaroon","full_name":"go-macaroon/js-macaroon","owner":{"login":"go-macaroon","id":7963855,"avatar_url":"https://avatars.githubusercontent.com/u/7963855?v=3","gravatar_id":"","url":"https://api.github.com/users/go-macaroon","html_url":"https://github.com/go-macaroon","followers_url":"https://api.github.com/users/go-macaroon/followers","following_url":"https://api.github.com/users/go-macaroon/following{/other_user}","gists_url":"https://api.github.com/users/go-macaroon/gists{/gist_id}","starred_url":"https://api.github.com/users/go-macaroon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-macaroon/subscriptions","organizations_url":"https://api.github.com/users/go-macaroon/orgs","repos_url":"https://api.github.com/users/go-macaroon/repos","events_url":"https://api.github.com/users/go-macaroon/events{/privacy}","received_events_url":"https://api.github.com/users/go-macaroon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/go-macaroon/js-macaroon","description":"Javascript implementation of macaroons","fork":false,"url":"https://api.github.com/repos/go-macaroon/js-macaroon","forks_url":"https://api.github.com/repos/go-macaroon/js-macaroon/forks","keys_url":"https://api.github.com/repos/go-macaroon/js-macaroon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/go-macaroon/js-macaroon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/go-macaroon/js-macaroon/teams","hooks_url":"https://api.github.com/repos/go-macaroon/js-macaroon/hooks","issue_events_url":"https://api.github.com/repos/go-macaroon/js-macaroon/issues/events{/number}","events_url":"https://api.github.com/repos/go-macaroon/js-macaroon/events","assignees_url":"https://api.github.com/repos/go-macaroon/js-macaroon/assignees{/user}","branches_url":"https://api.github.com/repos/go-macaroon/js-macaroon/branches{/branch}","tags_url":"https://api.github.com/repos/go-macaroon/js-macaroon/tags","blobs_url":"https://api.github.com/repos/go-macaroon/js-macaroon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/go-macaroon/js-macaroon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/go-macaroon/js-macaroon/git/refs{/sha}","trees_url":"https://api.github.com/repos/go-macaroon/js-macaroon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/go-macaroon/js-macaroon/statuses/{sha}","languages_url":"https://api.github.com/repos/go-macaroon/js-macaroon/languages","stargazers_url":"https://api.github.com/repos/go-macaroon/js-macaroon/stargazers","contributors_url":"https://api.github.com/repos/go-macaroon/js-macaroon/contributors","subscribers_url":"https://api.github.com/repos/go-macaroon/js-macaroon/subscribers","subscription_url":"https://api.github.com/repos/go-macaroon/js-macaroon/subscription","commits_url":"https://api.github.com/repos/go-macaroon/js-macaroon/commits{/sha}","git_commits_url":"https://api.github.com/repos/go-macaroon/js-macaroon/git/commits{/sha}","comments_url":"https://api.github.com/repos/go-macaroon/js-macaroon/comments{/number}","issue_comment_url":"https://api.github.com/repos/go-macaroon/js-macaroon/issues/comments{/number}","contents_url":"https://api.github.com/repos/go-macaroon/js-macaroon/contents/{+path}","compare_url":"https://api.github.com/repos/go-macaroon/js-macaroon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/go-macaroon/js-macaroon/merges","archive_url":"https://api.github.com/repos/go-macaroon/js-macaroon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/go-macaroon/js-macaroon/downloads","issues_url":"https://api.github.com/repos/go-macaroon/js-macaroon/issues{/number}","pulls_url":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls{/number}","milestones_url":"https://api.github.com/repos/go-macaroon/js-macaroon/milestones{/number}","notifications_url":"https://api.github.com/repos/go-macaroon/js-macaroon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/go-macaroon/js-macaroon/labels{/name}","releases_url":"https://api.github.com/repos/go-macaroon/js-macaroon/releases{/id}","created_at":"2015-01-04T17:24:05Z","updated_at":"2015-03-14T23:01:22Z","pushed_at":"2015-10-15T13:44:49Z","git_url":"git://github.com/go-macaroon/js-macaroon.git","ssh_url":"git@github.com:go-macaroon/js-macaroon.git","clone_url":"https://github.com/go-macaroon/js-macaroon.git","svn_url":"https://github.com/go-macaroon/js-macaroon","homepage":null,"size":186,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/5"},"html":{"href":"https://github.com/go-macaroon/js-macaroon/pull/5"},"issue":{"href":"https://api.github.com/repos/go-macaroon/js-macaroon/issues/5"},"comments":{"href":"https://api.github.com/repos/go-macaroon/js-macaroon/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/go-macaroon/js-macaroon/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/go-macaroon/js-macaroon/statuses/49e207a2d5cb664f701a7148e69db12c418d3da3"}}}}