1.12.2 • Published 8 months ago

@nevermined-io/providers v1.12.2

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

sidebar_position: 1 title: Getting started

description: Nevermined Providers Component API Reference

This library was generated with Nx.

Getting started

The providers component 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/providers
or
npm install --save @nevermined-io/providers

How to integrate ?

import { WalletProvider, getClient, useWallet } from "@nevermined-io/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

Running unit tests

Run nx test:unit provider

1.12.2

8 months ago

1.12.0

8 months ago

1.8.1

11 months ago

1.8.0

11 months ago

1.9.0-rc0

11 months ago

1.11.0

9 months ago

1.12.0-rc0

9 months ago

1.9.1

11 months ago

1.7.3

11 months ago

1.9.0

11 months ago

1.7.2

11 months ago

2.0.0-rc0

9 months ago

1.10.0

9 months ago

1.6.4

12 months ago

1.4.6

1 year ago

1.3.7

1 year ago

1.6.3

12 months ago

1.4.5

1 year ago

1.7.1

11 months ago

1.6.2

12 months ago

1.4.4

1 year ago

1.7.0

11 months ago

1.6.1

12 months ago

1.4.3

1 year ago

1.6.0

12 months ago

1.4.2

1 year ago

1.5.0

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.6.0-rc0

12 months ago

1.6.6

11 months ago

1.6.5

12 months ago

1.3.8

1 year ago

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.3.5

1 year ago

1.1.7

1 year ago

1.3.4

1 year ago

1.1.6

1 year ago

1.3.3

1 year ago

1.1.5

1 year ago

1.3.2

1 year ago

1.1.4

1 year ago

1.3.1

1 year ago

1.1.3

1 year ago

1.3.0

1 year ago

1.1.2

1 year ago

1.1.10

1 year ago

1.0.0

1 year ago