Documentation Index
Fetch the complete documentation index at: https://docs.magicblock.gg/llms.txt
Use this file to discover all available pages before exploring further.
Quick Access
Check out example:GitHub
Private Counter Anchor Implementation
Live Example App
Try the Private Counter
MagicBlock’s Private Ephemeral Rollup enforces compliance based on node-level
IP geofencing, OFAC-sanction list and restricted jurisdictions at ingress,
before any transaction is accepted or executed. Find out
more
Step-By-Step Guide
Build your program and upgrade it with permission and delegation hooks that utilize MagicBlock’s Permission ProgramACLseoPoyC3cBqoUtkbjZ4aDrkurZW86v19pXz2XQnp1 and Delegation Program DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh:
Write your Solana program as you normally.
Add delegation with restriction hooks in your program
A single
delegate instruction creates the permission account, delegates
it, and then delegates the permissioned account to the TEE validator. A
symmetric undelegate instruction releases both accounts atomically on the
way back to the base layer. See access control
details.These public validators are supported for development. Make sure to add the specific ER validator in your delegation instruction:
Mainnet- Asia (as.magicblock.app):
MAS1Dt9qreoRMQ14YQuhg8UTZMMzDdKhmkZMECCzk57 - EU (eu.magicblock.app):
MEUGGrYPxKk17hCr7wpT6s8dtNokZj5U2L57vjYMS8e - US (us.magicblock.app):
MUS3hc9TCw4cGC12vHNoYcCGzJG1txjgQLZWVoeNHNd - TEE (mainnet-tee.magicblock.app):
MTEWGuqxUpYZGFJQcp8tLN7x5v9BSeoFHYWQQ3n3xzo
- Asia (devnet-as.magicblock.app):
MAS1Dt9qreoRMQ14YQuhg8UTZMMzDdKhmkZMECCzk57 - EU (devnet-eu.magicblock.app):
MEUGGrYPxKk17hCr7wpT6s8dtNokZj5U2L57vjYMS8e - US (devnet-us.magicblock.app):
MUS3hc9TCw4cGC12vHNoYcCGzJG1txjgQLZWVoeNHNd - TEE (devnet-tee.magicblock.app):
MTEWGuqxUpYZGFJQcp8tLN7x5v9BSeoFHYWQQ3n3xzo
- Local ER (localhost:7799):
mAGicPQYBMvcYveUZA5F5UNNwyHvfYh5xkLS2Fr1mev
Deploy your Solana program using Anchor CLI.
Implement authorization in your client
Sign user message to retrieve authorization token from TEE endpoint.
Execute transactions and test privacy
Request for authorization token and send confidential transactions.
Private Counter Example
The following software packages may be required, other versions may also be compatible:| Software | Version | Installation Guide |
|---|---|---|
| Solana | 2.3.13 | Install Solana |
| Rust | 1.85.0 | Install Rust |
| Anchor | 0.32.1 | Install Anchor |
| Node | 24.10.0 | Install Node |
The latest Permission Program requires SDK version
>=0.8.0. See
migration
guide for
details.
Code Snippets
- 1. Write program
- 2. Delegate with Restriction
- 3. Deploy
- 5. Test
A simple counter program with ⬆️ Back to Top
initialize and increment instructions, identical in shape to the public counter — privacy is added in the next steps:Access Control
Fine-grained Access Control
On-chain Privacy
Privacy Mechanisms and Concepts
Authorization
Authorization Framework
Compliance Framework
Compliance Standards and Guidelines
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.
Private Payment API
Add private onchain transfers to your app in seconds — compliant by default.
Verifiable Randomness Function (VRF)
Add provably fair onchain randomness within a second — for free.
Pricing Oracle
Access low-latency onchain price feeds for trading and DeFi.

