Permission Program
On-chain Permission Management (Coming soon)
Ephemeral Rollups SDK
SDK for Private Ephemeral Rollups
Overview
Private Ephemeral Rollups are Ephemeral Rollups that enable fine-grained permission over permissioned accounts in a Trusted Execution Environment with compliance at its heart. Each permission account maintains a list of members with specific flags that determine what actions they can perform.Key Concepts
- Permission Account: A PDA that stores access control rules for a specific account
- Members: Addresses granted specific permissions via flags
- Flags: Bitmasks that define what a member can do (authority, view logs, view balances, etc.)
- Public Permissions: When members are set to
None, the permissioned account becomes temporarily visible
Member Flags
Member flags define fine-grained permissions for each member. Flags can be combined using bitwise OR to grant multiple permissions. Flag Descriptions:- AUTHORITY: Allows a member to update and delegate permission settings, add/remove other members, and update member flags.
- TX_LOGS: Allows a member to view transaction execution logs.
- TX_BALANCES: Allows a member to view account balance changes.
- TX_MESSAGE: Allows a member to view transaction message data.
- ACCOUNT_SIGNATURES: Allows a member to view account signatures
- Rust SDK
- Pinocchio
- Web3.js
- Kit
Ephemeral Permission
EphemeralPermission accounts live entirely on the Ephemeral Rollup and are
paid for by the delegated PDA — no base-layer permission account to create,
delegate, or commit-and-undelegate. Three CPI ops cover the full lifecycle:
Create, Update, Close — all PDA-signed by the data account on
the ER, via MagicBlock’s Permission Program ACLseoPoyC3cBqoUtkbjZ4aDrkurZW86v19pXz2XQnp1.DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh). Once delegated, the PDA signs
all three permission ops on the ER using its program seeds and pays the
ephemeral permission rent — so it must be pre-funded at initialize time. See
Quickstart
for the end-to-end flow.
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
1
Initialize a new
EphemeralPermission account on the ER with initial
members and the privacy flag. Idempotent — skip if it already exists.2
Toggle the privacy flag, or add / remove / re-flag members. Updates take
effect immediately on the ER.
3
Close the
EphemeralPermission account on the ER and refund the rent to
the data PDA when the permission is no longer needed.Ephemeral Permission Operations
- 1. Create Ephemeral Permission
- 2. Update Ephemeral Permission
- 3. Close Ephemeral Permission
Initialize a new Use Cases:
EphemeralPermission account on the ER via
CreateEphemeralPermissionCpi. Payer = the delegated data PDA, which
signs with its program seeds and covers the rent from the lamports
pre-funded at initialize time.- Anchor
- Rust SDK
- Pinocchio
- Kit
- Web3.js
- Bootstrap access control for a newly delegated PDA on the ER
- Start public (
is_private: false, empty members) and tighten later via Update
Best Practices
- Authority Management: Always assign AUTHORITY_FLAG to at least one trusted member
- Least Privilege: Grant only necessary flags to each member
- Real-time Updates: Permissions can be updated in real-time on Private Ephemeral Rollup without undelegating, allowing dynamic access control adjustments
- Cleanup: Undelegate and close unused permission accounts to free SOL
Security Considerations
- Signer Validation: Only members with AUTHORITY_FLAG or program with permissioned account can authorize changes
- Public Accounts: Setting members to
Nonemakes the account publicly visible - Default Authority: By default, the owner of the permissioned account is added as permission authority to members of permission account.
- Empty Member List: If members field is set to empty list, the permissioned account is fully restricted and private. Only the owner of permissioned account can modify the permission.
- Access Auditing: Use member flags to audit and control access
Access Control
Fine-grained Access Control
On-chain Privacy
Privacy Mechanisms and Concepts
Authorization
Authorization Framework
Compliance Framework
Compliance Standards and Guidelines

