This is abasic guide to getting started creating Veramo plugins. More indepth tutorials to follow.
Start by using the veramo-plugin-template repo on Github. Click the
Use this template button to copy the repo to your account. Clone the repo locally and rename the package name in
From the plugin directory:
Run the plugin template
Before customizing your plugin, ensure the project run correctly:
In the logs you will be presented development URLS. You should have access to the Open API documentation of this agent.
To make sure your plugin is working correctly, let's create a new DID using its API:
You will need the API key which you can get from the agent.yml file.
API_KEY with your own and run:
A new identifier should be printed in your console.
- Rename instances of
MyAgentPluginwith your plugin name
- Define your plugin interfaces in
- Extend your plugin context by importing other types from Veramo for example if you want to issue credentials from your plugin, import the
- Replace sample arguments with your own
- Every time you update the types of your plugin, make sure you run:
- The file
my-agent-plugin.tsholds the implementation of your agent. It uses the interfaces defined in the
src/typesfolder to define each method implementation. Again, review all the JSDOCS and add your plugin implementation.