Skip to main content

About

PyPI

This library contains tooling to interact with Jito Lab's Block Engine as a searcher.

Downloading

$ pip install jito_searcher_client

Keypair Authentication

Basic access(5 req/second per region) no longer requires approval. Please visit our Discord dev channel, if you have other questions. If your application requires higher rate limits, please complete this form

Examples

Sync Client

from jito_searcher_client import get_searcher_client
from jito_searcher_client.generated.searcher_pb2 import ConnectedLeadersRequest

from solders.keypair import Keypair

KEYPAIR_PATH = "/path/to/authenticated/keypair.json"
BLOCK_ENGINE_URL = "mainnet.block-engine.jito.wtf"

with open(KEYPAIR_PATH) as kp_path:
    kp = Keypair.from_json(kp_path.read())

client = get_searcher_client(BLOCK_ENGINE_URL, kp)
leaders = client.GetConnectedLeaders(ConnectedLeadersRequest())
print(f"{leaders=}")

Sync Client (No Auth)

from jito_searcher_client import get_searcher_client
from jito_searcher_client.generated.searcher_pb2 import ConnectedLeadersRequest

from solders.keypair import Keypair

BLOCK_ENGINE_URL = "mainnet.block-engine.jito.wtf"

client = get_searcher_client(BLOCK_ENGINE_URL)
leaders = client.GetConnectedLeaders(ConnectedLeadersRequest())
print(f"{leaders=}")

Async Client

import asyncio

from jito_searcher_client import get_async_searcher_client
from jito_searcher_client.generated.searcher_pb2 import ConnectedLeadersRequest

from solders.keypair import Keypair

KEYPAIR_PATH = "/path/to/authenticated/keypair.json"
BLOCK_ENGINE_URL = "mainnet.block-engine.jito.wtf"

async def main():
    with open(KEYPAIR_PATH) as kp_path:
        kp = Keypair.from_json(kp_path.read())
    client = await get_async_searcher_client(BLOCK_ENGINE_URL, kp)
    leaders = await client.GetConnectedLeaders(ConnectedLeadersRequest())
    print(f"{leaders=}")

asyncio.run(main())

Async Client (No Auth)

import asyncio

from jito_searcher_client import get_async_searcher_client
from jito_searcher_client.generated.searcher_pb2 import ConnectedLeadersRequest

from solders.keypair import Keypair

BLOCK_ENGINE_URL = "mainnet.block-engine.jito.wtf"

async def main():
    client = await get_async_searcher_client(BLOCK_ENGINE_URL)
    leaders = await client.GetConnectedLeaders(ConnectedLeadersRequest())
    print(f"{leaders=}")

asyncio.run(main())

Development

Install pip

$ curl -sSL https://bootstrap.pypa.io/get-pip.py | python 3 -

Install poetry

$ curl -sSL https://install.python-poetry.org | python3 -

Setup environment and build protobufs

$ poetry install
$ poetry shell
$ poetry protoc

Linting

$ poetry run black .
$ poetry run isort .

Linting:

poetry run isort .
poetry run black .

Publishing package

$ poetry protoc && poetry build && poetry publish

Publishing package

$ poetry protoc && poetry build && poetry publish

Metadata

Release files for jito-searcher-client 0.1.6

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

Source distribution (sdist)

Source distribution for jito-searcher-client 0.1.6
File Size Uploaded Provenance Actions
jito_searcher_client-0.1.6.tar.gz 23.2 kB Without provenance Details for jito_searcher_client-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jito-searcher-client 0.1.6
File Interpreter ABI Platform Actions
jito_searcher_client-0.1.6-py3-none-any.whl Python 3 none any Details for jito_searcher_client-0.1.6-py3-none-any.whl

Total release size: 66.6 kB

Release files / jito_searcher_client-0.1.6.tar.gz

Download URL jito_searcher_client-0.1.6.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
987ddc6f99bc564d549101e1155234e76fec838a8e6f54bd52e0725ed65f283c
BLAKE2b-256 checksum
How to use checksums
06cfdcfd6af8ce467d4ad236a729b81bc7005d902e769b5610c68d9e6635eebf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / jito_searcher_client-0.1.6-py3-none-any.whl

Download URL jito_searcher_client-0.1.6-py3-none-any.whl
Size 43.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01dff8686203d32888030ed98f27b52a682d0cca34bfb68d12450eba8de6526e
BLAKE2b-256 checksum
How to use checksums
33efedd2e2d0f9e682a4e86cf3514b84efe6df17aec1510df6a39c7c3a0f1fd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Security for jito-searcher-client 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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