import json import account # Plugin Data info = { "name": "Multi Wallet Functions", "description": "Access and manage multiple wallets at once", "version": "1.0", "author": "Nathan.Woodburn/" } # Functions functions = { "balance": { "name": "Wallet Balances", "type": "default", "description": "List balances of all wallets", "params": {}, "returns": { "result": { "name": "Result", "type": "list" } } } } def balance(params, authentication): wallets = account.listWallets() balances = [] total = 0 available = 0 for wallet in wallets: info = account.getBalance(wallet) balances.append(f"{wallet}: Available: {info['available']:,.2f} HNS, Total: {info['total']:,.2f} HNS") total += info['total'] available += info['available'] balances.append(f"Total: Available: {available:,.2f} HNS, Total: {total:,.2f} HNS") return {"result": balances}