{"action":"created","comment":{"url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/comments/235116737","pull_request_review_id":176907766,"id":235116737,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTExNjczNw==","diff_hunk":"@@ -89,6 +89,19 @@ module.exports = class LinkedDataSignature {\n     if(options.nonce !== undefined && typeof options.nonce !== 'string') {\n       throw new TypeError('\"options.nonce\" must be a string.');\n     }\n+    const {signer} = options;\n+    if(signer) {\n+      if(!(signer.sign && typeof signer.sign === 'function')) {\n+        throw new TypeError('\"options.signer.sign\" must be a function.');\n+      }\n+      if(!(signer.creator && typeof signer.creator)) {","path":"lib/suites/LinkedDataSignature.js","position":9,"original_position":9,"commit_id":"24bbeee4a2bed9c66a070b0fa77f044ec28a6c36","original_commit_id":"24bbeee4a2bed9c66a070b0fa77f044ec28a6c36","user":{"login":"dlongley","id":168137,"node_id":"MDQ6VXNlcjE2ODEzNw==","avatar_url":"https://avatars0.githubusercontent.com/u/168137?v=4","gravatar_id":"","url":"https://api.github.com/users/dlongley","html_url":"https://github.com/dlongley","followers_url":"https://api.github.com/users/dlongley/followers","following_url":"https://api.github.com/users/dlongley/following{/other_user}","gists_url":"https://api.github.com/users/dlongley/gists{/gist_id}","starred_url":"https://api.github.com/users/dlongley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlongley/subscriptions","organizations_url":"https://api.github.com/users/dlongley/orgs","repos_url":"https://api.github.com/users/dlongley/repos","events_url":"https://api.github.com/users/dlongley/events{/privacy}","received_events_url":"https://api.github.com/users/dlongley/received_events","type":"User","site_admin":false},"body":"I'm wondering if `creator` should be passed to the sign function instead? I guess someone crafting the `sign` function could do this on their own ... any thoughts here? Seems natural to me that the `sign` function would receive the ID of the key to be used and the data to be signed ... and it would return an object that includes at least the raw signature (we may want to allow for it to include other meta data in the future, I don't know).","created_at":"2018-11-20T18:21:40Z","updated_at":"2018-11-20T18:21:51Z","html_url":"https://github.com/digitalbazaar/jsonld-signatures/pull/38#discussion_r235116737","pull_request_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/38","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/comments/235116737"},"html":{"href":"https://github.com/digitalbazaar/jsonld-signatures/pull/38#discussion_r235116737"},"pull_request":{"href":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/38","id":231373972,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMzczOTcy","html_url":"https://github.com/digitalbazaar/jsonld-signatures/pull/38","diff_url":"https://github.com/digitalbazaar/jsonld-signatures/pull/38.diff","patch_url":"https://github.com/digitalbazaar/jsonld-signatures/pull/38.patch","issue_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/issues/38","number":38,"state":"open","locked":false,"title":"Implement signer API.","user":{"login":"mattcollier","id":902041,"node_id":"MDQ6VXNlcjkwMjA0MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/902041?v=4","gravatar_id":"","url":"https://api.github.com/users/mattcollier","html_url":"https://github.com/mattcollier","followers_url":"https://api.github.com/users/mattcollier/followers","following_url":"https://api.github.com/users/mattcollier/following{/other_user}","gists_url":"https://api.github.com/users/mattcollier/gists{/gist_id}","starred_url":"https://api.github.com/users/mattcollier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattcollier/subscriptions","organizations_url":"https://api.github.com/users/mattcollier/orgs","repos_url":"https://api.github.com/users/mattcollier/repos","events_url":"https://api.github.com/users/mattcollier/events{/privacy}","received_events_url":"https://api.github.com/users/mattcollier/received_events","type":"User","site_admin":false},"body":"@dlongley @dmitrizagidulin does this accurately reflect what we discussed?\r\n\r\n@davidlehn do you know anything about the FIXME related to babel and Buffer?","created_at":"2018-11-15T23:55:31Z","updated_at":"2018-11-20T18:21:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c8349de4b6987d1f9916f4f46d3d533df9212c20","assignee":null,"assignees":[],"requested_reviewers":[{"login":"gannan08","id":13918179,"node_id":"MDQ6VXNlcjEzOTE4MTc5","avatar_url":"https://avatars3.githubusercontent.com/u/13918179?v=4","gravatar_id":"","url":"https://api.github.com/users/gannan08","html_url":"https://github.com/gannan08","followers_url":"https://api.github.com/users/gannan08/followers","following_url":"https://api.github.com/users/gannan08/following{/other_user}","gists_url":"https://api.github.com/users/gannan08/gists{/gist_id}","starred_url":"https://api.github.com/users/gannan08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gannan08/subscriptions","organizations_url":"https://api.github.com/users/gannan08/orgs","repos_url":"https://api.github.com/users/gannan08/repos","events_url":"https://api.github.com/users/gannan08/events{/privacy}","received_events_url":"https://api.github.com/users/gannan08/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/38/commits","review_comments_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/38/comments","review_comment_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/comments{/number}","comments_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/issues/38/comments","statuses_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/statuses/24bbeee4a2bed9c66a070b0fa77f044ec28a6c36","head":{"label":"digitalbazaar:externalSigning","ref":"externalSigning","sha":"24bbeee4a2bed9c66a070b0fa77f044ec28a6c36","user":{"login":"digitalbazaar","id":167436,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NzQzNg==","avatar_url":"https://avatars3.githubusercontent.com/u/167436?v=4","gravatar_id":"","url":"https://api.github.com/users/digitalbazaar","html_url":"https://github.com/digitalbazaar","followers_url":"https://api.github.com/users/digitalbazaar/followers","following_url":"https://api.github.com/users/digitalbazaar/following{/other_user}","gists_url":"https://api.github.com/users/digitalbazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalbazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalbazaar/subscriptions","organizations_url":"https://api.github.com/users/digitalbazaar/orgs","repos_url":"https://api.github.com/users/digitalbazaar/repos","events_url":"https://api.github.com/users/digitalbazaar/events{/privacy}","received_events_url":"https://api.github.com/users/digitalbazaar/received_events","type":"Organization","site_admin":false},"repo":{"id":27188796,"node_id":"MDEwOlJlcG9zaXRvcnkyNzE4ODc5Ng==","name":"jsonld-signatures","full_name":"digitalbazaar/jsonld-signatures","private":false,"owner":{"login":"digitalbazaar","id":167436,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NzQzNg==","avatar_url":"https://avatars3.githubusercontent.com/u/167436?v=4","gravatar_id":"","url":"https://api.github.com/users/digitalbazaar","html_url":"https://github.com/digitalbazaar","followers_url":"https://api.github.com/users/digitalbazaar/followers","following_url":"https://api.github.com/users/digitalbazaar/following{/other_user}","gists_url":"https://api.github.com/users/digitalbazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalbazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalbazaar/subscriptions","organizations_url":"https://api.github.com/users/digitalbazaar/orgs","repos_url":"https://api.github.com/users/digitalbazaar/repos","events_url":"https://api.github.com/users/digitalbazaar/events{/privacy}","received_events_url":"https://api.github.com/users/digitalbazaar/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/digitalbazaar/jsonld-signatures","description":"An implementation of the Linked Data Signatures specification for JSON-LD. Works in the browser and node.js.","fork":false,"url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures","forks_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/forks","keys_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/teams","hooks_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/hooks","issue_events_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/issues/events{/number}","events_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/events","assignees_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/assignees{/user}","branches_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/branches{/branch}","tags_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/tags","blobs_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/git/refs{/sha}","trees_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/statuses/{sha}","languages_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/languages","stargazers_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/stargazers","contributors_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/contributors","subscribers_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/subscribers","subscription_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/subscription","commits_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/commits{/sha}","git_commits_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/git/commits{/sha}","comments_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/comments{/number}","issue_comment_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/issues/comments{/number}","contents_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/contents/{+path}","compare_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/merges","archive_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/downloads","issues_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/issues{/number}","pulls_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls{/number}","milestones_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/milestones{/number}","notifications_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/labels{/name}","releases_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/releases{/id}","deployments_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/deployments","created_at":"2014-11-26T17:45:39Z","updated_at":"2018-11-07T15:12:19Z","pushed_at":"2018-11-20T17:52:48Z","git_url":"git://github.com/digitalbazaar/jsonld-signatures.git","ssh_url":"git@github.com:digitalbazaar/jsonld-signatures.git","clone_url":"https://github.com/digitalbazaar/jsonld-signatures.git","svn_url":"https://github.com/digitalbazaar/jsonld-signatures","homepage":null,"size":442,"stargazers_count":53,"watchers_count":53,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":23,"open_issues":14,"watchers":53,"default_branch":"master"}},"base":{"label":"digitalbazaar:proofPurpose","ref":"proofPurpose","sha":"908ad73b1832f92a274ba72699ddb08457f55a4b","user":{"login":"digitalbazaar","id":167436,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NzQzNg==","avatar_url":"https://avatars3.githubusercontent.com/u/167436?v=4","gravatar_id":"","url":"https://api.github.com/users/digitalbazaar","html_url":"https://github.com/digitalbazaar","followers_url":"https://api.github.com/users/digitalbazaar/followers","following_url":"https://api.github.com/users/digitalbazaar/following{/other_user}","gists_url":"https://api.github.com/users/digitalbazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalbazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalbazaar/subscriptions","organizations_url":"https://api.github.com/users/digitalbazaar/orgs","repos_url":"https://api.github.com/users/digitalbazaar/repos","events_url":"https://api.github.com/users/digitalbazaar/events{/privacy}","received_events_url":"https://api.github.com/users/digitalbazaar/received_events","type":"Organization","site_admin":false},"repo":{"id":27188796,"node_id":"MDEwOlJlcG9zaXRvcnkyNzE4ODc5Ng==","name":"jsonld-signatures","full_name":"digitalbazaar/jsonld-signatures","private":false,"owner":{"login":"digitalbazaar","id":167436,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NzQzNg==","avatar_url":"https://avatars3.githubusercontent.com/u/167436?v=4","gravatar_id":"","url":"https://api.github.com/users/digitalbazaar","html_url":"https://github.com/digitalbazaar","followers_url":"https://api.github.com/users/digitalbazaar/followers","following_url":"https://api.github.com/users/digitalbazaar/following{/other_user}","gists_url":"https://api.github.com/users/digitalbazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalbazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalbazaar/subscriptions","organizations_url":"https://api.github.com/users/digitalbazaar/orgs","repos_url":"https://api.github.com/users/digitalbazaar/repos","events_url":"https://api.github.com/users/digitalbazaar/events{/privacy}","received_events_url":"https://api.github.com/users/digitalbazaar/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/digitalbazaar/jsonld-signatures","description":"An implementation of the Linked Data Signatures specification for JSON-LD. Works in the browser and node.js.","fork":false,"url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures","forks_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/forks","keys_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/teams","hooks_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/hooks","issue_events_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/issues/events{/number}","events_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/events","assignees_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/assignees{/user}","branches_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/branches{/branch}","tags_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/tags","blobs_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/git/refs{/sha}","trees_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/statuses/{sha}","languages_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/languages","stargazers_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/stargazers","contributors_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/contributors","subscribers_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/subscribers","subscription_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/subscription","commits_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/commits{/sha}","git_commits_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/git/commits{/sha}","comments_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/comments{/number}","issue_comment_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/issues/comments{/number}","contents_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/contents/{+path}","compare_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/merges","archive_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/downloads","issues_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/issues{/number}","pulls_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls{/number}","milestones_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/milestones{/number}","notifications_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/labels{/name}","releases_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/releases{/id}","deployments_url":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/deployments","created_at":"2014-11-26T17:45:39Z","updated_at":"2018-11-07T15:12:19Z","pushed_at":"2018-11-20T17:52:48Z","git_url":"git://github.com/digitalbazaar/jsonld-signatures.git","ssh_url":"git@github.com:digitalbazaar/jsonld-signatures.git","clone_url":"https://github.com/digitalbazaar/jsonld-signatures.git","svn_url":"https://github.com/digitalbazaar/jsonld-signatures","homepage":null,"size":442,"stargazers_count":53,"watchers_count":53,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":23,"open_issues":14,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/38"},"html":{"href":"https://github.com/digitalbazaar/jsonld-signatures/pull/38"},"issue":{"href":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/issues/38"},"comments":{"href":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/digitalbazaar/jsonld-signatures/statuses/24bbeee4a2bed9c66a070b0fa77f044ec28a6c36"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dlongley"}}