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
Permission Lifecycle
The typical lifecycle of a permissioned account requires interaction with MagicBlock’s Permission ProgramACLseoPoyC3cBqoUtkbjZ4aDrkurZW86v19pXz2XQnp1 and Delegation Program DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh:
Delegate the permission to Private Ephemeral Rollup to enable enforcement
and real-time access control.
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 (tee.magicblock.app):
FnE6VJT5QNZdedZPnCoLsARgBwoE6DeJNjBs2H1gySXA
- Local ER (localhost:7799):
mAGicPQYBMvcYveUZA5F5UNNwyHvfYh5xkLS2Fr1mev
Add, remove, or modify member permissions as needed. Updates can be made in
real-time on Private Ephemeral Rollup.
Before making requests, verify TEE RPC integrity and obtain an authorization
token. Only members with appropriate flags can access or modify the account
state.
Permission Operations
- 1. Create
- 2. Delegate
- 3. Update
- 4. Request
- 5. Commit & Undelegate
- 6. Close
Once you’ve created your program, you can add permission and delegation hooks to control access to your accounts. For example, see Quickstart.Create a new permission account with initial members and their flags via MagicBlock’s Permission Program Use Cases:
ACLseoPoyC3cBqoUtkbjZ4aDrkurZW86v19pXz2XQnp1.- Rust SDK
- Pinocchio
- Kit
- Web3.js
- Initialize access control for a new delegated account
- Set up authority members and their permissions
- Define who can view transaction details
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 - Access Auditing: Use member flags to audit and control access

