Skip to main content

Building with an AI coding agent? Install the MagicBlock Dev Skill to give your agent MagicBlock-specific patterns — delegation flows, Magic Actions, cranks, VRF, and more.Hit an error? Ask your coding agent with the skill installed, not the docs assistant. The assistant only sees the docs, so it cannot debug your code.Quick install for Claude Code:
Using Cursor, Codex, Windsurf, Cline, or another agent? See the AI Dev Skill page for all install targets.

Quick Access

Check out example:

GitHub

SPL Tokens Anchor Implementation

Live Example App

Try the SPL Tokens demo

Live Example App

Try private payments
Snippets target @magicblock-labs/ephemeral-rollups-sdk v0.14.3 with the legacy-vault path. The idempotent-shuttle path targets v0.15.3 — keep the same path across delegateSpl / undelegateIx / withdrawSpl within one lifecycle.

Step-By-Step Guide

Move SPL tokens through the full lifecycle against the Ephemeral SPL Token program SPLxh1LVZzEkX99H6rqYizhytLWPZVV296zyYDPagv2delegate, transact on the ER, then settle back to Solana:
1

Delegate the token account

Delegate an owner’s balance to a validator on the base layer. The first delegation for a mint creates the shared Global Vault.
2

Transfer on the ER

Move tokens between eATAs inside the rollup — public or private.
3

Undelegate & commit

Undelegate on the ER and wait for the commit back to base.
4

Withdraw to base

Move the balance out of the Global Vault to a base-layer token account.

Ephemeral SPL Token Example

The following software packages may be required, other versions may also be compatible: Install the SDK:

Code Snippets

delegateSpl delegates an owner’s balance to a validator. The first delegation for a mint creates the shared Global Vault (initVaultIfMissing: true); later ones reuse it. Send on the base layer, and fund the rent sponsor (deriveRentPda()) before delegating.
⬆️ Back to Top
Run it locally: yarnyarn buildyarn setup (boots the local base + ER cluster; leave running) → yarn test:local in a second terminal.

Solana Explorer

Get insights about your transactions and accounts on Solana:

Solana Explorer

Official Solana Explorer

Solscan

Explore Solana Blockchain

Solana RPC Providers

Send transactions and requests through existing RPC providers:

Solana

Free Public Nodes

Helius

Free Shared Nodes

Triton

Dedicated High-Performance Nodes

Solana Validator Dashboard

Find real-time updates on Solana’s validator infrastructure:

Solana Beach

Get Validator Insights

Validators App

Discover Validator Metrics

Server Status

Subscribe to Solana’s and MagicBlock’s server status:

Solana Status

Subscribe to Solana Server Updates

MagicBlock Status

Subscribe to MagicBlock Server Status

MagicBlock Products

Ephemeral Rollup (ER)

Execute real-time, zero-fee transactions securely on Solana.

Private Ephemeral Rollup (PER)

Protect sensitive data with compliance — built on top of Ephemeral Rollups.

Ephemeral SPL Token

Move SPL tokens at rollup speed — public or private transfers, swaps, and private payments for trading and DeFi apps.

Prediction Markets & Trading

Combine real-time execution, session keys, token custody, price feeds, automation, and settlement.

Solana VRF

Add provably fair onchain randomness to games, raffles, and real-time apps.

Pricing Oracle

Access low-latency onchain price feeds for trading and DeFi.