0.0.13 • Published 1 year ago

catalog-providers-test v0.0.13

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

sidebar_position: 1 title: Getting started

description: Nevermined Catalog Providers API Reference

Getting started

The Catalog exposes a package facilitating the interaction with Web3 providers like Metamask. You can see more about in the documentation

Providers supported

  • Metamask
  • WalletConnect
  • Coinbase Wallet

Pre-requisites

The Nevermined providers is a package built with React and Typescript. It requires Node JS v14 or higher. You can find online instructions about How to install Node JS.

How to install ?

yarn add @nevermined-io/catalog-providers
or
npm install --save @nevermined-io/catalog-providers

How to integrate ?

import { WalletProvider, getClient, useWallet } from "@nevermined-io/catalog-providers";
import App from "app";

ReactDOM.render(
    <div>
        <WalletProvider
            client={getClient()}
            correctNetworkId={80001}
            connectKitProps={
                {
                    theme: 'auto',
                    mode: 'dark',
                }
            }
        >
            <App />
        </WalletProvider>
    </div>,
    document.getElementById("root") as HTMLElement
);

How to use ?

const ConnectToMetaMask = () => {
    const { login, walletAddress, getConnectors } = useWallet();

    return (
        <>
            <div> {walletAddress}</div>
            {!walletAddress && (
                <button onClick={() => login(getConnectors()[0])}>Connect To MM</button>
            )}
        </>
    );
};

You can find here a example

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago