Skip to content

The layered approach to plugins and extensibility is not well enough explained #113

@mirceanis

Description

@mirceanis

The plugins page (source) doesn't explain the layers of plugins and how they interact with each other.

User testimony:

"One thing that took me a bit to work out is what the different parts of the plugin system actually fit together.
You can read the config file and sort of work out that the didManager depends on the providers, and the providers use keyManager but I had to read both the config file and the source code to understand it."

The documentation should mention:

  • The 2 (or more) types of plugins that exist in Veramo
    • Top-level, "agent" plugins, that implement IAgentPlugin
      • Example, KeyManager, DIDManager, CredentialIssuer, etc
      • These provide a IPluginMethodMap of methods that are bubbled up to the agent
      • These methods are the external interface of the agent, and can also call each-other.
      • Usually only one implementation of a top-level plugin interface is installed on an agent. The MessageHandler is [currently] an exception.
    • Lower level implementations of certain interfaces
      • Top level plugins use implementations of specific interfaces to provide their functionality.
      • Example, AbstractKeyManagementSystem implementations used by KeyManager, AbstractIdentifierProvider impl used by DIDManager, DIDResolver implementations, DIDstore, KeyStore, PrivateKeyStore, etc.
      • There can be (and usually are) multiple implementations of these interfaces in use
      • These lower level plugins are only called by the top-level plugin where they are used and are not exposed globally.
      • These plugins don't call each-other, unless deliberately coupled by implementation details.
  • The doc should also link to the plugin template repository
  • The existing "core" plugins depend on each-other, so the docs should also include a diagram of the dependency tree.
  • The more advanced sections of this doc can mention plugin schemas, type safety, OpenAPI compatibility, multi-platform limitations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is neededpinned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions