The Jito JSON-RPC Go SDK provides an interface for interacting with Jito's enhanced Solana infrastructure. This SDK supports methods for managing bundles and transactions, offering improved performance and additional features while interacting with the Block Engine.
GetInflightBundleStatuses
: Retrieve the status of in-flight bundles.GetBundleStatuses
: Fetch the statuses of submitted bundles.GetTipAccounts
: Get accounts eligible for tips.SendBundle
: Submit bundles to the Jito Block Engine.
SendTransaction
: Submit transactions with enhanced priority and speed.
This project requires Go 1.22.2 or higher. If you haven't installed Go yet, follow these steps:
-
Install Go: Download and install Go from golang.org
-
Verify the installation:
go version
Install the SDK using go get:
go get github.com/jito-labs/jito-go-rpc
go mod tidy
To run the basic transaction example:
-
Ensure your environment is set up in
examples/basic_txn/main.go
:// Load the sender's keypair walletPath := "/path/to/wallet.json" privateKey, err := solana.PrivateKeyFromSolanaKeygenFile(walletPath) if err != nil { log.Fatalf("Failed to load private key: %v", err) } // Set up receiver pubkey receiver, err := solana.PublicKeyFromBase58("YOUR_RECEIVER_KEY") if err != nil { log.Fatalf("Failed to parse receiver public key: %v", err) }
-
Run the example:
go run examples/basic_txn/main.go
To run the basic bundle example:
-
Ensure your environment is set up in
examples/basic_bundle/main.go
:// Load the sender's keypair walletPath := "/path/to/wallet.json" privateKey, err := solana.PrivateKeyFromSolanaKeygenFile(walletPath) if err != nil { log.Fatalf("Failed to load private key: %v", err) } // Set up receiver pubkey receiver, err := solana.PublicKeyFromBase58("YOUR_RECEIVER_KEY") if err != nil { log.Fatalf("Failed to parse receiver public key: %v", err) }
-
Run the example:
go run examples/basic_bundle/main.go
These examples demonstrate how to set up and run basic transactions and bundles using the Jito Go RPC SDK. Make sure to replace the wallet path and receiver key with your actual values.
Contributions are welcome! Please feel free to submit a Pull Request.
For support, please join our Discord community.