Prerequisites
Your application must be running in the Phala Cloud TEE environment with access to the dstack socket. In yourdocker-compose.yml:
Ethereum Wallet
ethereum.js
Solana Wallet
solana.js
Important Security Notes
- Use secure functions: Always use
toViemAccountSecure()andtoKeypairSecure()(not the legacy versions) - Application-specific: Wallet addresses are unique to your application ID
- Deterministic: Same path always generates the same wallet
- Keep keys in TEE: Never expose private keys outside the secure environment
Multi-Wallet Support
Generate multiple wallets by using different paths:multiWallet.js

