Use App Wallet
The TEE mnemonic is generated by the KMS and bound to your app's enclave. Once injected, the mnemonic safety depends on the app not leaking it.
Any mnemonic you see in .env.example is a placeholder for local development. The TEE overwrites the placeholder with the
actual KMS-generated mnemonic that's unique and persistent to your app. Only your specific TEE instance can decrypt and use this mnemonic.
When deployed, EigenCompute apps receive a persistent and private wallet that serves as the cryptographic identity, allowing the app to sign transactions, hold funds, and operate autonomously.
The TEE mnemonic is generated by the KMS and only decryptable inside your specific TEE application. It is provided at runtime
using the MNEMONIC environment variable. The wallet addresses are derived from the TEE mnemonic.
Derive Address from TEE Mnemonic
Etheruem
To derive the Etheruem wallet address from the MNEMONIC environment variable:
- ethers.js
- TypeScript/JavaScript
- Python
- view.sh
const mnemonic = process.env.MNEMONIC;
if (!mnemonic) {
throw new Error('MNEMONIC environment variable is not set');
}
const wallet = ethers.Wallet.fromPhrase(mnemonic);
// TypeScript/JavaScript example
import { mnemonicToAccount } from 'viem/accounts'
const account = mnemonicToAccount(process.env.MNEMONIC)
# Python example
import os
from eth_account import Account
Account.enable_unaudited_hdwallet_features()
account = Account.from_mnemonic(os.environ['MNEMONIC'])
Refer to the mnemonicToAccount documentation
Solana
To derive the Solana address from the MNEMONIC environment variable, refer to the Solana Wallets documentation.