# react-wallet

> Made with create-react-library

Latest version **2.2.2** (published 2021-08-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-wallet
pnpm add react-wallet
yarn add react-wallet
bun add react-wallet
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.2 |
| Published | 2021-08-13 |
| First published | 2021-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 18 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rytis Grincevicius |
| Maintainers | 6uzmen |

## Links

- npm: https://www.npmjs.com/package/react-wallet
- npm.io page: https://npm.io/package/react-wallet

## Dependencies (18)

- [web3](https://npm.io/package/web3.md) ^1.3.6
- [i18next](https://npm.io/package/i18next.md) ^20.2.2
- [web3-core](https://npm.io/package/web3-core.md) ^1.3.6
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [qrcode.react](https://npm.io/package/qrcode.react.md) ^1.0.1
- [react-i18next](https://npm.io/package/react-i18next.md) ^11.8.15
- [@sovryn/wallet](https://npm.io/package/@sovryn/wallet.md) ^2.0.0
- [detect-browser](https://npm.io/package/detect-browser.md) ^5.2.0
- [@hookstate/core](https://npm.io/package/@hookstate/core.md) ^3.0.6
- [ethereumjs-util](https://npm.io/package/ethereumjs-util.md) ^7.0.9
- [storage-factory](https://npm.io/package/storage-factory.md) ^0.2.0
- [@blueprintjs/core](https://npm.io/package/@blueprintjs/core.md) ^3.44.2
- [@types/classnames](https://npm.io/package/@types/classnames.md) ^2.2.11
- [styled-components](https://npm.io/package/styled-components.md) ^5.2.3
- [use-onclickoutside](https://npm.io/package/use-onclickoutside.md) ^0.4.0
- [react-copy-to-clipboard](https://npm.io/package/react-copy-to-clipboard.md) ^5.0.3
- [@types/react-copy-to-clipboard](https://npm.io/package/@types/react-copy-to-clipboard.md) ^5.0.0
- [i18next-browser-languagedetector](https://npm.io/package/i18next-browser-languagedetector.md) ^6.1.0

## Recent versions

- 2.2.2 (latest) — 2021-08-13

## README

# @sovryn/react-wallet

[![NPM](https://img.shields.io/npm/v/@sovryn/react-wallet.svg)](https://www.npmjs.com/package/@sovryn/react-wallet) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save @sovryn/react-wallet
```

## Usage

Wrap your app with the WalletProvider and use `React.useContext(WalletContext)` to get the current wallet connection state and useful functions.
Then either you use the WalletButton component to connect, call the connect function or the unlock functions from the WalletContext.

```tsx
import React, { Component, useContext } from 'react';

import { WalletProvider, WalletButton, WalletContext } from '@sovryn/react-wallet';
import '@sovryn/react-wallet/index.css'

class App extends Component {
  render() {
    return <WalletProvider options={chainId:30, remember: true}><Home /></WalletProvider>
  }
}

class Home extends Component {
  const { address } = useContext(WalletContext);
  render() {
    return <>{!address ? <WalletButton /> : <p>Connected with {address}</p>)}</>
  }
}

```

## License

MIT © [grinry](https://github.com/grinry)

---
_Source: https://npm.io/package/react-wallet · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
