{ "info": { "author": "hukkinj1", "author_email": "hukkinj1@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed" ], "description": "[![Build Status](https://travis-ci.com/hukkinj1/cosmospy.svg?branch=master)](https://travis-ci.com/hukkinj1/cosmospy)\n[![codecov.io](https://codecov.io/gh/hukkinj1/cosmospy/branch/master/graph/badge.svg)](https://codecov.io/gh/hukkinj1/cosmospy)\n[![PyPI version](https://badge.fury.io/py/cosmospy.svg)](https://badge.fury.io/py/cosmospy)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)\n# cosmospy\n\n\n> Version 2.0.0\n\n> Tools for Cosmos wallet management and offline transaction signing\n\n## Requirements\n```bash\napt-get install libsecp256k1-dev\n```\n\n## Installing\nInstalling from PyPI repository (https://pypi.org/project/cosmospy):\n```bash\npip install cosmospy\n```\n\n## Usage\n\n### Generating a wallet\n```python\nfrom cosmospy.addresses import generate_wallet\nwallet = generate_wallet()\n```\nThe value assigned to `wallet` will be a dictionary just like:\n```python\n{\n 'private_key': '6dcd05d7ac71e09d3cf7da666709ebd59362486ff9e99db0e8bc663570515afa',\n 'public_key': '03e8005aad74da5a053602f86e3151d4f3214937863a11299c960c28d3609c4775',\n 'address': 'cosmos1jkc7hv9j92gj7r6sqq0l630lv4kqyac7t2dj2t'\n}\n ```\n\n### Signing transactions\n```python\nfrom cosmospy.transactions import Transaction\ntx = Transaction(\n privkey=\"26d167d549a4b2b66f766b0d3f2bdbe1cd92708818c338ff453abde316a2bd59\",\n account_num=11335,\n sequence=0,\n fee=1000,\n gas=37000,\n memo=\"\",\n chain_id=\"cosmoshub-2\",\n sync_mode=\"sync\",\n)\ntx.add_atom_transfer(recipient=\"cosmos103l758ps7403sd9c0y8j6hrfw4xyl70j4mmwkf\", amount=387000)\npushable_tx = tx.get_pushable_tx()\n```\nThe value assigned to `pushable_tx` will be a signed transaction in the form of a JSON string. The string can be used as request body when calling the `POST /txs` endpoint of the Cosmos REST API.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hukkinj1/cosmospy", "keywords": "cosmos blockchain atom cryptocurrency", "license": "", "maintainer": "", "maintainer_email": "", "name": "cosmospy", "package_url": "https://pypi.org/project/cosmospy/", "platform": "", "project_url": "https://pypi.org/project/cosmospy/", "project_urls": { "Homepage": "https://github.com/hukkinj1/cosmospy" }, "release_url": "https://pypi.org/project/cosmospy/2.0.0/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Tools for Cosmos wallet management and offline transaction signing", "version": "2.0.0" }, "last_serial": 5393662, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "98123fdff306b164c82d5d7f258f3340", "sha256": "354ffa2d63856a835f048f8534c55d0388e422a7dc0f9ed118a99c8364cfcf62" }, "downloads": -1, "filename": "cosmospy-0.0.0.tar.gz", "has_sig": false, "md5_digest": "98123fdff306b164c82d5d7f258f3340", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1373, "upload_time": "2019-06-06T19:28:28", "url": "https://files.pythonhosted.org/packages/9a/43/f40986ef24c5244b344666e25a6618430582f4f3799c800cd328d3aadb8b/cosmospy-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "5e8bbc8c52fabfb15faab3d79463012b", "sha256": "8034b300db7d429315360075f1645ff2c19ceaa13124eab414afb02c57675540" }, "downloads": -1, "filename": "cosmospy-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5e8bbc8c52fabfb15faab3d79463012b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 2934, "upload_time": "2019-06-08T14:36:30", "url": "https://files.pythonhosted.org/packages/9c/8f/0b6e6f8ee01d825a74792d0f69cb2a61ee701aa5fb3617c04ae1904b6310/cosmospy-0.0.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "9e4630eb02bf3fd8cb0fe0c205db9330", "sha256": "ccc22cbe69f2ddbf7a5909fcb3fe0d8cd8a67f760518466780c3230b78244fab" }, "downloads": -1, "filename": "cosmospy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "9e4630eb02bf3fd8cb0fe0c205db9330", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3732, "upload_time": "2019-06-10T19:27:13", "url": "https://files.pythonhosted.org/packages/5d/58/d6d3c047e37dbc3a3695dcd905093f70525bb28ace67f740e8f6d2bf7ffe/cosmospy-1.0.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "a7eb7e43189d9f83012b5f0701125d09", "sha256": "c8be7da00fc60d6c7a1c03dab87080a69bdcb258333cab34de558b8d76e122b5" }, "downloads": -1, "filename": "cosmospy-2.0.0.tar.gz", "has_sig": false, "md5_digest": "a7eb7e43189d9f83012b5f0701125d09", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3902, "upload_time": "2019-06-13T00:31:27", "url": "https://files.pythonhosted.org/packages/e6/02/1a70b55e855e30424f698fc2fa351b4b4e036cbb97b4ce49b209abab71cd/cosmospy-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a7eb7e43189d9f83012b5f0701125d09", "sha256": "c8be7da00fc60d6c7a1c03dab87080a69bdcb258333cab34de558b8d76e122b5" }, "downloads": -1, "filename": "cosmospy-2.0.0.tar.gz", "has_sig": false, "md5_digest": "a7eb7e43189d9f83012b5f0701125d09", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3902, "upload_time": "2019-06-13T00:31:27", "url": "https://files.pythonhosted.org/packages/e6/02/1a70b55e855e30424f698fc2fa351b4b4e036cbb97b4ce49b209abab71cd/cosmospy-2.0.0.tar.gz" } ] }