The testnet account seeder (iln dev seed) automates the setup of development accounts on Stellar testnet. It creates three funded accounts with USDC and EURC trustlines configured, eliminating the need for manual account creation and trustline setup.
- Automatic Account Generation: Creates 3 new testnet accounts (freelancer, payer, liquidity_provider)
- Friendbot Funding: Funds accounts via Friendbot with test XLM
- Trustline Setup: Automatically configures USDC and EURC trustlines
- Idempotent: Running the command multiple times reuses existing accounts instead of creating duplicates
- Environment Export: Saves account details to
.env.testnet.accounts(gitignored) for reference
iln dev seedThis command will:
- Check if accounts already exist (idempotency)
- Generate 3 new keypairs if needed
- Fund each account via Friendbot
- Set up USDC and EURC trustlines
- Save account details to
.env.testnet.accounts - Display a summary table of created accounts
Creating 3 testnet accounts...
Funding accounts via Friendbot...
✓ Funded freelancer with XLM
✓ Funded payer with XLM
✓ Funded liquidity_provider with XLM
Setting up USDC and EURC trustlines...
✓ Added USDC trustline for freelancer
✓ Added EURC trustline for freelancer
✓ Added USDC trustline for payer
✓ Added EURC trustline for payer
✓ Added USDC trustline for liquidity_provider
✓ Added EURC trustline for liquidity_provider
✓ Testnet accounts seeded successfully!
Role Public Key
──────────────────── ──────────────────────────────────
FREELANCER GXXX...XXXX
PAYER GYYY...YYYY
LIQUIDITY PROVIDER GZZZ...ZZZZ
The seeder creates .env.testnet.accounts with the following format:
# Generated testnet accounts - DO NOT COMMIT
# Created for development purposes only
# Testnet only - no real value
TESTNET_FREELANCER_PUBLIC=G...
TESTNET_FREELANCER_SECRET=S...
TESTNET_PAYER_PUBLIC=G...
TESTNET_PAYER_SECRET=S...
TESTNET_LIQUIDITY_PROVIDER_PUBLIC=G...
TESTNET_LIQUIDITY_PROVIDER_SECRET=S...
# Token contract addresses on Stellar testnet
TESTNET_USDC_ISSUER=GBUQWP3BOUZX34TBIGK5ILGKDFHTQCXY4IQ7ZLVTLZHVNCV3XVJVTSC
TESTNET_EURC_ISSUER=GCNY5OXYSY4FZLQS2B4J5NE6BNUL37AJQ4NZ4PROUGH6TWYJF6XZMFCNote: This file is gitignored and contains secret keys. Never commit it to version control.
After account setup, you need to mint test tokens. You can do this in one of two ways:
- Visit https://stellar.expert/
- Log in with your account
- Navigate to the USDC and EURC token pages
- Use the minting interface if you have admin access
If you have admin access to the token contracts, use the SDK to mint tokens:
import { Keypair } from "@stellar/stellar-sdk";
const freelancerPublic = process.env.TESTNET_FREELANCER_PUBLIC;
const usdcAmount = BigInt(1000 * 1e6); // 1000 USDC
// Mint tokens using SDK (requires admin keypair)
// Implementation depends on your token contract| Token | Issuer |
|---|---|
| USDC | GBUQWP3BOUZX34TBIGK5ILGKDFHTQCXY4IQ7ZLVTLZHVNCV3XVJVTSC |
| EURC | GCNY5OXYSY4FZLQS2B4J5NE6BNUL37AJQ4NZ4PROUGH6TWYJF6XZMFC |
The seeder is fully idempotent. If you run it multiple times:
- First run: Creates accounts, funds them, sets up trustlines
- Subsequent runs: Detects existing accounts and reuses them
- No duplicates: Only creates accounts when
.env.testnet.accountsis missing or incomplete
To reset and create new accounts:
rm .env.testnet.accounts
iln dev seedIf funding fails with "Friendbot returned 400":
- Check your internet connection
- Verify the account public key is valid
- Friendbot may be rate-limited; wait a moment and try again
If trustline setup fails:
- Ensure the account is funded with XLM
- Check the token issuer address is correct
- Some errors about existing trustlines are expected and safe to ignore
Once accounts are created, you can use them with other CLI commands:
# Export the environment
export ILN_KEYPAIR_PATH=~/.stellar/keys/freelancer
# Submit an invoice as freelancer
iln submit \
--payer GXX...XX \
--amount 1000 \
--due 2025-12-31 \
--rate 300Typical development workflow:
# 1. Seed testnet accounts (run once)
iln dev seed
# 2. Use accounts for testing
export ILN_KEYPAIR_PATH=~/.stellar/keys/freelancer
iln submit --payer $PAYER --amount 100 --due 2025-12-31 --rate 300
# 3. List invoices
iln list --address $FREELANCER_PUBLIC
# 4. Fund invoices as LP
export ILN_KEYPAIR_PATH=~/.stellar/keys/liquidity_provider
iln fund --id 1
# 5. Mark as paid
export ILN_KEYPAIR_PATH=~/.stellar/keys/payer
iln pay --id 1- Node.js 18+
- Internet connection (for Friendbot funding)
- Active testnet network configuration in
.iln.jsonor environment
- Never use these account keypairs with real funds
- These accounts have no real value
- Do not commit
.env.testnet.accountsto version control - Rotate accounts regularly for security best practices