What You’ll Build
In the Full Transaction Flow Guide, you learned how to create gasless transactions using Kora. There are many scenarios, however, where a single transaction is inadequate or there is insufficient space in a single transaction to include a Kora payment instruction. In this guide, we will build a demo that demonstrates how to use Kora to sign and send a bundle of transactions to Jito’s block engine for atomic execution on Solana Mainnet. The Kora server will pay the Jito tip and all transaction fees. The final result will be a working Jito bundle system:Prerequisites
Before starting this tutorial, ensure you have:- Completed the Kora Full Transaction Flow Guide — we build on those concepts
- Node.js (LTS or later)
- Familiarity with Solana transactions
- Familiarity with Jito Bundles
Kora v2.2.0 Beta
Important: This guide requires the Kora v2.2.0 beta and usesv2.2.0-beta.8.
This is a pre-release and may contain bugs. Install the CLI with --locked so
it uses the matching kora-lib:
Jito Bundles Basics
On Solana, every instruction in a transaction is atomic—if one instruction fails, the entire transaction fails. Bundles are a tool that enable you to execute up to 5 transactions atomically and sequentially. Bundles are incentivized by a tip, the higher the tip, the higher the priority. This guide assumes you have some basic understanding of and experience with Jito Bundles.Project Structure
The sample code for this demo can be found in the Kora examples:v2.2.0-beta.8 tag, and navigate to
the jito-bundles directory:
server/kora.toml on main and on earlier
beta tags doesn’t load with the 2.2.0-beta.8 CLI (unknown field api_keys on
main, unknown field max_transactions on v2.2.0-beta.7).
Kora Server Configuration
kora.toml
The key configuration for bundle support:- sign_bundle / sign_and_send_bundle — Enable the bundle RPC methods
- allow_transfer = true — Kora’s signer pays the Jito tip, so it needs transfer permission
- bundle.enabled = true — Master switch for bundle functionality
- We are using the public mainnet block engine URL for this demo. In production, you would use the private block engine URL.
signers.toml
.env.example to .env and set the KORA_PRIVATE_KEY
environment variable to your mainnet private key. The signer wallet needs SOL on
mainnet to pay:
- Transaction fees for all bundle transactions
- The Jito tip (minimum 1,000 lamports)
Starting the Server
From theserver/ directory:
server/ directory:
Client Implementation
We’ll walk through the client implementation step by step, starting with imports.Imports and Configuration
- Solana Kit imports for building transactions
- Memo program for our demo transactions (you’d replace with real operations)
- System program for the Jito tip transfer
- Configuration for RPC endpoints and bundle parameters
Jito Tip Accounts
Jito has 8 tip accounts that you can send SOL to. We select one at random for this demo.Step 1: Initialize Clients
We initialize the Kora client with our API key, which matches what’s configured inkora.toml. In production, you’d load this from an environment variable.
Step 2: Setup Keys
generateKeyPairSigner() to create a fresh keypair for the demo. Because
the keypair is only signing the memo instructions and does not have to pay any
Kora fees (per our configuration), no SOL or other tokens are needed. Kora’s
signer (fetched via getPayerSigner) pays all fees and the Jito tip.
Step 3: Create Bundle Transactions
Now let’s create a bundle of transactions. We create multiple transactions, each with its own unique instructions. We use unique memo instructions here to easily verify our transactions after they land on Solana Mainnet.noopSigner), where Kora’s address is the
source of the tip transfer. Kora will sign this when processing the bundle.
Step 4: Sign and Submit Bundle
Now we can pull it together and send the bundle to Kora for signing and submission to Jito’s block engine.Running the Demo
1. Start the Kora Server
2. Run the Client
In a new terminal, navigate to theclient/ directory and run the demo:
Expected Output
You should see the step-by-step execution with a successful bundle at the end. The bundle will:- Create 4 memo transactions
- Add a Jito tip (1,000 lamports) to the last transaction
- Have all transactions signed by Kora as fee payer
- Submit atomically to Jito’s block engine
- Jito’s default router can hit rate limits. If you get a 429 error, you can try again later or request higher limits. Check out Jito’s rate limiting documentation for more information.
- The repository’s client also prints
SUCCESS: Bundle confirmed on Solanaafter the bundle UUID. It prints that line without checking the bundle’s status; the UUID only means Jito accepted the bundle. - Because our demo is using a very small tip, the bundle may not land on Solana Mainnet. If you don’t see the bundle on Jito’s bundle explorer, you can try again later with a higher tip.
Understanding What Happened
Here’s what happened differently from single transactions:- Multiple Transactions — Instead of one transaction, we created 4 that must execute together
- Jito Tip — We added a tip transfer (paid by Kora’s signer) to incentivize validators
- Bundle Validation — Kora validated all transactions meet requirements
specified in
kora.toml - Atomic Submission — All transactions submitted as a single unit to Jito by our Kora server with all fees and tips paid by Kora’s signer
Additional Resources
- Need help? Ask questions on
Solana Stack Exchange with a
Koratag - Jito Documentation — Official Jito MEV documentation
- Bundle RPC Methods — signBundle, signAndSendBundle, estimateBundleFee
- GitHub Repository — Source code and examples