Skip to content

Remove plugin types from client and core #1259

@nerfZael

Description

@nerfZael

Plugin types and all mention of plugins should be removed from client-js and core-js packages.
After they URI resolution refactor and the addition of PackageResolver they can now be treated as WrapPackages which can be registered in a resolver array.

Instead of this:

const client = new PolywrapClient({
 plugins: [
        {  
            uri: "ens/ethereum.polywrap.eth",
            plugin: ethereumPlugin({ connections })
        },
      ]
});

We should be able to do this:

const client = new PolywrapClient({
 resolver: UriResolver.from([
        {  
            uri: "ens/ethereum.polywrap.eth",
            package: ethereumPlugin({ connections })
        },
      ]
  )
});

NOTE: UriResolver.from is not implemented, currently it is implemented in the form of the buildUriResolver func, but UriResolver.from is more readable.

Overriding plugins can be moved to the config builder in the form of "packages"

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions