magicblock
ما الذي تفعله
تغطي هذه المهارة MagicBlock، وهي مجموعة أدوات لـ Solana لتطبيقات سريعة ذات زمن استجابة منخفض. تشرح Ephemeral Rollups والحسابات المفوّضة والأوراكل والعشوائية والمدفوعات الخاصة، لمطوري اختيار ميزات MagicBlock وتصحيح أخطائها.
متى تستخدمها
- ✓عندما تريد بناء تطبيق Solana سريع وفوري، مثل لعبة.
- ✓عندما تحتاج إلى عشوائية أو بيانات أوراكل أو مدفوعات خاصة على Solana.
- ✓عندما يتعطل تكامل MagicBlock وتحتاج إلى مساعدة في حل المشكلة.
رابط المهارة
https://github.com/internet-court/internet-court-skill/blob/main/vendored/magicblock/magicblock-dev/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أنا أبني لعبة Solana سريعة وأريد معرفة ما إذا كانت Ephemeral Rollups من MagicBlock مناسبة لها.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يشرح الوكيل أي منتج من MagicBlock يناسب حاجتك، ثم يساعد في تصميم إعداد الحسابات والتكامل. ويساعد أيضًا في تصحيح مشكلات التفويض، لأن الحساب المفوّض يبدو مختلفًا على سلسلة Solana الرئيسية.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
MagicBlock Development Skill
Pair with the solana-dev skill
Use this skill for MagicBlock-specific concerns: ER/PER, delegation, oracles, Session Keys, cranks, VRF,
Magic Actions, eSPL, and private payments. For general Solana or Anchor work such as scaffolding, PDAs,
account layouts, SPL tokens, clients, wallets, or LiteSVM/Mollusk testing, also load solana-dev.
Key Concepts
Ephemeral Rollups enable high-performance, low-latency transactions by locking a delegated account on the base layer while an ER clone continues to execute under the account's original program owner. They are useful for gaming, real-time apps, and fast transaction throughput.
Ephemeral Accounts are born, used, and closed only inside an ER. They are useful for temporary high-frequency state, but they never commit to Solana and therefore cannot be the only copy of durable ownership, balances, rewards, or settlement results.
Delegation temporarily assigns the base-layer account to the Delegation Program and clones it into the ER with its original program owner. Normal program ownership, signer, authority, and account constraints still apply on the ER; delegation status is a routing and lifecycle concern, not a new application authorization rule.
Delegation debugging invariant: a properly delegated account looks owned by
the delegation program on base, owned by the original program on the ER endpoint
returned by router getDelegationStatus, and cloned into the ER with
delegated=true.
For the verified SDK v0.16.2 snapshot, use MagicIntentBundleBuilder to
schedule commit and commit-and-undelegate intents. Do not use the deprecated
free functions commit_accounts and commit_and_undelegate_accounts.
Private Ephemeral Rollups (PER) gate a delegated account inside a TEE-backed validator with an ER-local EphemeralPermission. Delegate only the data account on the base layer, then create, update, and close its permission on the ER with CreateEphemeralPermissionCpi, UpdateEphemeralPermissionCpi, and CloseEphemeralPermissionCpi. Do not create or delegate a separate base-layer permission account.
Magic Actions are base-layer instructions scheduled inside an ER transaction via
MagicIntentBundleBuilder.add_post_commit_actions(...). Each attempted base-layer transaction applies
its commit and actions atomically. If any BaseAction fails, the committor removes every BaseAction in
that affected TransactionStrategy before retrying its remaining commit strategy; actions in other
transaction/finalize strategies are outside that removal scope. Observe and reconcile every originally
scheduled action: scheduling or eventual commit success alone does not prove that any of them ran.
Commit sponsorship: every delegated account gets 10 free commits to base layer by default. To lift
the cap, either re-delegate (refreshes the quota) or attach the validator-scoped magic_fee_vault PDA
and a delegated fee payer to the intent bundle. The delegated payer is debited; the fee vault is the
validated destination credited with that commit fee.
Lamports top-up: when a delegated account (e.g. a delegated fee payer) needs more lamports on the ER side, use lamportsDelegatedTransferIx from the SDK. The transaction is submitted on base layer — the Ephemeral SPL Token program creates a single-use lamports PDA, funds it, and delegates it so the ER credits the destination.
Ephemeral SPL Token has two surfaces. In the SDK lifecycle model, clients use
delegateSpl/transferSpl/undelegateIx/withdrawSpl, and the ER balance appears as a normal SPL token
account at the owner's canonical ATA address, so Anchor programs can use plain SPL Token CPI. In the
direct-program model, contracts use ephemeral-spl-api and explicitly work with the eATA/global-vault
PDAs; do not apply the canonical-ATA model to that raw surface.
Pricing Oracle republishes supported market feeds for Solana/ER consumers. A safe integration verifies the expected feed identity, upstream publish-time freshness, value domain, exponent, checked arithmetic, and user price bounds; successful deserialization alone is not price validation.
Session Keys authorize a temporary signer for constrained application actions. Session validity is separate from SPL token authority: token spending also requires an explicit, bounded token delegate allowance.
Architecture:
┌─────────────────┐ delegate ┌─────────────────────┐
│ Base
الأسئلة الشائعة
ما Ephemeral Rollup؟
طبقة أسرع يواصل فيها الحساب المفوّض عمله، ويمكن أن تُسوّى حالته لاحقًا على Solana.
هل تستطيع الحسابات المؤقتة حفظ أرصدتي النهائية؟
لا. الحسابات المؤقتة لا تُثبَّت على Solana أبدًا، لذلك لا يمكن أن تكون النسخة الوحيدة للأرصدة أو النتائج.
هل ينبغي أن أستخدم مهارة Solana أخرى أيضًا؟
نعم. تقول المهارة إن تُقرن بمهارة تطوير Solana العامة من أجل الهيكلة والمحافظ والاختبار.
التفاصيل
الوصف الأصلي من المؤلف
Design, implement, and debug MagicBlock applications on Solana. Covers Ephemeral Rollups with delegated state; ER/PER architecture and settlement; private payments and token flows; oracles and randomness; scheduling and temporary authority; security and local validation. Use for MagicBlock product selection, integration, cross-product design, or production troubleshooting.
الشعبية
- نجوم GitHub
- 7.0k
- الترتيب
- #13641
- الترخيص
- —
- آخر تحديث
- 26/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
internet-court
7.0kيساعد وكيلك على الدفع لوكيل ذكاء اصطناعي آخر أو لخدمة مدفوعة، أو التعامل معهما بأمان، ويوجهه إلى الدليل المتخصص المناسب.
genlayer-erc7710-connector
7.0kيساعد وكيلك على ربط نتيجة مراجعة الذكاء الاصطناعي بنظام الصلاحيات، بحيث يمكن لمراجعة سيئة أن تقيّد صلاحيات الوكيل أو تلغيها.
genlayer-intelligent-contracts
7.0kيساعد وكيلك على تحديد قواعد وأدلة ومخرجات قاضٍ بالذكاء الاصطناعي يتحقق مما إذا كان وكيل آخر التزم بتفويضه.
x402-erc7710
7.0kيساعد وكيلك على الدفع مقابل خدمات الويب طلبًا تلو الآخر، وعلى إعداد إنفاق مستمر يبقى ضمن ميزانية الصلاحيات.
مهارات مشابهة
api-connector-builder
280kيبني وكيلك اتصالات API جديدة على النمط الموجود، ويفيد عندما تحتاج إلى تكامل إضافي دون ابتكار طريقة جديدة للعمل.
api-design
280kيساعد وكيلك على تصميم واجهات REST API وفق أفضل الممارسات، ويوضح كيف تتواصل وكيف تُعرض الأخطاء وكيف تُنظَّم البيانات.
backend-patterns
280kيساعد وكيلك على أنماط بنية الخادم وتحسين قاعدة البيانات، ويفيد في بناء الشيفرة التي تعمل على الخادم أو مراجعتها.