{ "info": { "author": "Dead Possum Labs (forked fromn Consensus)", "author_email": "info@consensys.net, d.soldatenko@dplabs.irish", "bugtrack_url": null, "classifiers": [], "description": "tl;dr\n==========\nThe original library from Consensus is quite useful, although it is obviously no longer supported. It's time to remove patches from Dockerfiles ^^\n\n\n\n\neth_rpc_api\n===========\n\nPython client for Ethereum using the JSON-RPC interface\n\n* complete: implements all 62 JSON-RPC methods plus several client-specific methods\n* provides a high-level interface to create contracts on the blockchain and to call contract methods\n\nImportant note\n--------------\n\nThe API is not yet stable, so please use caution when upgrading.\n\nInstallation\n------------\n\nYou may need additional libraries and tools before installing ethjsonrpc.\nIf you see something like that:\n\n.. code:: bash\n scrypt-1.2.1/libcperciva/crypto/crypto_aes.c:6:10: fatal error: openssl/aes.h: \u041d\u0435\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\n #include \n ^~~~~~~~~~~~~~~\n compilation terminated.\n error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n\n\nInstall libssl-dev packqage\n\n\n\nTo install eth_rpc_api:\n\n.. code:: bash\n\n $ pip3 install eth_rpc_api\n\n\nMake sure to have a node running an Ethereum client (such as geth) for the library to connect to.\n\nExample\n-------\n\n.. code:: python\n\n >>> from eth_rpc_api import EthJsonRpc # to use Parity-specific methods, import ParityEthJsonRpc\n >>> c = EthJsonRpc('127.0.0.1', 8545)\n >>> c.net_version()\n u'1'\n >>> c.web3_clientVersion()\n u'Geth/v1.3.3/linux/go1.5.1'\n >>> c.eth_gasPrice()\n 50000000000\n >>> c.eth_blockNumber()\n 828948\n >>> c = EthJsonRpc('127.0.0.1', 8545)\n >>> c.net_version()\n u'1'\n >>> c.web3_clientVersion()\n u'Geth/v1.3.3/linux/go1.5.1'\n >>> c.eth_gasPrice()\n 50000000000\n >>> c.eth_blockNumber()\n 828948\n\n\nHigh-level functionality\n------------------------\n\nThese examples assume the following simple Solidity contract:\n\n.. code::\n\n contract Example {\n\n string s;\n\n function set_s(string new_s) {\n s = new_s;\n }\n\n function get_s() returns (string) {\n return s;\n }\n }\n\n\nCompile it like this:\n\n.. code:: bash\n\n $ solc --binary stdout example.sol\n\n\nSetup\n`````\n\n.. code:: python\n\n >>> compiled = '606060405261020f806100136000396000f30060606040526000357c01000000000000000000000000000000000000000000000000000000009004806375d74f3914610044578063e7aab290146100bd57610042565b005b61004f600450610191565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156100af5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61010d6004803590602001906004018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050905061010f565b005b806000600050908051906020019082805482825590600052602060002090601f01602090048101928215610160579182015b8281111561015f578251826000505591602001919060010190610141565b5b50905061018b919061016d565b80821115610187576000818150600090555060010161016d565b5090565b50505b50565b60206040519081016040528060008152602001506000600050805480601f0160208091040260200160405190810160405280929190818152602001828054801561020057820191906000526020600020905b8154815290600101906020018083116101e357829003601f168201915b5050505050905061020c565b9056'\n >>> from eth_rpc_api import EthJsonRpc # to use Parity-specific methods, import ParityEthJsonRpc\n >>> c = EthJsonRpc('127.0.0.1', 8545)\n >>> from ethjsonrpc import EthJsonRpc # to use Parity-specific methods, import ParityEthJsonRpc\n >>> c = EthJsonRpc('127.0.0.1', 8545)\n\n\nCreating a contract on the blockchain\n`````````````````````````````````````\n\n.. code:: python\n\n >>> # continued from above\n >>> contract_tx = c.create_contract(c.eth_coinbase(), compiled, gas=300000)\n >>> # wait here for the contract to be created when a new block is mined\n >>> contract_addr = c.get_contract_address(contract_tx)\n >>> contract_addr\n u'0x24988147f2f2300450103d8c42c43182cf226857'\n\n\nCalling a contract function with a transaction (storing data)\n`````````````````````````````````````````````````````````````\n\n.. code:: python\n\n >>> # continued from above\n >>> tx = c.call_with_transaction(c.eth_coinbase(), contract_addr, 'set_s(string)', ['Hello, world'])\n >>> tx\n u'0x15bde63d79466e3db5169a913bb2069130ca387033d2ff2e29f4dfbef1bc6e0d'\n\n\nCalling a contract function on the local blockchain (reading data)\n``````````````````````````````````````````````````````````````````\n\n.. code:: python\n\n >>> # continued from above\n >>> results = c.call(contract_addr, 'get_s()', [], ['string'])\n >>> results\n ['Hello, world']\n\n\nAdditional examples\n-------------------\n\nPlease see ``test.py`` for additional examples.\n\nImplemented JSON-RPC methods\n----------------------------\n\n* web3_clientVersion\n* web3_sha3\n* net_version\n* net_listening\n* net_peerCount\n* eth_protocolVersion\n* eth_syncing\n* eth_coinbase\n* eth_mining\n* eth_hashrate\n* eth_gasPrice\n* eth_accounts\n* eth_blockNumber\n* eth_getBalance\n* eth_getStorageAt\n* eth_getTransactionCount\n* eth_getBlockTransactionCountByHash\n* eth_getBlockTransactionCountByNumber\n* eth_getUncleCountByBlockHash\n* eth_getUncleCountByBlockNumber\n* eth_getCode\n* eth_sign\n* eth_sendTransaction\n* eth_sendRawTransaction\n* eth_call\n* eth_estimateGas\n* eth_getBlockByHash\n* eth_getBlockByNumber\n* eth_getTransactionByHash\n* eth_getTransactionByBlockHashAndIndex\n* eth_getTransactionByBlockNumberAndIndex\n* eth_getTransactionReceipt\n* eth_getUncleByBlockHashAndIndex\n* eth_getUncleByBlockNumberAndIndex\n* eth_getCompilers\n* eth_compileSolidity\n* eth_compileLLL\n* eth_compileSerpent\n* eth_newFilter\n* eth_newBlockFilter\n* eth_newPendingTransactionFilter\n* eth_uninstallFilter\n* eth_getFilterChanges\n* eth_getFilterLogs\n* eth_getLogs\n* eth_getWork\n* eth_submitWork\n* eth_submitHashrate\n* db_putString\n* db_getString\n* db_putHex\n* db_getHex\n* shh_version\n* shh_post\n* shh_newIdentity\n* shh_hasIdentity\n* shh_newGroup\n* shh_addToGroup\n* shh_newFilter\n* shh_uninstallFilter\n* shh_getFilterChanges\n* shh_getMessages\n\nParity-only JSON-RPC methods\n----------------------------\n\nTo use these methods, make sure that you're\n\n* running Parity as your client\n* running with the ``--tracing on`` option\n* using this library's ``ParityEthJsonRpc`` client (not the vanilla ``EthJsonRpc`` client)\n\nMethods:\n\n* trace_filter\n* trace_get\n* trace_transaction\n* trace_block\n\nReference\n---------\n\n* https://github.com/ethereum/wiki/wiki/JSON-RPC\n* https://github.com/ethcore/parity/wiki/JSONRPC-trace-module", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sl4mmer/eth_rpc_api", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "eth-rpc-api", "package_url": "https://pypi.org/project/eth-rpc-api/", "platform": "", "project_url": "https://pypi.org/project/eth-rpc-api/", "project_urls": { "Homepage": "https://github.com/sl4mmer/eth_rpc_api" }, "release_url": "https://pypi.org/project/eth-rpc-api/0.3.10/", "requires_dist": null, "requires_python": "", "summary": "Ethereum JSON-RPC client", "version": "0.3.10" }, "last_serial": 4330653, "releases": { "0.3.10": [ { "comment_text": "", "digests": { "md5": "74013032d078862cc4a2448c9fe496d5", "sha256": "358790ab519cf93573e167ecc4ed4101ddae02bab3b4ec62b96a9d005885948a" }, "downloads": -1, "filename": "eth_rpc_api-0.3.10.tar.gz", "has_sig": false, "md5_digest": "74013032d078862cc4a2448c9fe496d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9849, "upload_time": "2018-10-01T23:14:56", "url": "https://files.pythonhosted.org/packages/68/f1/e90c59d96a5050cb0764b1602b42d34df0eeaddf9f347ae5faf4fabed8bd/eth_rpc_api-0.3.10.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "74013032d078862cc4a2448c9fe496d5", "sha256": "358790ab519cf93573e167ecc4ed4101ddae02bab3b4ec62b96a9d005885948a" }, "downloads": -1, "filename": "eth_rpc_api-0.3.10.tar.gz", "has_sig": false, "md5_digest": "74013032d078862cc4a2448c9fe496d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9849, "upload_time": "2018-10-01T23:14:56", "url": "https://files.pythonhosted.org/packages/68/f1/e90c59d96a5050cb0764b1602b42d34df0eeaddf9f347ae5faf4fabed8bd/eth_rpc_api-0.3.10.tar.gz" } ] }