feat: Add tx count plugin and fixed dns error

This commit is contained in:
2024-04-08 11:44:50 +10:00
parent 40b4c42492
commit 45fdaa2de4
3 changed files with 41 additions and 3 deletions

35
plugins/txcount.py Normal file
View File

@@ -0,0 +1,35 @@
import json
import account
import requests
# Plugin Data
info = {
"name": "TX Count",
"description": "Plugin for checking how many txs are in a wallet",
"version": "1.0",
"author": "Nathan.Woodburn/"
}
# Functions
functions = {
"main":{
"name": "List TXs",
"type": "default",
"description": "Get TXs",
"params": {},
"returns": {
"txs":
{
"name": "Transactions",
"type": "text"
}
}
}
}
def main(params, authentication):
wallet = authentication.split(":")[0]
txs = account.getTransactions(wallet)
return {"txs": f'Total TXs: {len(txs)}'}