Skip to main content

Jito Labs Python Searcher Client

Project description

About

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

Downloading

$ pip install jito_searcher_client

Keypair Authentication

Please request access to the block engine by creating a solana keypair and emailing the public key to support@jito.wtf.

Simple Example

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 = "frankfurt.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=}")

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 protoc
$ poetry shell

Publishing package

$ poetry protoc && poetry build && poetry publish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jito_searcher_client-0.1.0.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

jito_searcher_client-0.1.0-py3-none-any.whl (40.2 kB view details)

Uploaded Python 3

File details

Details for the file jito_searcher_client-0.1.0.tar.gz.

File metadata

  • Download URL: jito_searcher_client-0.1.0.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.8 Darwin/21.6.0

File hashes

Hashes for jito_searcher_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 462081faf7154186280a09a5373e0a32827a1e70b8ce3845e162151a0026dd08
MD5 76cda933fd8836e726d2ccef6dd79c02
BLAKE2b-256 f8eca403b08e3e3f5c18c384f8928ed5b8343f853c925ea3c732a2c05cc1df78

See more details on using hashes here.

File details

Details for the file jito_searcher_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jito_searcher_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ee23c7f3d4999385dfffbc261eb782feeafd994b7e57ebe5fc45c3324ba0cb3
MD5 f3242d2cf98ebe96ecc5289c3d4487ab
BLAKE2b-256 cf093d9d3fc90bdd7fcccf1a6985f5ff1c2bb6281c6f885ca81aa3b7ffa06efe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page