Name | jito-py JSON |
Version |
0.1.3
JSON |
| download |
home_page | None |
Summary | A Python library for interacting with the Jito JSON-RPC |
upload_time | 2024-12-30 07:34:03 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6 |
license | MIT |
keywords |
jito
solana
json-rpc
|
VCS |
 |
bugtrack_url |
|
requirements |
requests
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# jito-py
`jito-py` is a Python library for interacting with the Jito via JSON-RPC.
## Installation
```bash
pip install jito_py
```
## Usage
### 1.Gets the block engine url
You can access the block engine information using the interface below
```python
from jito_py.block_engine import BlockEngine
engines = BlockEngine.get_block_engines(network='mainnet')
for k, v in engines.items():
print(k)
print(v['block_engine_url'])
```
You can get the address of the block engine from jito's website
- [Mainnet Addresses | Jito (gitbook.io)](https://jito-labs.gitbook.io/mev/searcher-resources/block-engine/mainnet-addresses)
- [Testnet Addresses | Jito (gitbook.io)](https://jito-labs.gitbook.io/mev/searcher-resources/block-engine/testnet-addresses)
### 2.Interact with Jito as a searcher
```python
from jito_py.searcher import Searcher
# Create a searcher instance
block_engine_url = "https://ny.mainnet.block-engine.jito.wtf"
searcher = Searcher(block_engine_url)
# Get tip accounts
tip_accounts = searcher.get_tip_accounts()
print("Tip Accounts:", tip_accounts)
# Get bundle statuses
bundle_ids = ["your_bundle_id_here"]
bundle_statuses = searcher.get_bundle_statuses(bundle_ids)
print("Bundle Statuses:", bundle_statuses)
# Send a bundle
transactions = ["your_base58_encoded_transaction_here"]
bundle_id = searcher.send_bundle(transactions)
print("Sent Bundle ID:", bundle_id)
# Send a transaction
transaction = "your_base58_encoded_transaction_here"
transaction_id = searcher.send_transaction(transaction)
print("Sent Transaction ID:", transaction_id)
```
## License
This project is licensed under the MIT License. See the[LICENSE](LICENSE)file for more details.
Raw data
{
"_id": null,
"home_page": null,
"name": "jito-py",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "jito, solana, json-rpc",
"author": null,
"author_email": "\"Matrix.Ye\" <initsysctrl@outlook.com>",
"download_url": "https://files.pythonhosted.org/packages/fe/f0/16f3108b5375ba9903555e8ff0676b2702390b8ce21d433459b189e1c2d3/jito_py-0.1.3.tar.gz",
"platform": null,
"description": "# jito-py\n\n`jito-py` is a Python library for interacting with the Jito via JSON-RPC.\n\n## Installation\n\n```bash\npip install jito_py\n```\n \n## Usage\n\n### 1.Gets the block engine url\n\nYou can access the block engine information using the interface below\n\n```python\nfrom jito_py.block_engine import BlockEngine\n\nengines = BlockEngine.get_block_engines(network='mainnet')\nfor k, v in engines.items():\n print(k)\n print(v['block_engine_url'])\n```\n\nYou can get the address of the block engine from jito's website\n\n- [Mainnet Addresses | Jito (gitbook.io)](https://jito-labs.gitbook.io/mev/searcher-resources/block-engine/mainnet-addresses)\n- [Testnet Addresses | Jito (gitbook.io)](https://jito-labs.gitbook.io/mev/searcher-resources/block-engine/testnet-addresses)\n\n### 2.Interact with Jito as a searcher\n\n```python \nfrom jito_py.searcher import Searcher\n\n# Create a searcher instance \nblock_engine_url = \"https://ny.mainnet.block-engine.jito.wtf\"\nsearcher = Searcher(block_engine_url)\n\n# Get tip accounts \ntip_accounts = searcher.get_tip_accounts()\nprint(\"Tip Accounts:\", tip_accounts)\n\n# Get bundle statuses \nbundle_ids = [\"your_bundle_id_here\"]\nbundle_statuses = searcher.get_bundle_statuses(bundle_ids)\nprint(\"Bundle Statuses:\", bundle_statuses)\n\n# Send a bundle \ntransactions = [\"your_base58_encoded_transaction_here\"]\nbundle_id = searcher.send_bundle(transactions)\nprint(\"Sent Bundle ID:\", bundle_id)\n\n# Send a transaction \ntransaction = \"your_base58_encoded_transaction_here\"\ntransaction_id = searcher.send_transaction(transaction)\nprint(\"Sent Transaction ID:\", transaction_id)\n```\n\n## License\n\nThis project is licensed under the MIT License. See the[LICENSE](LICENSE)file for more details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python library for interacting with the Jito JSON-RPC",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/MatrixYe/jito-py"
},
"split_keywords": [
"jito",
" solana",
" json-rpc"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4964e3ef7959d757fa4aafe9b2abfd993ce6654c7a9c4fff94b39af16e06a580",
"md5": "6be321b64e5dbf24adcad3dc31c88ce7",
"sha256": "e09bb16647efb085fd28b512b88bd355abe1a53ec414a28d425c896f3711ab77"
},
"downloads": -1,
"filename": "jito_py-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6be321b64e5dbf24adcad3dc31c88ce7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5363,
"upload_time": "2024-12-30T07:33:59",
"upload_time_iso_8601": "2024-12-30T07:33:59.203602Z",
"url": "https://files.pythonhosted.org/packages/49/64/e3ef7959d757fa4aafe9b2abfd993ce6654c7a9c4fff94b39af16e06a580/jito_py-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fef016f3108b5375ba9903555e8ff0676b2702390b8ce21d433459b189e1c2d3",
"md5": "cf094f2133fde2f7d05ca294818c5592",
"sha256": "717ed5163a10e46dcef356f3f4c3d21c867d9ff77dac2cf21dad180c4e35aebd"
},
"downloads": -1,
"filename": "jito_py-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "cf094f2133fde2f7d05ca294818c5592",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 6001,
"upload_time": "2024-12-30T07:34:03",
"upload_time_iso_8601": "2024-12-30T07:34:03.027870Z",
"url": "https://files.pythonhosted.org/packages/fe/f0/16f3108b5375ba9903555e8ff0676b2702390b8ce21d433459b189e1c2d3/jito_py-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-30 07:34:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MatrixYe",
"github_project": "jito-py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "requests",
"specs": [
[
"~=",
"2.31.0"
]
]
}
],
"lcname": "jito-py"
}