feat: Add get info button

This commit is contained in:
2025-02-04 18:09:28 +11:00
parent 630e33b822
commit 9b60f2b4cf

View File

@@ -46,6 +46,19 @@ functions = {
"type": "text"
}
}
},
"nodeInfo": {
"name": "Node info",
"type": "default",
"description": "Get node info",
"params": {},
"returns": {
"info":
{
"name": "Node info",
"type": "text"
}
}
}
}
@@ -64,8 +77,6 @@ def generate(params, authentication):
blocks = account.hsd.rpc_generateToAddress(address,number)
return {"status": f"Successfully generated {number} blocks to {address}"}
def txCount(params, authentication):
wallet = authentication.split(":")[0]
txCount = 0
@@ -79,3 +90,6 @@ def txCount(params, authentication):
return {"txs": f'Total TXs: {txCount}'}
def nodeInfo(params, authentication):
info = account.hsd.rpc_getInfo()
return {"info": f"Node info: {json.dumps(info)}"}