forked from newjava1/vision-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
34 lines (28 loc) · 2.67 KB
/
setup.py
File metadata and controls
34 lines (28 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- coding: utf-8 -*-
from setuptools import setup
packages = \
['visionpy', 'visionpy.keys', 'visionpy.providers']
package_data = \
{'': ['*']}
install_requires = \
['base58>=2.0.0,<3.0.0',
'ecdsa>=0.15',
'eth_abi>=2.1.1,<3.0.0',
'httpx>=0.16.1',
'pycryptodome>=3.9.7,<4.0.0']
setup_kwargs = {
'name': 'visionpy',
'version': '0.0.4',
'description': 'Vision Python client library',
'long_description': '# vision-python-sdk (visionpy)\n[](https://badge.fury.io/py/visionpy)\n\nVision Python Client Library.\n\n## Features\n1. Get Block, Transaction, TransactionInfo, Node;\n2. Build and transfer VS, VRC10, VRC20;\n3. Parse event logs of TransactionInfo;\n4. Decode contract function inputs;\n5. Asyncio support;\n6. Python 3.7.2 and late version required;\n7. Poetry for package management.\n\n## How to use\nMore examples please check `example` folder.\n```python\nfrom visionpy import Vision\nfrom visionpy.keys import PrivateKey\n\n\n# Private key of VDGXn73Qgf6V1aGbm8eigoHyPJRJpALN9F\npriv_key = PrivateKey(bytes.fromhex("eed06aebdef88683ff5678b353d1281bb2b730113c9283f7ea96600a0d2c104f"))\ndef transfer():\n client = Vision(network=\'vpioneer\')\n txn_ret = (\n client.vs.transfer("VTCYvEK2ZuWvZ5LXqrLpU2GoRkFeJ1NrD2", "VSfD1o6FPChqdqLgwJaztjckyyo2GSM1KP", 1_000)\n .memo("test memo")\n .build()\n .inspect()\n .sign(priv_key)\n .broadcast()\n )\n print(txn_ret)\n print(txn_ret.result())\n```\n\n#### Async Client\n\n```python\nimport asyncio\n\nfrom visionpy import AsyncVision\nfrom visionpy.keys import PrivateKey\n\n# private key of VTCYvEK2ZuWvZ5LXqrLpU2GoRkFeJ1NrD2\npriv_key = PrivateKey(bytes.fromhex("eed06aebdef88683ff5678b353d1281bb2b730113c9283f7ea96600a0d2c104f"))\n\nasync def transfer():\n async with AsyncVision(network=\'vpioneer\') as client:\n print(client)\n\n txb = (\n client.trx.transfer("VTCYvEK2ZuWvZ5LXqrLpU2GoRkFeJ1NrD2", "VSfD1o6FPChqdqLgwJaztjckyyo2GSM1KP", 1_000)\n .memo("test memo")\n .fee_limit(100_000_000)\n )\n txn = await txb.build()\n print(txn)\n txn_ret = await txn.sign(priv_key).broadcast()\n print(txn_ret)\n print(await txn_ret.wait())\n\nif __name__ == \'__main__\':\n asyncio.run(transfer())\n```',
'author': 'mio',
'author_email': 'liurusi.101@gmail.com',
'maintainer': None,
'maintainer_email': None,
'url': 'https://github.com/vision-consensus/vision-python-sdk',
'packages': packages,
'package_data': package_data,
'install_requires': install_requires,
'python_requires': '>3.7.1,<4.0',
}
setup(**setup_kwargs)