Installation
Peer Dependencies
Create a Client
fromConfig(...) creates a client with connections to both base Solana and the MagicBlock PER endpoint. It handles TEE integrity verification and PER auth token acquisition automatically.
Shield: Move Tokens into Private Deposit
Shield moves tokens from your wallet into the private layer (PER).1. Initialize and fund the deposit (base layer)
2. Create permission and delegate to PER
Private Transfers
Transfer to another user by Telegram username. The destination username deposit must already exist and be delegated.Claim and Unshield
Claim from username deposit
The recipient proves Telegram identity via a verified session PDA and claims to their own deposit:Unshield: move tokens back to wallet
Next Steps
- Read How It Works for the full base-layer + PER lifecycle and smart contract details.
- See API Reference for all method signatures and types.
- Use CLI to execute the same flow via
bun scripts/telegram-private-transfer.ts.

