1.12.2 • Published 1 year ago

@nevermined-io/providers v1.12.2

Weekly downloads
-
License
-
Repository
-
Last release
1 year 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

1 year ago

1.12.0

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.9.0-rc0

1 year ago

1.11.0

1 year ago

1.12.0-rc0

1 year ago

1.9.1

1 year ago

1.7.3

1 year ago

1.9.0

1 year ago

1.7.2

1 year ago

2.0.0-rc0

1 year ago

1.10.0

1 year ago

1.6.4

2 years ago

1.4.6

2 years ago

1.3.7

2 years ago

1.6.3

2 years ago

1.4.5

2 years ago

1.7.1

2 years ago

1.6.2

2 years ago

1.4.4

2 years ago

1.7.0

2 years ago

1.6.1

2 years ago

1.4.3

2 years ago

1.6.0

2 years ago

1.4.2

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.6.0-rc0

2 years ago

1.6.6

2 years ago

1.6.5

2 years ago

1.3.8

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.3.5

2 years ago

1.1.7

2 years ago

1.3.4

2 years ago

1.1.6

2 years ago

1.3.3

2 years ago

1.1.5

2 years ago

1.3.2

2 years ago

1.1.4

2 years ago

1.3.1

2 years ago

1.1.3

2 years ago

1.3.0

2 years ago

1.1.2

2 years ago

1.1.10

2 years ago

1.0.0

2 years ago