Skip to main content

aiojito

aiojito is an async Python library for interacting with the Jito via JSON-RPC.

Installation

pip install aiojito

Usage

1.Gets the block engine url

You can access the block engine information using the interface below

from aiojito.api.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 asynchronously

import asyncio
import aiohttp
from aiojito.async_api.searcher import AsyncSearcher


async def main():
    # Create a session context manager
    async with aiohttp.ClientSession() as session:
        # Create a searcher instance  
        block_engine_url = "https://ny.mainnet.block-engine.jito.wtf"
        searcher = AsyncSearcher(block_engine_url=block_engine_url, session=session)

        # Get tip accounts  
        tip_accounts = await searcher.get_tip_accounts()
        print("Tip Accounts:", tip_accounts)

        # Get bundle statuses  
        bundle_ids = ["your_bundle_id_here"]
        bundle_statuses = await searcher.get_bundle_statuses(bundle_ids)
        print("Bundle Statuses:", bundle_statuses)

        # Send a bundle  
        transactions = ["your_base58_encoded_transaction_here"]
        bundle_id = await searcher.send_bundle(transactions)
        print("Sent Bundle ID:", bundle_id)

        # Send a transaction  
        transaction = "your_base58_encoded_transaction_here"
        transaction_id = await searcher.send_transaction(transaction)
        print("Sent Transaction ID:", transaction_id)


asyncio.run(main())

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Release files for aiojito 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiojito 0.1.1
File Size Uploaded
aiojito-0.1.1.tar.gz 59.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiojito 0.1.1
File Interpreter ABI Platform
aiojito-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 68.5 kB

Release files / aiojito-0.1.1.tar.gz

Download URL aiojito-0.1.1.tar.gz
Size 59.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8897f26f96bb18b10d7932978a0b6f055313a5d6185f2074c6172ec6a4c9280e
BLAKE2b-256 checksum
How to use checksums
1b546876c1f82d392a4c124062a4935540f4dae3ea9d8a4ed34eb70ae34f21e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.20

Release files / aiojito-0.1.1-py3-none-any.whl

Download URL aiojito-0.1.1-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23e8ab2e9998a9fc675d784f90364f270c735dffb55790c1224130e15f5f7ff0
BLAKE2b-256 checksum
How to use checksums
efd5397b377fc4499c3b4cb8099ca44d34567ce97d3bf0dab38ea12325d04d09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.20

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page