A Python library for interacting with the Jito JSON-RPC
Project description
jito-py
jito-py is a Python library for interacting with the Jito via JSON-RPC.
Installation
pip install jito_py
Usage
1.Gets the block engine url
You can access the block engine information using the interface below
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
2.Interact with Jito as a searcher
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 theLICENSEfile for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jito_py-0.1.3.tar.gz.
File metadata
- Download URL: jito_py-0.1.3.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
717ed5163a10e46dcef356f3f4c3d21c867d9ff77dac2cf21dad180c4e35aebd
|
|
| MD5 |
cf094f2133fde2f7d05ca294818c5592
|
|
| BLAKE2b-256 |
fef016f3108b5375ba9903555e8ff0676b2702390b8ce21d433459b189e1c2d3
|
File details
Details for the file jito_py-0.1.3-py3-none-any.whl.
File metadata
- Download URL: jito_py-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e09bb16647efb085fd28b512b88bd355abe1a53ec414a28d425c896f3711ab77
|
|
| MD5 |
6be321b64e5dbf24adcad3dc31c88ce7
|
|
| BLAKE2b-256 |
4964e3ef7959d757fa4aafe9b2abfd993ce6654c7a9c4fff94b39af16e06a580
|