Kora (Gasless Transactions / Fee Sponsorship)
Solana Foundation skill — mirrored in the Musebook skills hub.
This entry reproduces, verbatim, the kora.md reference of the
foundation-maintained solana-dev skill (v2.7.0, MIT) from
https://github.com/solana-foundation/solana-dev-skill. It is one of the 16 topic
references the solana-dev router discloses progressively; for the full
skill (router + all references + nested guides), install the upstream
original: npx skills add https://github.com/solana-foundation/solana-dev-skill — also mirrored in this hub as the
solana-dev entry. Maintained by the Solana Foundation; Musebook does
not author or maintain this content. Relative links in the body point
at the upstream skill's file layout and resolve in the full install.
Kora
Kora is the Solana Foundation paymaster: a Rust JSON-RPC 2.0 server that validates a user-signed transaction against operator policy, co-signs it as fee payer, and optionally broadcasts it. Users pay fees in an SPL token (USDC, the app's own token) or nothing at all.
Two audiences:
- App developers call a Kora endpoint from
@solana/kora (TypeScript SDK).
- Operators run
kora-cli (or use a hosted provider) and keep the fee payer funded with SOL.
Contents
When to use Kora
Reach for Kora when:
- users should transact without holding SOL (gasless, sponsored fees)
- users pay fees in an SPL token instead of SOL
- a fee payer has to co-sign transactions built by untrusted clients, so it needs policy checks (allowed programs, spend limits, auth, rate limits)
Operator quick start
cargo install kora-cli # stable; kora-cli@2.2.0-beta.8 for beta
kora --config kora.toml config validate # prints warnings for risky policies
kora --config kora.toml --rpc-url "$RPC_URL" rpc initialize-atas --signers-config signers.toml
kora --config kora.toml --rpc-url "$RPC_URL" rpc start --signers-config signers.toml
--config and --rpc-url are global flags, so they go before the subcommand. rpc start takes --port (default 8080), --api-key / KORA_API_KEY and --hmac-secret / KORA_HMAC_SECRET.
- Run
initialize-atas before accepting token payments. The payment address needs an ATA for every mint in allowed_spl_paid_tokens.
kora.toml needs [kora] and [validation]. Unknown keys fail startup. Fields under [validation] with no default: max_allowed_lamports, max_signatures, allowed_programs, allowed_tokens, allowed_spl_paid_tokens, disallowed_accounts, price_source.
price_source = "Jupiter" requires JUPITER_API_KEY. "Mock" is for local development only.
- Pricing (
[validation.price]): margin (the default), fixed, or free.
signers.toml defines a signer pool (round_robin, random, weighted). Kora's signers are built on Solana Keychain. Use a memory key from an env var in development, and a KMS or managed-wallet backend in production.
- Docker image:
ghcr.io/solana-foundation/kora (:latest, :beta, :v<version>).
- Hosted providers: providers.
Full configuration reference: operators/configuration.
Security checklist
- Require auth. An unauthenticated node lets anyone spend its SOL. Use API key (
x-api-key) or HMAC authentication. apiKey and hmacSecret passed to the SDK in a browser bundle are public. Proxy those calls through your backend, or pair public clients with reCAPTCHA and usage limits (beta).
- Lock the fee payer policy with
fixed or free pricing. Those modes don't charge for fee-payer outflow. Set allow_transfer, allow_create_account and allow_allocate to false under [validation.fee_payer_policy.system]. Set allow_withdraw = false under .system.nonce. Set allow_transfer, allow_burn, allow_close_account, allow_mint_to and allow_initialize_account to false under .spl_token and .token_2022. margin pricing includes outflow in the fee.
- Never copy the repo-root
kora.toml to production. It is an example config that enables almost every fee-payer permission.
- Narrow the allowlists.
allowed_programs = "All" and allowed_spl_paid_tokens = "All" are accepted but widen the attack surface. Keep max_allowed_lamports low.
- Leave
allow_durable_transactions off. It defaults to false. Combined with dynamic pricing, durable nonces let users sign at one price and land at another.
- Monitor the node. Prometheus metrics come from
[metrics]. Alert on fee-payer balance and unusual outflow.
Troubleshooting
| Symptom |
Likely cause |
Fix |
| Transaction validation fails |
Program or token not in allowed_programs / allowed_tokens / allowed_spl_paid_tokens, or limits exceeded |
Check the node's getConfig() and adjust the transaction or the config |
| Version rejected |
v1 transaction sent to a released server |
Build v0 |
| Payment instruction fails |
Missing ATA on the payment address, or stale blockhash |
Operator runs rpc initialize-atas; client rebuilds with a fresh blockhash |
| Signature verification fails |
User did not sign the final transaction, or the transaction changed after signing |
Sign the exact transaction you submit. If the node appends a Lighthouse assertion (beta, signTransaction), re-sign the returned transaction |
| HTTP 401 |
Missing or wrong x-api-key / HMAC headers |
See authentication |
Full documentation
Every page is served as Markdown. Fetch the .md URL for details beyond this file.
1---2name: solana-dev-kora3description: Kora paymaster — when to use it, operator quick start, security controls, and links to the full docs.4license: MIT5metadata:6 author: Solana Foundation7 version: "2.7.0"8 source: https://skillmd.com/skills/solizardking/solana-dev-kora9 upstream: https://github.com/solana-foundation/solana-dev-skill10 category: Skill11---1213# Kora (Gasless Transactions / Fee Sponsorship)1415> **Solana Foundation skill — mirrored in the Musebook skills hub.**16> This entry reproduces, verbatim, the `kora.md` reference of the17> foundation-maintained **solana-dev** skill (v2.7.0, MIT) from18> https://github.com/solana-foundation/solana-dev-skill. It is one of the 16 topic19> references the solana-dev router discloses progressively; for the full20> skill (router + all references + nested guides), install the upstream21> original: `npx skills add https://github.com/solana-foundation/solana-dev-skill` — also mirrored in this hub as the22> `solana-dev` entry. Maintained by the Solana Foundation; Musebook does23> not author or maintain this content. Relative links in the body point24> at the upstream skill's file layout and resolve in the full install.2526# Kora2728Kora is the Solana Foundation paymaster: a Rust JSON-RPC 2.0 server that validates a user-signed transaction against operator policy, co-signs it as fee payer, and optionally broadcasts it. Users pay fees in an SPL token (USDC, the app's own token) or nothing at all.2930Two audiences:31- **App developers** call a Kora endpoint from `@solana/kora` (TypeScript SDK).32- **Operators** run `kora-cli` (or use a hosted provider) and keep the fee payer funded with SOL.3334## Contents35- [When to use Kora](#when-to-use-kora)36- [Operator quick start](#operator-quick-start)37- [Security checklist](#security-checklist)38- [Troubleshooting](#troubleshooting)39- [Full documentation](#full-documentation)4041## When to use Kora4243Reach for Kora when:44- users should transact without holding SOL (gasless, sponsored fees)45- users pay fees in an SPL token instead of SOL46- a fee payer has to co-sign transactions built by untrusted clients, so it needs policy checks (allowed programs, spend limits, auth, rate limits)474849## Operator quick start5051```bash52cargo install kora-cli # stable; kora-cli@2.2.0-beta.8 for beta53kora --config kora.toml config validate # prints warnings for risky policies54kora --config kora.toml --rpc-url "$RPC_URL" rpc initialize-atas --signers-config signers.toml55kora --config kora.toml --rpc-url "$RPC_URL" rpc start --signers-config signers.toml56```5758- `--config` and `--rpc-url` are global flags, so they go before the subcommand. `rpc start` takes `--port` (default 8080), `--api-key` / `KORA_API_KEY` and `--hmac-secret` / `KORA_HMAC_SECRET`.59- Run `initialize-atas` before accepting token payments. The payment address needs an ATA for every mint in `allowed_spl_paid_tokens`.60- `kora.toml` needs `[kora]` and `[validation]`. Unknown keys fail startup. Fields under `[validation]` with no default: `max_allowed_lamports`, `max_signatures`, `allowed_programs`, `allowed_tokens`, `allowed_spl_paid_tokens`, `disallowed_accounts`, `price_source`.61- `price_source = "Jupiter"` requires `JUPITER_API_KEY`. `"Mock"` is for local development only.62- Pricing (`[validation.price]`): `margin` (the default), `fixed`, or `free`.63- `signers.toml` defines a signer pool (`round_robin`, `random`, `weighted`). Kora's signers are built on [Solana Keychain](keychain.md). Use a memory key from an env var in development, and a KMS or managed-wallet backend in production.64- Docker image: `ghcr.io/solana-foundation/kora` (`:latest`, `:beta`, `:v<version>`).65- Hosted providers: [providers](https://solana.com/docs/tools/kora/providers.md).6667Full configuration reference: [operators/configuration](https://solana.com/docs/tools/kora/operators/configuration.md).6869## Security checklist7071- **Require auth.** An unauthenticated node lets anyone spend its SOL. Use API key (`x-api-key`) or HMAC authentication. `apiKey` and `hmacSecret` passed to the SDK in a browser bundle are public. Proxy those calls through your backend, or pair public clients with reCAPTCHA and usage limits (beta).72- **Lock the fee payer policy with `fixed` or `free` pricing.** Those modes don't charge for fee-payer outflow. Set `allow_transfer`, `allow_create_account` and `allow_allocate` to `false` under `[validation.fee_payer_policy.system]`. Set `allow_withdraw = false` under `.system.nonce`. Set `allow_transfer`, `allow_burn`, `allow_close_account`, `allow_mint_to` and `allow_initialize_account` to `false` under `.spl_token` and `.token_2022`. `margin` pricing includes outflow in the fee.73- **Never copy the repo-root `kora.toml` to production.** It is an example config that enables almost every fee-payer permission.74- **Narrow the allowlists.** `allowed_programs = "All"` and `allowed_spl_paid_tokens = "All"` are accepted but widen the attack surface. Keep `max_allowed_lamports` low.75- **Leave `allow_durable_transactions` off.** It defaults to `false`. Combined with dynamic pricing, durable nonces let users sign at one price and land at another.76- **Monitor the node.** Prometheus metrics come from `[metrics]`. Alert on fee-payer balance and unusual outflow.7778## Troubleshooting7980| Symptom | Likely cause | Fix |81|---|---|---|82| Transaction validation fails | Program or token not in `allowed_programs` / `allowed_tokens` / `allowed_spl_paid_tokens`, or limits exceeded | Check the node's `getConfig()` and adjust the transaction or the config |83| Version rejected | v1 transaction sent to a released server | Build v0 |84| Payment instruction fails | Missing ATA on the payment address, or stale blockhash | Operator runs `rpc initialize-atas`; client rebuilds with a fresh blockhash |85| Signature verification fails | User did not sign the final transaction, or the transaction changed after signing | Sign the exact transaction you submit. If the node appends a Lighthouse assertion (beta, `signTransaction`), re-sign the returned transaction |86| HTTP 401 | Missing or wrong `x-api-key` / HMAC headers | See [authentication](https://solana.com/docs/tools/kora/operators/authentication.md) |8788## Full documentation8990Every page is served as Markdown. Fetch the `.md` URL for details beyond this file.9192| Topic | URL |93|---|---|94| Overview | https://solana.com/docs/tools/kora.md |95| Fee abstraction (concepts, when to sponsor) | https://solana.com/docs/payments/send-payments/payment-processing/fee-abstraction.md |96| Quick start | https://solana.com/docs/tools/kora/getting-started/quick-start.md |97| Kit client guide | https://solana.com/docs/tools/kora/guides/kit-client.md |98| Full demo (manual flow) | https://solana.com/docs/tools/kora/guides/full-demo.md |99| JSON-RPC API | https://solana.com/docs/tools/kora/json-rpc-api.md |100| Operator configuration | https://solana.com/docs/tools/kora/operators/configuration.md |101| Fees and pricing | https://solana.com/docs/tools/kora/operators/fees.md |102| Signers | https://solana.com/docs/tools/kora/operators/signers.md |103| Authentication | https://solana.com/docs/tools/kora/operators/authentication.md |104| CLI | https://solana.com/docs/tools/kora/operators/cli.md |105| Beta (bundles, Jito, usage limits) | https://solana.com/docs/tools/kora/beta.md |106| x402 facilitator with Kora | https://solana.com/docs/tools/kora/guides/x402.md |107| Source | https://github.com/solana-foundation/kora |