{ "info": { "author": "Levente Pap", "author_email": "levente.pap@iota.org", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "ccurl.interface.py\n==================\n\nA python interface to load `Ccurl\nlibrary `__ and perform proof of\nwork locally, without relying on a node. To be used together with\n`PyOTA `__, the Python Client\nLibrary for IOTA. For more info, `read the\ndocs `__.\n\nMotivation\n----------\n\nCurrently, PyOTA doesn't support performing proof of work locally. The\n``attach_to_tangle`` API command sends the prepared transaction trytes\nto an IOTA node, that does the PoW by filling out\n``attachment_timestamp*`` fields and calculating ``nonce`` with Curl\nP-81. In case of bundles, transactions are chained together through\ntheir ``transaction hash``.\n\nInstallation\n------------\n\nTo use the module, follow the steps: - Clone the repo from GitHub:\n\n``$ git clone https://github.com/iotaledger/ccurl.interface.py.git``\n\n- Make sure you have `cmake `__ available on your\n system. This is a build dependecy for the ccurl library.\n- Build ccurl according to `build\n instructions `__\n and put the ``.so`` library into the ``src`` folder, or run the\n ``init`` script in the main folder to build and initialize:\n\n``$ ./init.sh``\n\n- Create a vitual environment / activate the one you use for PyOTA.\n- Install th python package from source by running:\n\n``$ pip install -e .``\n\nHow to use?\n-----------\n\nOnce installed, you can use the module to replace ``attach_to_tangle``\ncore api call in PyOTA. Just import the ``ccurl_interface`` module from\nthe ``pow`` package and you are good to go.\n\nAn example code below illustrates how to do PoW for a bundle consisting\nof two transactions.\n\nCode Example\n------------\n\n::\n\n import iota\n from pprint import pprint\n from pow import ccurl_interface\n\n # Generate seed\n myseed = iota.crypto.types.Seed.random()\n\n # Generate two addresses\n addres_generator = iota.crypto.addresses.AddressGenerator(myseed)\n addys = addres_generator.get_addresses(1, count=2)\n\n # Preparing transactions\n pt = iota.ProposedTransaction(address = iota.Address(addys[0]),\n tag = iota.Tag(b'LOCALATTACHINTERFACE99999'),\n value = 0)\n\n pt2 = iota.ProposedTransaction(address = iota.Address(addys[1]),\n tag = iota.Tag(b'LOCALATTACHINTERFACE99999'),\n value = 0)\n\n # Preparing bundle that consists of both transactions prepared in the previous example\n pb = iota.ProposedBundle(transactions=[pt2,pt])\n\n # Generate bundle hash\n pb.finalize()\n\n # Declare an api instance\n api = iota.Iota(\"https://nodes.thetangle.org:443\")\n\n # Get tips to be approved by your bundle\n gta = api.get_transactions_to_approve(depth=3)\n\n minimum_weight_magnitude = 14 # target is mainnet\n\n # perform PoW locally\n bundle_trytes =\\\n ccurl_interface.attach_to_tangle(\n pb.as_tryte_strings(),\n gta['trunkTransaction'],\n gta['branchTransaction'],\n mwm\n )\n\n # Broadcast transactions on the Tangle\n broadcasted = api.broadcast_and_store(bundle_trytes)\n\n bundle_broadcasted =iota.Bundle.from_tryte_strings(broadcasted['trytes'])\n\n pprint('Local pow broadcasted transactions are:')\n pprint(bundle_broadcasted.as_json_compatible())\n\nTests\n-----\n\nRun ``nosetests`` to test in current environment.\nRun ``tox -v -p all`` to test in Python 2.7, 3.5, 3.6 and 3.8.\n\nContribute\n----------\n\nRaise issues:\nhttps://github.com/iotaledger/ccurl.interface.py/issues\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/iotaledger/ccurl.interface.py", "keywords": "iota,tangle,iot,internet of things,api,library,cryptocurrency,balanced ternary", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "PyOTA-PoW", "package_url": "https://pypi.org/project/PyOTA-PoW/", "platform": "", "project_url": "https://pypi.org/project/PyOTA-PoW/", "project_urls": { "Homepage": "https://github.com/iotaledger/ccurl.interface.py" }, "release_url": "https://pypi.org/project/PyOTA-PoW/1.1.0/", "requires_dist": [ "pyota" ], "requires_python": "", "summary": "Ccurl PoW Interface for PyOTA", "version": "1.1.0", "yanked": false, "yanked_reason": null }, "last_serial": 6936366, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "107b945a5e9436df739747a4787fe88a", "sha256": "85706d450c2a7ba09b585f048f828eeb5be3b2b99674b383855601a5d1f66874" }, "downloads": -1, "filename": "PyOTA_PoW-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "107b945a5e9436df739747a4787fe88a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36482, "upload_time": "2019-10-14T10:07:58", "upload_time_iso_8601": "2019-10-14T10:07:58.421527Z", "url": "https://files.pythonhosted.org/packages/84/7d/8a3082656fe73f185e0865f4386219bfe334b06e0fc22e524908023fc7af/PyOTA_PoW-1.0.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "fb217ef32df9ec1a2127e16405191788", "sha256": "11594c8849c2f880157084c17f0d97f632a214516d5ef29a803e2fd6b9df1c95" }, "downloads": -1, "filename": "PyOTA-PoW-1.0.0.tar.gz", "has_sig": false, "md5_digest": "fb217ef32df9ec1a2127e16405191788", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37631, "upload_time": "2019-10-14T10:08:00", "upload_time_iso_8601": "2019-10-14T10:08:00.986782Z", "url": "https://files.pythonhosted.org/packages/d9/5a/2718f8f7d131cbe2f568a9da4578b57ba281fb74acfb1f5973d1cb4c0e85/PyOTA-PoW-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "c59661f8ebb169d20ceacea7efec7691", "sha256": "32dcbf8543d6576f8917a9c8f778a9ed109188651a049a854d42446f759b7b97" }, "downloads": -1, "filename": "PyOTA_PoW-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c59661f8ebb169d20ceacea7efec7691", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36479, "upload_time": "2019-10-14T10:55:03", "upload_time_iso_8601": "2019-10-14T10:55:03.940805Z", "url": "https://files.pythonhosted.org/packages/9c/6c/32275c7bab0c3d984815e7dfe2f34dd63d7987715aeab651655261390eed/PyOTA_PoW-1.0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "90011c71ed1b46c296c2e330598eba89", "sha256": "5668e1b1d1986aef707ccc6c54f64086ff02736093887bb4ef761c89f681f68a" }, "downloads": -1, "filename": "PyOTA-PoW-1.0.1.tar.gz", "has_sig": false, "md5_digest": "90011c71ed1b46c296c2e330598eba89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37621, "upload_time": "2019-10-14T10:55:06", "upload_time_iso_8601": "2019-10-14T10:55:06.002713Z", "url": "https://files.pythonhosted.org/packages/b7/1f/65f6a9c22c312ff6e627efc1a42c659275addd22250d89220360928045a1/PyOTA-PoW-1.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "4393fa1f6f91d647715270ee8ca47550", "sha256": "0e40e6565996dcc25bcd0fcc29a41fbf2d43653c76dcc495a14ef6b895cfb75a" }, "downloads": -1, "filename": "PyOTA_PoW-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "4393fa1f6f91d647715270ee8ca47550", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 35284, "upload_time": "2019-10-21T09:15:57", "upload_time_iso_8601": "2019-10-21T09:15:57.783601Z", "url": "https://files.pythonhosted.org/packages/a9/90/3eb0f916e45189e4533cf9a89238d890f40695e769dbe6be8fca1cb073f8/PyOTA_PoW-1.0.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "96d171bd5444079a234ab577cb13be7a", "sha256": "d7a540f2ee2acc7a7375a19f8521a37eec6c3c9b3ccad396b975d2e51350bd82" }, "downloads": -1, "filename": "PyOTA-PoW-1.0.2.tar.gz", "has_sig": false, "md5_digest": "96d171bd5444079a234ab577cb13be7a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37536, "upload_time": "2019-10-21T09:15:59", "upload_time_iso_8601": "2019-10-21T09:15:59.650788Z", "url": "https://files.pythonhosted.org/packages/c6/3f/1a324ea01cb0cc88f9045b8c5c14c5b40cbaa72dbe8a1e120dddd6386b31/PyOTA-PoW-1.0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "2d121ed9795dcc63b6759124bd372b19", "sha256": "40b5f373cf5d8a6f1470214a5109ac3159a6d6a4001464812ef7715e4f02171d" }, "downloads": -1, "filename": "PyOTA_PoW-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2d121ed9795dcc63b6759124bd372b19", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 35399, "upload_time": "2019-11-05T16:10:31", "upload_time_iso_8601": "2019-11-05T16:10:31.786595Z", "url": "https://files.pythonhosted.org/packages/52/15/8c5bd85239f4830ad031a1ad2890a371bb8430679f618eb84dcec0ac7b12/PyOTA_PoW-1.1.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "a6c3dedd2ca0a8880634e958d69a60ae", "sha256": "3c4c4f8aaa47bf5d86f7ec2b3f17a06e8ff3e97b2932219da29818bc9aafba39" }, "downloads": -1, "filename": "PyOTA-PoW-1.1.0.tar.gz", "has_sig": false, "md5_digest": "a6c3dedd2ca0a8880634e958d69a60ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41685, "upload_time": "2019-11-05T16:10:32", "upload_time_iso_8601": "2019-11-05T16:10:32.873861Z", "url": "https://files.pythonhosted.org/packages/b3/b8/b4678b80a96b8fba181f1305938ed2d9329cbd747f251dc6c016fb2d4777/PyOTA-PoW-1.1.0.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2d121ed9795dcc63b6759124bd372b19", "sha256": "40b5f373cf5d8a6f1470214a5109ac3159a6d6a4001464812ef7715e4f02171d" }, "downloads": -1, "filename": "PyOTA_PoW-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2d121ed9795dcc63b6759124bd372b19", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 35399, "upload_time": "2019-11-05T16:10:31", "upload_time_iso_8601": "2019-11-05T16:10:31.786595Z", "url": "https://files.pythonhosted.org/packages/52/15/8c5bd85239f4830ad031a1ad2890a371bb8430679f618eb84dcec0ac7b12/PyOTA_PoW-1.1.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "a6c3dedd2ca0a8880634e958d69a60ae", "sha256": "3c4c4f8aaa47bf5d86f7ec2b3f17a06e8ff3e97b2932219da29818bc9aafba39" }, "downloads": -1, "filename": "PyOTA-PoW-1.1.0.tar.gz", "has_sig": false, "md5_digest": "a6c3dedd2ca0a8880634e958d69a60ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41685, "upload_time": "2019-11-05T16:10:32", "upload_time_iso_8601": "2019-11-05T16:10:32.873861Z", "url": "https://files.pythonhosted.org/packages/b3/b8/b4678b80a96b8fba181f1305938ed2d9329cbd747f251dc6c016fb2d4777/PyOTA-PoW-1.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }