feat: Init code

This commit is contained in:
2025-01-29 14:18:32 +11:00
commit 5ee5f518a4
3 changed files with 53 additions and 0 deletions

42
multi-wallet.py Normal file
View File

@@ -0,0 +1,42 @@
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}