fix: Remove test network tool from default plugins
All checks were successful
Build Docker / Build Image (push) Successful in 43s

This commit is contained in:
Nathan Woodburn 2025-01-31 11:30:14 +11:00
parent 8622400427
commit 7c943c137c
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -1,53 +0,0 @@
import json
import account
import requests
# Plugin Data
info = {
"name": "Testing tools",
"description": "Testing tools",
"version": "1.0",
"author": "Nathan.Woodburn/"
}
# Functions
functions = {
"generate":{
"name": "Generate blocks",
"type": "default",
"description": "Generate blocks to your wallet",
"params": {
"numblocks": {
"name":"Number of blocks to generate",
"type":"number"
},
"address": {
"name":"Address to generate to",
"type":"text"
}
},
"returns": {
"status":
{
"name": "Status of the function",
"type": "text"
}
}
}
}
def generate(params, authentication):
# hsd-cli rpc generatetoaddress $numblocks $address
number = params["numblocks"]
address = params["address"]
if number == "" or int(number) < 1:
number = 1
if address == "":
wallet = authentication.split(":")[0]
address = account.getAddress(wallet)
print(f"Generating {number} blocks to {address}")
blocks = account.hsd.rpc_generateToAddress(address,number)
return {"status": f"Successfully generated {number} blocks to {address}"}