Providers Package

Providers package

The providers package makes it easy to integrate into your dApps. You can easily find it on npm: @cedelabs/providers (opens in a new tab).

This is some of the features it provides:

Detecting the provider

It exposes a method to detect the cede provider : detectCedeProvider().

// Await for the provider to be injected in the DOM
const provider = await detectCedeProvider();

Auto versioning on requests

It eliminates the need to specify the version of the endpoint you want to call by automatically replacing it with the most recent version.

// Instead of
await provider.request({ method: "vaults", params: { version: 1 } });
// You can simply write
await provider.request({ method: "vaults" });

Easy onboarding

It provides a seamless experience for users who have not yet installed the extension, automatically displaying an explanation modal when they attempt to connect to the dApp.

Test it in the Ballpit application (opens in a new tab).