Skip to main content

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


Download files

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

Source Distribution

jito_py-0.1.2.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

jito_py-0.1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file jito_py-0.1.2.tar.gz.

File metadata

  • Download URL: jito_py-0.1.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for jito_py-0.1.2.tar.gz
Algorithm Hash digest
SHA256 674fdd638d16b3b3e767551041634fc95fe2bb0276817034169a150aafbfaac7
MD5 be14e6aa666d897d15fb33e514c4d9ba
BLAKE2b-256 96d73d8a4e23eaffb4096a8e55fe84b65b7d036e2d51228707ae483927c81e78

See more details on using hashes here.

File details

Details for the file jito_py-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: jito_py-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for jito_py-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 082807b79f9cf56c9ca5c1ef425ba4186b192a4620997e949855d0ef550ad537
MD5 ec5936ffa25114e1acac661bf757e6b2
BLAKE2b-256 7173ec5d8aab02f12c397c5788f3a3a49adfcd9e07b1bd141887ed23d3243831

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