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.

Examples

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.0.7.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

jito_searcher_client-0.0.7-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jito_searcher_client-0.0.7.tar.gz
  • Upload date:
  • Size: 22.4 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.0.7.tar.gz
Algorithm Hash digest
SHA256 3e08cf54f11f8d6c7459322f2f9288af69e26078eb97582583d78b30be5db5ff
MD5 d9997e54ea8e524270034787dc116d36
BLAKE2b-256 da205d55e3e3461f0ec70546a793ccd2c52ce3b90b70d331f0d9b7d9b452d911

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jito_searcher_client-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 29020d8f880277c97823b78d7edaeb879e8275a44a94dcb98f534d557621ad0e
MD5 15b61952afab7645a05d7e929fb609a1
BLAKE2b-256 8d99db89d2ed09376f3c681d4559ac2f3f91065400ebb44aacea776add461c36

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