feat: Init code

This commit is contained in:
Nathan Woodburn 2025-01-29 14:18:32 +11:00
commit 5ee5f518a4
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
3 changed files with 53 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.venv/

10
README.md Normal file
View File

@ -0,0 +1,10 @@
# Multi wallet Plugin for FireWallet
This plugin allows you to use multiple wallets in FireWallet at the same time.
## Import
Go to Plugins > Custom Plugin Manager
Import this URL:
```
https://git.woodburn.au/nathanwoodburn/multi-wallet-plugin.git
```

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}