{"action":"created","comment":{"url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/comments/83899344","pull_request_review_id":4712189,"id":83899344,"diff_hunk":"@@ -11,29 +11,31 @@\n \n requirements = [\n     'Click>=6.0',\n-    # TODO: put package requirements here\n+    'bigchaindb-common>=0.0.3',\n+    'graphviz'\n+]\n+\n+dev_requirements = [\n+    'ipdb',\n ]\n \n test_requirements = [\n-    # TODO: put package test requirements here\n ]\n \n setup(\n     name='bdb_transaction_cli',\n     version='0.1.0',\n-    description=\"A minimal command line tool for create and sign BigchainDB transactions.\",\n+    description=(\"A minimal command line tool for create and sign \"\n+                 \"BigchainDB transactions.\"),\n     long_description=readme + '\\n\\n' + history,\n     author=\"BigchainDB GmbH\",\n     author_email='dev@bigchaindb.com',\n-    url='https://github.com/wrigley/bdb_transaction_cli',\n-    packages=[\n-        'bdb_transaction_cli',\n-    ],\n-    package_dir={'bdb_transaction_cli':\n-                 'bdb_transaction_cli'},\n+    url='https://github.com/bigchaindb/bdb-transaction-cli',\n+    packages=['bdb_transaction_cli'],\n+    package_dir={'bdb_transaction_cli': 'bdb_transaction_cli'},\n     entry_points={\n         'console_scripts': [\n-            'bdb_transaction_cli=bdb_transaction_cli.cli:main'\n+            'bdb=bdb_transaction_cli.__main__:main'","path":"setup.py","position":38,"original_position":38,"commit_id":"e6fbd340134046afeaa88fc328b9618401021119","original_commit_id":"e6fbd340134046afeaa88fc328b9618401021119","user":{"login":"sohkai","id":4166642,"avatar_url":"https://avatars.githubusercontent.com/u/4166642?v=3","gravatar_id":"","url":"https://api.github.com/users/sohkai","html_url":"https://github.com/sohkai","followers_url":"https://api.github.com/users/sohkai/followers","following_url":"https://api.github.com/users/sohkai/following{/other_user}","gists_url":"https://api.github.com/users/sohkai/gists{/gist_id}","starred_url":"https://api.github.com/users/sohkai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sohkai/subscriptions","organizations_url":"https://api.github.com/users/sohkai/orgs","repos_url":"https://api.github.com/users/sohkai/repos","events_url":"https://api.github.com/users/sohkai/events{/privacy}","received_events_url":"https://api.github.com/users/sohkai/received_events","type":"User","site_admin":false},"body":"Does this work? The `__main__` module doesn't have a `main()` defined so does setup.py use the imported `main()`?","created_at":"2016-10-18T16:49:06Z","updated_at":"2016-10-18T16:49:06Z","html_url":"https://github.com/bigchaindb/bdb-transaction-cli/pull/1#discussion_r83899344","pull_request_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/comments/83899344"},"html":{"href":"https://github.com/bigchaindb/bdb-transaction-cli/pull/1#discussion_r83899344"},"pull_request":{"href":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/1","id":88678114,"html_url":"https://github.com/bigchaindb/bdb-transaction-cli/pull/1","diff_url":"https://github.com/bigchaindb/bdb-transaction-cli/pull/1.diff","patch_url":"https://github.com/bigchaindb/bdb-transaction-cli/pull/1.patch","issue_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/issues/1","number":1,"state":"open","locked":false,"title":"Initial interface design","user":{"login":"TimDaub","id":2758453,"avatar_url":"https://avatars.githubusercontent.com/u/2758453?v=3","gravatar_id":"","url":"https://api.github.com/users/TimDaub","html_url":"https://github.com/TimDaub","followers_url":"https://api.github.com/users/TimDaub/followers","following_url":"https://api.github.com/users/TimDaub/following{/other_user}","gists_url":"https://api.github.com/users/TimDaub/gists{/gist_id}","starred_url":"https://api.github.com/users/TimDaub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimDaub/subscriptions","organizations_url":"https://api.github.com/users/TimDaub/orgs","repos_url":"https://api.github.com/users/TimDaub/repos","events_url":"https://api.github.com/users/TimDaub/events{/privacy}","received_events_url":"https://api.github.com/users/TimDaub/received_events","type":"User","site_admin":false},"body":"This was part of a first effort to make it possible for users of BigchainDB to create and sign transactions independently from the programming language they'd like to use.\r\n\r\nThe motivation of existence behind this tool was outlined by me in the following two comments:\r\n\r\n- https://github.com/bigchaindb/bigchaindb/pull/639#issuecomment-249884478\r\n- https://github.com/bigchaindb/bigchaindb-common/issues/12#issuecomment-251665325\r\n\r\nTL;DR:\r\n\r\nThe idea is to have a command line tool that allows to write simple wrappers in the user's programming language of choice. I was inspired by bitpay's bitcoin-rpc lib: https://github.com/bitpay/bitcoind-rpc/blob/master/lib/index.js\r\n\r\nWith this PR, I've been mainly following the API that is provided by [BDB-C](https://github.com/bigchaindb/bigchaindb-common). Specifically the following methods are of interest:\r\n\r\n- [Condition.generate](https://github.com/bigchaindb/bigchaindb-common/blob/master/bigchaindb_common/transaction.py#L147)\r\n- [Transaction.create](https://github.com/bigchaindb/bigchaindb-common/blob/master/bigchaindb_common/transaction.py#L308)\r\n- [Transaction.transfer](https://github.com/bigchaindb/bigchaindb-common/blob/master/bigchaindb_common/transaction.py#L360)\r\n- [Transaction.sign](https://github.com/bigchaindb/bigchaindb-common/blob/master/bigchaindb_common/transaction.py#L435)\r\n\r\n\r\n**What has been done:**\r\n\r\n- [x] Private and public keys can be generated using `$ bdb generate keys`\r\n- [x] A `CREATE` transaction can be generated using `$ bdb generate create`\r\n- [x] Any Ed25519 or ThresholdSha256 Condition can be fulfilled (signed) using `$ bdb sign`\r\n- [x] Any transactions' conditions can be transformed to \"inputs\" (for using them in a new transaction) using `$ bdb spend`\r\n\r\n\r\n**What is left to be done:**\r\n\r\n(https://docs.bigchaindb.com/projects/server/en/latest/drivers-clients/python-server-api-examples.html) and [here](https://docs.bigchaindb.com/projects/py-driver/en/latest/usage.html)\r\n- [x] Tests for everything (We should aim for 100% code coverage, CI using Travis, ...)\r\n- [x] Resolve all outstanding `TODO`s and `FIXME`s in the code\r\n- [x] Refactor the `$ bdb generate create` command such that it takes an arbitrary amount of JSON conditions instead of the current `owner_after` argument\r\n- [x] Implement the command `$ bdb generate transfer` that takes inputs taken from `bdb spend`, as well as an arbitrary amount of JSON conditions (Note: that the command requires two [unlimited variadic arguments](http://click.pocoo.org/5/arguments/#variadic-arguments) which might be tricky to achieve)\r\n- [x] Review cli method names (create/generate_tx, sign, etc)\r\n- [x] Review cli api for security (should private keys be in argv really?)\r\n\r\n**Make tickets for:**\r\n\r\n- [ ] Documentation by \"real-life\" examples, similar to [here]\r\n- [ ] Integration tests (@sbellem should probably be consulted before doing that)\r\n- [ ] Write a guideline how developers can use this to easily implement wrappers for the programming language of their choice\r\n- [ ] Support all cryptoconditions BigchainDB currently supports\r\n- [ ] Use [pyinstaller](http://www.pyinstaller.org/) to automatically create an executable (and if possible automatically deploy that to OS-package-manager-repositories)\r\n\r\nObviously all the TODOs mentioned here do not have to be handled in this PR, but instead tickets can be created to enable iterative development.","created_at":"2016-10-10T14:59:06Z","updated_at":"2016-10-18T16:49:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bbbc9befacc496f17d84d96fb8b7e9568b7b45f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/1/commits","review_comments_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/1/comments","review_comment_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/issues/1/comments","statuses_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/statuses/e6fbd340134046afeaa88fc328b9618401021119","head":{"label":"bigchaindb:initial-interface-design","ref":"initial-interface-design","sha":"e6fbd340134046afeaa88fc328b9618401021119","user":{"login":"bigchaindb","id":17097586,"avatar_url":"https://avatars.githubusercontent.com/u/17097586?v=3","gravatar_id":"","url":"https://api.github.com/users/bigchaindb","html_url":"https://github.com/bigchaindb","followers_url":"https://api.github.com/users/bigchaindb/followers","following_url":"https://api.github.com/users/bigchaindb/following{/other_user}","gists_url":"https://api.github.com/users/bigchaindb/gists{/gist_id}","starred_url":"https://api.github.com/users/bigchaindb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigchaindb/subscriptions","organizations_url":"https://api.github.com/users/bigchaindb/orgs","repos_url":"https://api.github.com/users/bigchaindb/repos","events_url":"https://api.github.com/users/bigchaindb/events{/privacy}","received_events_url":"https://api.github.com/users/bigchaindb/received_events","type":"Organization","site_admin":false},"repo":{"id":70496704,"name":"bdb-transaction-cli","full_name":"bigchaindb/bdb-transaction-cli","owner":{"login":"bigchaindb","id":17097586,"avatar_url":"https://avatars.githubusercontent.com/u/17097586?v=3","gravatar_id":"","url":"https://api.github.com/users/bigchaindb","html_url":"https://github.com/bigchaindb","followers_url":"https://api.github.com/users/bigchaindb/followers","following_url":"https://api.github.com/users/bigchaindb/following{/other_user}","gists_url":"https://api.github.com/users/bigchaindb/gists{/gist_id}","starred_url":"https://api.github.com/users/bigchaindb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigchaindb/subscriptions","organizations_url":"https://api.github.com/users/bigchaindb/orgs","repos_url":"https://api.github.com/users/bigchaindb/repos","events_url":"https://api.github.com/users/bigchaindb/events{/privacy}","received_events_url":"https://api.github.com/users/bigchaindb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bigchaindb/bdb-transaction-cli","description":"A command line tool to create and sign transactions for BigchainDB","fork":false,"url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli","forks_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/forks","keys_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/teams","hooks_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/hooks","issue_events_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/issues/events{/number}","events_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/events","assignees_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/assignees{/user}","branches_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/branches{/branch}","tags_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/tags","blobs_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/languages","stargazers_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/stargazers","contributors_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/contributors","subscribers_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/subscribers","subscription_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/subscription","commits_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/contents/{+path}","compare_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/merges","archive_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/downloads","issues_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/issues{/number}","pulls_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/labels{/name}","releases_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/releases{/id}","deployments_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/deployments","created_at":"2016-10-10T14:34:16Z","updated_at":"2016-10-13T08:03:05Z","pushed_at":"2016-10-18T15:06:37Z","git_url":"git://github.com/bigchaindb/bdb-transaction-cli.git","ssh_url":"git@github.com:bigchaindb/bdb-transaction-cli.git","clone_url":"https://github.com/bigchaindb/bdb-transaction-cli.git","svn_url":"https://github.com/bigchaindb/bdb-transaction-cli","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"bigchaindb:master","ref":"master","sha":"bd782209414ab64c08fc4fe1247dd291b70ad766","user":{"login":"bigchaindb","id":17097586,"avatar_url":"https://avatars.githubusercontent.com/u/17097586?v=3","gravatar_id":"","url":"https://api.github.com/users/bigchaindb","html_url":"https://github.com/bigchaindb","followers_url":"https://api.github.com/users/bigchaindb/followers","following_url":"https://api.github.com/users/bigchaindb/following{/other_user}","gists_url":"https://api.github.com/users/bigchaindb/gists{/gist_id}","starred_url":"https://api.github.com/users/bigchaindb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigchaindb/subscriptions","organizations_url":"https://api.github.com/users/bigchaindb/orgs","repos_url":"https://api.github.com/users/bigchaindb/repos","events_url":"https://api.github.com/users/bigchaindb/events{/privacy}","received_events_url":"https://api.github.com/users/bigchaindb/received_events","type":"Organization","site_admin":false},"repo":{"id":70496704,"name":"bdb-transaction-cli","full_name":"bigchaindb/bdb-transaction-cli","owner":{"login":"bigchaindb","id":17097586,"avatar_url":"https://avatars.githubusercontent.com/u/17097586?v=3","gravatar_id":"","url":"https://api.github.com/users/bigchaindb","html_url":"https://github.com/bigchaindb","followers_url":"https://api.github.com/users/bigchaindb/followers","following_url":"https://api.github.com/users/bigchaindb/following{/other_user}","gists_url":"https://api.github.com/users/bigchaindb/gists{/gist_id}","starred_url":"https://api.github.com/users/bigchaindb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigchaindb/subscriptions","organizations_url":"https://api.github.com/users/bigchaindb/orgs","repos_url":"https://api.github.com/users/bigchaindb/repos","events_url":"https://api.github.com/users/bigchaindb/events{/privacy}","received_events_url":"https://api.github.com/users/bigchaindb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bigchaindb/bdb-transaction-cli","description":"A command line tool to create and sign transactions for BigchainDB","fork":false,"url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli","forks_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/forks","keys_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/teams","hooks_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/hooks","issue_events_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/issues/events{/number}","events_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/events","assignees_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/assignees{/user}","branches_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/branches{/branch}","tags_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/tags","blobs_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/languages","stargazers_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/stargazers","contributors_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/contributors","subscribers_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/subscribers","subscription_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/subscription","commits_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/contents/{+path}","compare_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/merges","archive_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/downloads","issues_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/issues{/number}","pulls_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/labels{/name}","releases_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/releases{/id}","deployments_url":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/deployments","created_at":"2016-10-10T14:34:16Z","updated_at":"2016-10-13T08:03:05Z","pushed_at":"2016-10-18T15:06:37Z","git_url":"git://github.com/bigchaindb/bdb-transaction-cli.git","ssh_url":"git@github.com:bigchaindb/bdb-transaction-cli.git","clone_url":"https://github.com/bigchaindb/bdb-transaction-cli.git","svn_url":"https://github.com/bigchaindb/bdb-transaction-cli","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/1"},"html":{"href":"https://github.com/bigchaindb/bdb-transaction-cli/pull/1"},"issue":{"href":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/issues/1"},"comments":{"href":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/bigchaindb/bdb-transaction-cli/statuses/e6fbd340134046afeaa88fc328b9618401021119"}}}}
{"actor":{"display_login":"sohkai"}}