Manifold Ethereum Provider
This section is for advanced users only. If you are just working on frontend integration, you can skip right to the Connect Widget documentation.
The Manifold Ethereum Provider is a wrapper around ethers.js that provides a number of convenience APIs for chain detection, wallet detection and automated provider switching (it will use the injected browser provider whenever possible).
Wait for Manifold Ethereum Provider to finish initialization. You can do this by using the
detectManifoldEthereumProvider
function found in the @manifoldxyz/frontend-provider-utils
npm package
npm: @manifoldxyz/frontend-provider-utils
npm
Utility which allows you to detect when the Manifold Ethereum Provider is instantiated by the Connect Widget
Once initialized, you will have access to the Manifold Ethereum Provider via
window.ManifoldEthereumProvider
You can find all the functionality that Manifold Ethereum Provider gives you by looking at the
@manifoldxyz/frontend-provider-types
package.
npm: @manifoldxyz/frontend-provider-types
npm
Type definitions for accessing the Manifold Ethereum Provider
import { EthereumProvider } from @manifoldxyz/frontend-provider-types
declare global {
interface Window {
ManifoldEthereumProvider: typeof EthereumProvider;
}
}
// Access the ManifoldEthereumProvider via window.ManifoldEthereumProvider
Last modified 2mo ago