diff --git a/testing.py b/testing.py index 83ae8fc..0318f3c 100644 --- a/testing.py +++ b/testing.py @@ -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)}"} \ No newline at end of file