From 4c08d4e24e53bef60a4c04f0e38f3be35395e6fb Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Wed, 7 Feb 2024 15:41:46 +1100 Subject: [PATCH] feat: Update plugins info page --- plugins.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/plugins.md b/plugins.md index 2142ee4..1f399fe 100644 --- a/plugins.md +++ b/plugins.md @@ -1,5 +1,53 @@ # Plugins +Plugins can be created to add more functionality to FireWallet Browser + + +## Format +They are created in python and use the format: + +```python +info = { + "name": "Plugin Name", + "description": "Plugin Description", + "version": "Version number", + "author": "Your Name", +} +functions = { + "internalName":{ + "name": "Human readable name", + "type": "Type of plugin", + "description": "Function description", + "params": { # For plugins other than default use {} for no params + "paramName": { + "name":"Human readable paramiter name", + "type":"type of paramiter", + } + }, + "returns": { + "returnName": + { + "name": "Human readable return name", + "type": "type of return" + } + } + } +} + +def internalName(params, authentication): # This should always have the same inputs + paramName = params["paramName"] + wallet = authentication.split(":")[0] + + # Do stuff + output = "Return value of stuff: " + paramName + + + + return {"returnName": output} + +``` + + ## Types ### Default Type: `default` @@ -15,6 +63,7 @@ This type is used for domain plugins. It shows in the manage domain page or the It gets the `domain` paramater as the only input (in addition to authentication) ### Dashboard +Type: `dashboard` This type is used for dashboard plugins. It shows in the dashboard page. It doesn't get any inputs other than the authentication