Name | jito-py JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | A Python library for interacting with the Jito JSON-RPC |
upload_time | 2024-06-26 09:52:49 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6 |
license | MIT |
keywords |
jito
solana
json-rpc
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
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/96/d7/3d8a4e23eaffb4096a8e55fe84b65b7d036e2d51228707ae483927c81e78/jito_py-0.1.2.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.2",
"project_urls": {
"Homepage": "https://github.com/MatrixYe/jito-py"
},
"split_keywords": [
"jito",
" solana",
" json-rpc"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7173ec5d8aab02f12c397c5788f3a3a49adfcd9e07b1bd141887ed23d3243831",
"md5": "ec5936ffa25114e1acac661bf757e6b2",
"sha256": "082807b79f9cf56c9ca5c1ef425ba4186b192a4620997e949855d0ef550ad537"
},
"downloads": -1,
"filename": "jito_py-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ec5936ffa25114e1acac661bf757e6b2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5338,
"upload_time": "2024-06-26T09:52:47",
"upload_time_iso_8601": "2024-06-26T09:52:47.269531Z",
"url": "https://files.pythonhosted.org/packages/71/73/ec5d8aab02f12c397c5788f3a3a49adfcd9e07b1bd141887ed23d3243831/jito_py-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "96d73d8a4e23eaffb4096a8e55fe84b65b7d036e2d51228707ae483927c81e78",
"md5": "be14e6aa666d897d15fb33e514c4d9ba",
"sha256": "674fdd638d16b3b3e767551041634fc95fe2bb0276817034169a150aafbfaac7"
},
"downloads": -1,
"filename": "jito_py-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "be14e6aa666d897d15fb33e514c4d9ba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 5973,
"upload_time": "2024-06-26T09:52:49",
"upload_time_iso_8601": "2024-06-26T09:52:49.509098Z",
"url": "https://files.pythonhosted.org/packages/96/d7/3d8a4e23eaffb4096a8e55fe84b65b7d036e2d51228707ae483927c81e78/jito_py-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-26 09:52:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MatrixYe",
"github_project": "jito-py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "jito-py"
}