2.2.23 • Published 6 months ago

@sovryn/react-wallet v2.2.23

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@sovryn/react-wallet

NPM JavaScript Style Guide

Install

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.

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

2.2.22

6 months ago

2.2.23

6 months ago

2.2.21

9 months ago

2.2.20

11 months ago

2.2.17

11 months ago

2.2.18

11 months ago

2.2.16

11 months ago

2.2.19

11 months ago

2.3.0

11 months ago

2.2.15

2 years ago

2.2.13

2 years ago

2.2.14

2 years ago

2.2.11

2 years ago

2.2.12

2 years ago

2.2.6

2 years ago

2.2.8

2 years ago

2.2.3

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago

2.2.2

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.4

2 years ago

2.1.3

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.0.5

2 years ago

2.1.0

2 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.1-alpha.2

3 years ago

2.0.1-alpha.0

3 years ago

2.0.1-alpha.1

3 years ago

2.0.0

3 years ago

2.0.0-alpha.0

3 years ago

1.0.18

3 years ago

1.0.18-alpha.0

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.16-alpha.0

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.11-alpha.0

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.3

3 years ago

0.1.4-alpha.0

3 years ago

0.1.3-alpha.0

3 years ago

0.1.2-alpha.0

3 years ago

0.1.1-alpha.0

3 years ago

0.1.0-alpha.0

3 years ago

0.0.9-alpha.0

3 years ago

0.0.8-alpha.0

3 years ago