Aller au contenu
Skillpedia
API et serveurs (backend)7.0k · #13641

magicblock

Ce qu’il fait

Ce skill couvre MagicBlock, un ensemble d'outils Solana pour des applications rapides à faible latence. Il explique les Ephemeral Rollups, les comptes délégués, les oracles, l'aléatoire et les paiements privés, pour les développeurs qui choisissent et déboguent ces fonctions.

Quand l’utiliser

  • ✓Quand vous voulez construire une application Solana rapide et en temps réel, comme un jeu.
  • ✓Quand vous avez besoin d'aléatoire, de données d'oracle ou de paiements privés sur Solana.
  • ✓Quand une intégration MagicBlock échoue et que vous avez besoin d'aide pour la dépanner.

Lien du skill

https://github.com/internet-court/internet-court-skill/blob/main/vendored/magicblock/magicblock-dev/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/internet-court/internet-court-skill/blob/main/vendored/magicblock/magicblock-dev/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Je construis un jeu Solana rapide et je veux savoir si les Ephemeral Rollups de MagicBlock lui conviennent.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent explique quel produit MagicBlock correspond à votre besoin, puis aide à concevoir la configuration des comptes et l'intégration. Il aide aussi à déboguer les problèmes de délégation, car un compte délégué apparaît différemment sur la chaîne principale de Solana.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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
Questions fréquentes

Qu'est-ce qu'un Ephemeral Rollup ?

C'est une couche plus rapide où un compte délégué continue de fonctionner, et son état peut revenir se régler sur Solana.

Les comptes temporaires peuvent-ils contenir mes soldes finaux ?

Non. Les comptes éphémères ne sont jamais enregistrés sur Solana, ils ne peuvent donc pas être l'unique copie des soldes ou des résultats.

Dois-je charger un autre skill Solana ?

Oui. Le skill indique de le combiner avec le skill général de développement Solana pour la structure, les portefeuilles et les tests.

Détails

Description originale de l’auteur

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.

repo: internet-court/internet-court-skill

Popularité

Étoiles GitHub
7.0k
Position au classement
#13641
Licence
—
Mis à jour
26/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires