Skip to content

weeaa/jito-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

82 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Jito Go SDK

GoDoc Go Report Card License

This library contains tooling to interact with Jito Labs software.

We currently use gagliardetto/solana-go to interact with Solana. PRs and contributions are welcome.

jitolabs

❇️ Contents

πŸ›Ÿ Support

If my work has been useful in building your for-profit services/infra/bots/etc, consider donating at ACPc147BD5SE7Rh2HKLED7nLWJyiNNHM8ruyGNHqcE8U (Solana address).

✨ Features

  • Searcher
  • Block Engine
  • Relayer
  • Geyser 🐳
  • Shredstream
  • JSON RPC API
  • Others
  • API

πŸ“‹ ToDo

  • tbd

πŸ“‘ Methods

  • πŸ’€* methods which are deprecated by Jito

  • most methods have wrappers for ease of use

  • both gRPC and JSON-RPC methods are supported

  • Searcher

    • SubscribeMempoolAccounts πŸ’€
    • SubscribeMempoolPrograms πŸ’€
    • GetNextScheduledLeader
    • GetRegions
    • GetConnectedLeaders
    • GetConnectedLeadersRegioned
    • GetTipAccounts
    • SimulateBundle
    • SendBundle (gRPC & JSON-RPC)
    • SendBundleWithConfirmation (gRPC & JSON-RPC)
    • SubscribeBundleResults
    • GetBundleStatuses (gRPC & JSON-RPC)
  • Block Engine

    • Validator
      • SubscribePackets
      • SubscribeBundles
      • GetBlockBuilderFeeInfo
    • Relayer
      • SubscribeAccountsOfInterest
      • SubscribeProgramsOfInterest
      • StartExpiringPacketStream
  • ShredStream

    • SendHeartbeat
  • Others (pkg/util.go & pkg/convert.go)

    • SubscribeTipStream
    • Converting functions
  • API (api/api.go)

    • RetrieveRecentBundles
    • RetrieveBundleIDfromTransactionSignature

πŸ’Ύ Installing

Go 1.22.0 or higher.

go get github.com/weeaa/jito-go@latest

If you want to run tests:

  1. Install Task.
  2. Initialize your .env file by running task install:<os> (darwin/linux/windows).
  3. Run tests with task test.

πŸ”„ Update Proto

🚨 Beware that due to duplicate types from jito proto files it will cause an error when building, this issue has been submitted to the team. 🚨

In order to get latest proto generated files, make sure you have protobuf & its plugins installed!

Using Homebrew (macOS).

brew install protobuf
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

Edit perms.

chmod +x ./scripts/generate_protos.sh

Run script.

./scripts/generate_protos.sh

πŸ”‘ Keypair Authentication

The following isn't mandatory anymore for Searcher access.

To access Jito MEV functionalities, you'll need a whitelisted Public Key obtained from a fresh KeyPair; submit your Public Key here. In order to generate a new KeyPair, you can use the following function GenerateKeypair() from the /pkg package.

πŸ’» Examples

πŸ₯ Common errors

  • The supplied pubkey is not authorized to generate a token.

The public key you supplied is not whitelisted by Jito, you may either use NewNoAuth instead of New to authenticate, or apply for whitelist here.

🚨 Disclaimer

This library is not affiliated with Jito Labs. It is a community project and is not officially supported by Jito Labs. Use at your own risk.

πŸ“ƒ License

Apache-2.0 License.

Releases

No releases published

Packages

No packages published