Wallets
Smart wallet architecture for secure, gasless transactions on Algorand.
Wallet Sets
Wallets are organized into wallet sets. Each set can contain multiple Algorand accounts, making it easy to isolate funds by agent, purpose, or environment.
from algopay import AlgoPay
ap = AlgoPay()
# Create a wallet set
ws = ap.wallet.create_set("production-agents")
# Create a wallet within the set
wallet = ap.wallet.create("agent-1", wallet_set=ws.id)
print(wallet.address) # Algorand addressCustodial vs External
Custodial
Generated and encrypted in AlgoPay's vault. Mnemonics stored with AES-256-GCM. Best for automated agent workflows.
External
Connect Pera, Defly, or other Algorand wallets via WalletConnect. User signs transactions directly. Best for human-in-the-loop.
Balance Queries
# ALGO balance
balance = ap.wallet.balance(wallet.id)
print(f"{balance.algo} ALGO")
# USDC balance (ASA)
print(f"{balance.usdc} USDC")Security
- Mnemonics encrypted with AES-256-GCM using ALGOPAY_VAULT_MASTER_KEY
- Keys never leave the server — vault decryption happens only during transaction signing
- All wallet operations logged in the audit trail