v2.2.0-beta pre-releases, and this
page describes them as of v2.2.0-beta.8. Add them to your existing
kora.toml alongside stable configuration. Each option first appeared in a
different beta:
| Option | First beta |
|---|---|
[kora.bundle] with sign_bundle / sign_and_send_bundle | v2.2.0-beta.1 |
get_version | v2.2.0-beta.1 |
estimate_bundle_fee | v2.2.0-beta.2 |
[[kora.usage_limit.rules]] (replaces max_transactions) | v2.2.0-beta.3 |
[kora.lighthouse] | v2.2.0-beta.4 |
reCAPTCHA (recaptcha_secret in [kora.auth]) | v2.2.0-beta.4 |
[kora.plugins] (gas_swap) | v2.2.0-beta.6 |
simulate_bundle_url in [kora.bundle.jito] (required) | v2.2.0-beta.8 |
Transaction Plugins
The[kora.plugins] section configures transaction plugins that run during
signing flows. Plugins validate the shape and contents of transactions before
Kora signs them. They execute for signTransaction, signAndSendTransaction,
signBundle, and signAndSendBundle — but not for estimateBundleFee.
| Option | Description | Required | Type |
|---|---|---|---|
enabled | List of enabled transaction plugins | No (default: []) | string[] |
gas_swap Plugin
The gas_swap plugin enforces a strict transaction shape for gasless
token-for-SOL swap operations. When enabled, every transaction submitted through
signing flows must contain exactly:
- One SPL Token transfer (SPL Token or Token-2022) — from a non-fee-payer owner
- One System SOL transfer (
TransferorTransferWithSeed) — from the fee payer
Configuration Requirements
Thegas_swap plugin validates your config at startup and will error if
requirements are not met:
- System Program must be in
allowed_programs - At least one token program (SPL Token or Token-2022) must be in
allowed_programs - At least one token must be in
allowed_tokens - Pricing model must not be
Free— set a margin or fixed price
Warning: When usinggas_swapwith Fixed pricing, ensure the fixed token fee is worth at leastmax_allowed_lamportsin SOL to avoid a drain condition where the SOL sent exceeds the token received.
Bundle Configuration
The[kora.bundle] section enables Jito bundle support for atomic
multi-transaction execution:
| Option | Description | Required | Type |
|---|---|---|---|
enabled | Enable bundle functionality | No (default: false) | boolean |
Jito Configuration
| Option | Description | Required | Type |
|---|---|---|---|
block_engine_url | Jito block engine URL | No (default: https://mainnet.block-engine.jito.wtf) | string |
simulate_bundle_url | Jito-Solana RPC URL used for simulateBundle (e.g., https://mainnet.rpc.jito.wtf) | Yes (when bundles enabled), from v2.2.0-beta.8 | string |
simulate_bundle_url only exists from v2.2.0-beta.8; earlier betas ignore the
key. From beta.8, Kora won’t start with bundles enabled until it’s set.
Available Jito block engine URLs:
- Mainnet (public):
https://mainnet.block-engine.jito.wtf - Mainnet (private): Contact Jito for access
Important: When using bundles with Jito tips paid by Kora, setFor a complete guide on implementing Jito bundles with Kora, see the Jito Bundle Guide.allow_transfer = truein[validation.fee_payer_policy.system]to allow the signer to transfer SOL for the tip.
Lighthouse Fee Payer Protection
The[kora.lighthouse] section enables Lighthouse fee payer protection. When
enabled, Kora adds balance assertion instructions to transactions, protecting
the fee payer from drainage attacks by verifying the fee payer’s balance doesn’t
drop below expected levels.
| Option | Description | Required | Type |
|---|---|---|---|
enabled | Enable Lighthouse assertions for fee payer protection | No (default: false) | boolean |
fail_if_transaction_size_overflow | Reject transaction if adding assertion exceeds size limit. If false, skips adding assertion silently. | No (default: true) | boolean |
How It Works
When Lighthouse is enabled, Kora fetches the fee payer’s current balance and adds a Lighthouse assertion instruction that verifies the balance doesn’t drop below(current_balance - estimated_fee) at transaction completion. This
prevents malicious transactions from draining the fee payer beyond expected
costs.
Method Compatibility
Lighthouse protection only works withsignTransaction and signBundle. It
does NOT work with signAndSendTransaction or signAndSendBundle.
When Lighthouse adds an assertion instruction, it modifies the transaction
message. This invalidates any pre-existing client signatures. The signAndSend*
flows would fail because:
- Client signs transaction
- Kora adds Lighthouse assertion (modifies message)
- Client’s original signature becomes invalid
- Network rejects with “signature verification failure”
Configuration Requirements
When enabling Lighthouse, add the Lighthouse program to yourallowed_programs:
allowed_programs.
Note: IfsignAndSendTransactionorsignAndSendBundleare enabled alongside Lighthouse, Kora will log a warning that these methods won’t have fee payer protection.
reCAPTCHA Bot Protection
reCAPTCHA v3 provides invisible bot protection for sensitive endpoints. Unlike API Key and HMAC which authenticate all requests, reCAPTCHA only protects specific high-risk methods (signing methods by default).Server Configuration
AddKORA_RECAPTCHA_SECRET to your environment variables (has priority), or add
a recaptcha_secret to your kora.toml:
| Option | Description | Default |
|---|---|---|
recaptcha_secret | Your reCAPTCHA v3 secret key from Google | - |
recaptcha_score_threshold | Minimum score to pass (0.0 = all pass, 1.0 = none pass) | 0.5 |
protected_methods | RPC methods requiring verification | Signing methods |
How It Works
- Client obtains a reCAPTCHA token from Google’s reCAPTCHA v3 API
- Client includes the token in the
x-recaptcha-tokenheader - Server verifies the token with Google and checks the score
- If score >= threshold, request proceeds; otherwise returns 401 Unauthorized
Client Implementation
Using Kora SDK:Getting reCAPTCHA Keys
- Go to Google reCAPTCHA Admin Console
- Create a new site with reCAPTCHA v3
- Use the Site Key in your frontend (client-side)
- Use the Secret Key in your Kora configuration (server-side)
Usage Limits
Stable Kora (v2.0.5) already has per-wallet usage limits, configured with a
single max_transactions count in [kora.usage_limit]. From v2.2.0-beta.3
that count is replaced by rules, which can target specific transaction types or
individual instructions and can reset after a time window. This is a breaking
change: a stable [kora.usage_limit] section with max_transactions fails to
parse on the beta with unknown field max_transactions. Remove
max_transactions and add at least one rule.
Note: Without cache_url, the beta keeps usage counts in memory, so they
reset when Kora restarts and aren’t shared between instances. Use Redis when you
run more than one Kora instance. The KORA_REDIS_URL environment variable
overrides cache_url.
| Option | Description | Required | Type |
|---|---|---|---|
enabled | Enable per-wallet usage limiting | Yes | boolean |
cache_url | Redis connection URL for shared usage tracking | No (in-memory if unset) | string |
fallback_if_unavailable | Allow transactions if Redis is unavailable | Yes | boolean |
rules | One or more [[kora.usage_limit.rules]] entries | Yes (when enabled) | array |
enabled = true and no rules, Kora refuses to start with
usage_limit.enabled is true but no rules are configured.
Usage Limit Rules
| Rule Field | Description | Required |
|---|---|---|
type | "transaction" (counts all transactions) or "instruction" (counts specific instruction types) | Yes |
max | Maximum count before the wallet is blocked | Yes |
window_seconds | Time window in seconds. If omitted, the limit is permanent. | No |
program | Program address to match (required for instruction type) | Conditional |
instruction | Instruction name to match, e.g. "Transfer", "Burn" (required for instruction type) | Conditional |
window_seconds is set, the counter resets after the time window expires.
Without it, the limit is permanent — once reached, the wallet is blocked until
manually cleared from Redis.
New Enabled Methods
The following methods have been added to[kora.enabled_methods]:
| Method | Description |
|---|---|
get_version | Return the Kora server version |
estimate_bundle_fee | Estimate fees for a bundle of transactions |
sign_bundle | Sign a bundle of transactions without sending |
sign_and_send_bundle | Sign and submit a bundle to Jito |