{"action":"created","comment":{"url":"https://api.github.com/repos/nucypher/nucypher/pulls/comments/235208031","pull_request_review_id":177022393,"id":235208031,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTIwODAzMQ==","diff_hunk":"@@ -76,3 +80,78 @@ def __init__(self, *args, **kwargs) -> None:\n     def from_bytes(cls, some_bytes):\n         capsule, sender_pubkey_sig, ciphertext = cls.split_bytes(some_bytes)\n         return cls(capsule=capsule, sender_pubkey_sig=sender_pubkey_sig, ciphertext=ciphertext)\n+\n+\n+Revocation = namedtuple('Revocation', ['prefix', 'arrangement_id', 'signature'])\n+\n+\n+class RevocationKit:\n+\n+    def __init__(self, policy_treasure_map):\n+        self.revocations = dict()\n+        for node_id, arrangement_id in policy_treasure_map:\n+            self.revocations[node_id] = Revocation(b'REVOKE-', arrangement_id,\n+                                                   constants.NOT_SIGNED)\n+\n+    def __iter__(self):\n+        return iter(self.revocations.values())\n+\n+    def __getitem__(self, node_id):\n+        return self.revocations[node_id]\n+\n+    def __len__(self):\n+        return len(self.revocations)\n+\n+    def __eq__(self, other):\n+        return self.revocations == other.revocations\n+\n+    @staticmethod\n+    def revocation_to_bytes(revocation):\n+        prefix, arrangement_id, signature = revocation\n+        return b''.join((prefix, arrangement_id, bytes(signature)))","path":"nucypher/crypto/kits.py","position":43,"original_position":43,"commit_id":"db96bb13c0814e8320dcf82b02dc5cc10e5f87a2","original_commit_id":"db96bb13c0814e8320dcf82b02dc5cc10e5f87a2","user":{"login":"tuxxy","id":3598318,"node_id":"MDQ6VXNlcjM1OTgzMTg=","avatar_url":"https://avatars1.githubusercontent.com/u/3598318?v=4","gravatar_id":"","url":"https://api.github.com/users/tuxxy","html_url":"https://github.com/tuxxy","followers_url":"https://api.github.com/users/tuxxy/followers","following_url":"https://api.github.com/users/tuxxy/following{/other_user}","gists_url":"https://api.github.com/users/tuxxy/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxxy/subscriptions","organizations_url":"https://api.github.com/users/tuxxy/orgs","repos_url":"https://api.github.com/users/tuxxy/repos","events_url":"https://api.github.com/users/tuxxy/events{/privacy}","received_events_url":"https://api.github.com/users/tuxxy/received_events","type":"User","site_admin":false},"body":"Can you implement `__bytes__` on a `namedtuple`?","created_at":"2018-11-20T23:33:57Z","updated_at":"2018-11-20T23:33:57Z","html_url":"https://github.com/nucypher/nucypher/pull/521#discussion_r235208031","pull_request_url":"https://api.github.com/repos/nucypher/nucypher/pulls/521","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/comments/235208031"},"html":{"href":"https://github.com/nucypher/nucypher/pull/521#discussion_r235208031"},"pull_request":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/521"}},"in_reply_to_id":235207393},"pull_request":{"url":"https://api.github.com/repos/nucypher/nucypher/pulls/521","id":228334361,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MzM0MzYx","html_url":"https://github.com/nucypher/nucypher/pull/521","diff_url":"https://github.com/nucypher/nucypher/pull/521.diff","patch_url":"https://github.com/nucypher/nucypher/pull/521.patch","issue_url":"https://api.github.com/repos/nucypher/nucypher/issues/521","number":521,"state":"open","locked":false,"title":"Implement Revoke ","user":{"login":"tuxxy","id":3598318,"node_id":"MDQ6VXNlcjM1OTgzMTg=","avatar_url":"https://avatars1.githubusercontent.com/u/3598318?v=4","gravatar_id":"","url":"https://api.github.com/users/tuxxy","html_url":"https://github.com/tuxxy","followers_url":"https://api.github.com/users/tuxxy/followers","following_url":"https://api.github.com/users/tuxxy/following{/other_user}","gists_url":"https://api.github.com/users/tuxxy/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxxy/subscriptions","organizations_url":"https://api.github.com/users/tuxxy/orgs","repos_url":"https://api.github.com/users/tuxxy/repos","events_url":"https://api.github.com/users/tuxxy/events{/privacy}","received_events_url":"https://api.github.com/users/tuxxy/received_events","type":"User","site_admin":false},"body":"Moved here from #499 \r\n\r\n### What this does:\r\n1. Adds a `RevocationKit` to `nucypher.crypto.kits`.\r\n2. Adds a RESTful endpoint utilizing the `DELETE` verb to revoke arrangements with the `revoke_arrangement` method.","created_at":"2018-11-05T12:22:38Z","updated_at":"2018-11-20T23:33:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c614e4f182dc89af89b70f3a09bed1f3ebc4003","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jMyles","id":311973,"node_id":"MDQ6VXNlcjMxMTk3Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/311973?v=4","gravatar_id":"","url":"https://api.github.com/users/jMyles","html_url":"https://github.com/jMyles","followers_url":"https://api.github.com/users/jMyles/followers","following_url":"https://api.github.com/users/jMyles/following{/other_user}","gists_url":"https://api.github.com/users/jMyles/gists{/gist_id}","starred_url":"https://api.github.com/users/jMyles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jMyles/subscriptions","organizations_url":"https://api.github.com/users/jMyles/orgs","repos_url":"https://api.github.com/users/jMyles/repos","events_url":"https://api.github.com/users/jMyles/events{/privacy}","received_events_url":"https://api.github.com/users/jMyles/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nucypher/nucypher/pulls/521/commits","review_comments_url":"https://api.github.com/repos/nucypher/nucypher/pulls/521/comments","review_comment_url":"https://api.github.com/repos/nucypher/nucypher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nucypher/nucypher/issues/521/comments","statuses_url":"https://api.github.com/repos/nucypher/nucypher/statuses/db96bb13c0814e8320dcf82b02dc5cc10e5f87a2","head":{"label":"tuxxy:fourth-annual-updated-revoke","ref":"fourth-annual-updated-revoke","sha":"db96bb13c0814e8320dcf82b02dc5cc10e5f87a2","user":{"login":"tuxxy","id":3598318,"node_id":"MDQ6VXNlcjM1OTgzMTg=","avatar_url":"https://avatars1.githubusercontent.com/u/3598318?v=4","gravatar_id":"","url":"https://api.github.com/users/tuxxy","html_url":"https://github.com/tuxxy","followers_url":"https://api.github.com/users/tuxxy/followers","following_url":"https://api.github.com/users/tuxxy/following{/other_user}","gists_url":"https://api.github.com/users/tuxxy/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxxy/subscriptions","organizations_url":"https://api.github.com/users/tuxxy/orgs","repos_url":"https://api.github.com/users/tuxxy/repos","events_url":"https://api.github.com/users/tuxxy/events{/privacy}","received_events_url":"https://api.github.com/users/tuxxy/received_events","type":"User","site_admin":false},"repo":{"id":101790527,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE3OTA1Mjc=","name":"nucypher-kms","full_name":"tuxxy/nucypher-kms","private":false,"owner":{"login":"tuxxy","id":3598318,"node_id":"MDQ6VXNlcjM1OTgzMTg=","avatar_url":"https://avatars1.githubusercontent.com/u/3598318?v=4","gravatar_id":"","url":"https://api.github.com/users/tuxxy","html_url":"https://github.com/tuxxy","followers_url":"https://api.github.com/users/tuxxy/followers","following_url":"https://api.github.com/users/tuxxy/following{/other_user}","gists_url":"https://api.github.com/users/tuxxy/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxxy/subscriptions","organizations_url":"https://api.github.com/users/tuxxy/orgs","repos_url":"https://api.github.com/users/tuxxy/repos","events_url":"https://api.github.com/users/tuxxy/events{/privacy}","received_events_url":"https://api.github.com/users/tuxxy/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tuxxy/nucypher-kms","description":"Decentralized KMS","fork":true,"url":"https://api.github.com/repos/tuxxy/nucypher-kms","forks_url":"https://api.github.com/repos/tuxxy/nucypher-kms/forks","keys_url":"https://api.github.com/repos/tuxxy/nucypher-kms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tuxxy/nucypher-kms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tuxxy/nucypher-kms/teams","hooks_url":"https://api.github.com/repos/tuxxy/nucypher-kms/hooks","issue_events_url":"https://api.github.com/repos/tuxxy/nucypher-kms/issues/events{/number}","events_url":"https://api.github.com/repos/tuxxy/nucypher-kms/events","assignees_url":"https://api.github.com/repos/tuxxy/nucypher-kms/assignees{/user}","branches_url":"https://api.github.com/repos/tuxxy/nucypher-kms/branches{/branch}","tags_url":"https://api.github.com/repos/tuxxy/nucypher-kms/tags","blobs_url":"https://api.github.com/repos/tuxxy/nucypher-kms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tuxxy/nucypher-kms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tuxxy/nucypher-kms/git/refs{/sha}","trees_url":"https://api.github.com/repos/tuxxy/nucypher-kms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tuxxy/nucypher-kms/statuses/{sha}","languages_url":"https://api.github.com/repos/tuxxy/nucypher-kms/languages","stargazers_url":"https://api.github.com/repos/tuxxy/nucypher-kms/stargazers","contributors_url":"https://api.github.com/repos/tuxxy/nucypher-kms/contributors","subscribers_url":"https://api.github.com/repos/tuxxy/nucypher-kms/subscribers","subscription_url":"https://api.github.com/repos/tuxxy/nucypher-kms/subscription","commits_url":"https://api.github.com/repos/tuxxy/nucypher-kms/commits{/sha}","git_commits_url":"https://api.github.com/repos/tuxxy/nucypher-kms/git/commits{/sha}","comments_url":"https://api.github.com/repos/tuxxy/nucypher-kms/comments{/number}","issue_comment_url":"https://api.github.com/repos/tuxxy/nucypher-kms/issues/comments{/number}","contents_url":"https://api.github.com/repos/tuxxy/nucypher-kms/contents/{+path}","compare_url":"https://api.github.com/repos/tuxxy/nucypher-kms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tuxxy/nucypher-kms/merges","archive_url":"https://api.github.com/repos/tuxxy/nucypher-kms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tuxxy/nucypher-kms/downloads","issues_url":"https://api.github.com/repos/tuxxy/nucypher-kms/issues{/number}","pulls_url":"https://api.github.com/repos/tuxxy/nucypher-kms/pulls{/number}","milestones_url":"https://api.github.com/repos/tuxxy/nucypher-kms/milestones{/number}","notifications_url":"https://api.github.com/repos/tuxxy/nucypher-kms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tuxxy/nucypher-kms/labels{/name}","releases_url":"https://api.github.com/repos/tuxxy/nucypher-kms/releases{/id}","deployments_url":"https://api.github.com/repos/tuxxy/nucypher-kms/deployments","created_at":"2017-08-29T17:55:02Z","updated_at":"2018-11-12T17:27:13Z","pushed_at":"2018-11-19T23:44:55Z","git_url":"git://github.com/tuxxy/nucypher-kms.git","ssh_url":"git@github.com:tuxxy/nucypher-kms.git","clone_url":"https://github.com/tuxxy/nucypher-kms.git","svn_url":"https://github.com/tuxxy/nucypher-kms","homepage":null,"size":8668,"stargazers_count":1,"watchers_count":1,"language":"Python","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":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"nucypher:master","ref":"master","sha":"27438d80cd89c3961597cb203b52ef82bca60c06","user":{"login":"nucypher","id":24552990,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTUyOTkw","avatar_url":"https://avatars0.githubusercontent.com/u/24552990?v=4","gravatar_id":"","url":"https://api.github.com/users/nucypher","html_url":"https://github.com/nucypher","followers_url":"https://api.github.com/users/nucypher/followers","following_url":"https://api.github.com/users/nucypher/following{/other_user}","gists_url":"https://api.github.com/users/nucypher/gists{/gist_id}","starred_url":"https://api.github.com/users/nucypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nucypher/subscriptions","organizations_url":"https://api.github.com/users/nucypher/orgs","repos_url":"https://api.github.com/users/nucypher/repos","events_url":"https://api.github.com/users/nucypher/events{/privacy}","received_events_url":"https://api.github.com/users/nucypher/received_events","type":"Organization","site_admin":false},"repo":{"id":100446516,"node_id":"MDEwOlJlcG9zaXRvcnkxMDA0NDY1MTY=","name":"nucypher","full_name":"nucypher/nucypher","private":false,"owner":{"login":"nucypher","id":24552990,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTUyOTkw","avatar_url":"https://avatars0.githubusercontent.com/u/24552990?v=4","gravatar_id":"","url":"https://api.github.com/users/nucypher","html_url":"https://github.com/nucypher","followers_url":"https://api.github.com/users/nucypher/followers","following_url":"https://api.github.com/users/nucypher/following{/other_user}","gists_url":"https://api.github.com/users/nucypher/gists{/gist_id}","starred_url":"https://api.github.com/users/nucypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nucypher/subscriptions","organizations_url":"https://api.github.com/users/nucypher/orgs","repos_url":"https://api.github.com/users/nucypher/repos","events_url":"https://api.github.com/users/nucypher/events{/privacy}","received_events_url":"https://api.github.com/users/nucypher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nucypher/nucypher","description":"A proxy re-encryption network to empower privacy in decentralized systems.","fork":false,"url":"https://api.github.com/repos/nucypher/nucypher","forks_url":"https://api.github.com/repos/nucypher/nucypher/forks","keys_url":"https://api.github.com/repos/nucypher/nucypher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nucypher/nucypher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nucypher/nucypher/teams","hooks_url":"https://api.github.com/repos/nucypher/nucypher/hooks","issue_events_url":"https://api.github.com/repos/nucypher/nucypher/issues/events{/number}","events_url":"https://api.github.com/repos/nucypher/nucypher/events","assignees_url":"https://api.github.com/repos/nucypher/nucypher/assignees{/user}","branches_url":"https://api.github.com/repos/nucypher/nucypher/branches{/branch}","tags_url":"https://api.github.com/repos/nucypher/nucypher/tags","blobs_url":"https://api.github.com/repos/nucypher/nucypher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nucypher/nucypher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nucypher/nucypher/git/refs{/sha}","trees_url":"https://api.github.com/repos/nucypher/nucypher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nucypher/nucypher/statuses/{sha}","languages_url":"https://api.github.com/repos/nucypher/nucypher/languages","stargazers_url":"https://api.github.com/repos/nucypher/nucypher/stargazers","contributors_url":"https://api.github.com/repos/nucypher/nucypher/contributors","subscribers_url":"https://api.github.com/repos/nucypher/nucypher/subscribers","subscription_url":"https://api.github.com/repos/nucypher/nucypher/subscription","commits_url":"https://api.github.com/repos/nucypher/nucypher/commits{/sha}","git_commits_url":"https://api.github.com/repos/nucypher/nucypher/git/commits{/sha}","comments_url":"https://api.github.com/repos/nucypher/nucypher/comments{/number}","issue_comment_url":"https://api.github.com/repos/nucypher/nucypher/issues/comments{/number}","contents_url":"https://api.github.com/repos/nucypher/nucypher/contents/{+path}","compare_url":"https://api.github.com/repos/nucypher/nucypher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nucypher/nucypher/merges","archive_url":"https://api.github.com/repos/nucypher/nucypher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nucypher/nucypher/downloads","issues_url":"https://api.github.com/repos/nucypher/nucypher/issues{/number}","pulls_url":"https://api.github.com/repos/nucypher/nucypher/pulls{/number}","milestones_url":"https://api.github.com/repos/nucypher/nucypher/milestones{/number}","notifications_url":"https://api.github.com/repos/nucypher/nucypher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nucypher/nucypher/labels{/name}","releases_url":"https://api.github.com/repos/nucypher/nucypher/releases{/id}","deployments_url":"https://api.github.com/repos/nucypher/nucypher/deployments","created_at":"2017-08-16T04:07:25Z","updated_at":"2018-11-20T03:22:14Z","pushed_at":"2018-11-20T05:13:11Z","git_url":"git://github.com/nucypher/nucypher.git","ssh_url":"git@github.com:nucypher/nucypher.git","clone_url":"https://github.com/nucypher/nucypher.git","svn_url":"https://github.com/nucypher/nucypher","homepage":"https://nucypher.com","size":8562,"stargazers_count":123,"watchers_count":123,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"archived":false,"open_issues_count":90,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":33,"open_issues":90,"watchers":123,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/521"},"html":{"href":"https://github.com/nucypher/nucypher/pull/521"},"issue":{"href":"https://api.github.com/repos/nucypher/nucypher/issues/521"},"comments":{"href":"https://api.github.com/repos/nucypher/nucypher/issues/521/comments"},"review_comments":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/521/comments"},"review_comment":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/521/commits"},"statuses":{"href":"https://api.github.com/repos/nucypher/nucypher/statuses/db96bb13c0814e8320dcf82b02dc5cc10e5f87a2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tuxxy"}}