solana-dev-kora
Kora paymaster — when to use it, operator quick start, security controls, and links to the full docs.
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- solana-dev-kora
- license
- MIT
- metadata
- { "author": "Solana Foundation", "source": "https://github.com/solana-foundation/solana-dev-skill", "version": "2.7.0", "category": "Skill" }
- description
- Kora paymaster — when to use it, operator quick start, security controls, and links to the full docs.
03 SKILL.md 正文
Kora (Gasless Transactions / Fee Sponsorship)
Solana Foundation skill — mirrored in the Musebook skills hub. This entry reproduces, verbatim, the
kora.mdreference 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 thesolana-deventry. 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
--configand--rpc-urlare global flags, so they go before the subcommand.rpc starttakes--port(default 8080),--api-key/KORA_API_KEYand--hmac-secret/KORA_HMAC_SECRET.- Run
initialize-atasbefore accepting token payments. The payment address needs an ATA for every mint inallowed_spl_paid_tokens. kora.tomlneeds[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"requiresJUPITER_API_KEY."Mock"is for local development only.- Pricing (
[validation.price]):margin(the default),fixed, orfree. signers.tomldefines 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.apiKeyandhmacSecretpassed 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
fixedorfreepricing. Those modes don't charge for fee-payer outflow. Setallow_transfer,allow_create_accountandallow_allocatetofalseunder[validation.fee_payer_policy.system]. Setallow_withdraw = falseunder.system.nonce. Setallow_transfer,allow_burn,allow_close_account,allow_mint_toandallow_initialize_accounttofalseunder.spl_tokenand.token_2022.marginpricing includes outflow in the fee. - Never copy the repo-root
kora.tomlto production. It is an example config that enables almost every fee-payer permission. - Narrow the allowlists.
allowed_programs = "All"andallowed_spl_paid_tokens = "All"are accepted but widen the attack surface. Keepmax_allowed_lamportslow. - Leave
allow_durable_transactionsoff. It defaults tofalse. 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.
04 同仓库更多 Skills
youtube-clipper
YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video
viem-integration
Integrate EVM blockchains using viem. Use when user says "read blockchain data", "send transaction", "interact with smart contract", "connect to Ethereum", "use viem", "use wagmi", "wallet integration", "viem setup", or mentions blockchain/EVM development with TypeScript.
v4-security-foundations
Security-first Uniswap v4 hook development. Use when user mentions "v4 hooks", "hook security", "PoolManager", "beforeSwap", "afterSwap", or asks about V4 hook best practices, vulnerabilities, or audit requirements.
v4-sdk-integration
App-layer SDK guide for building swap and liquidity experiences directly with the Uniswap v4 SDK. Use when user asks about "v4 sdk", "uniswap v4", "v4 swap", "v4 liquidity", "PoolManager", "V4Planner", "StateView", "PositionManager", "pool state", "v4 position", "uniswap sdk", or when building swap/liquidity UX directly with SDKs rather than via the Trading API.
v4-hook-generator
Generate Uniswap v4 hook contracts via OpenZeppelin MCP. Use when building custom swap logic, async swaps, hook-owned liquidity, custom curves, dynamic fees, MEV protection, limit orders, or oracle hooks.
testing
For testing with Light Protocol programs and clients on localnet, devnet, and mainnet validation.