3.4.2 • Published 11 months ago

yours-wallet-provider v3.4.2

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

Yours Wallet Provider 🌱

A React provider to make interactions with Yours Wallet a breeze.

Description

The Yours Wallet Provider simplifies the process of integrating Yours Wallet into your react application by creating a provider that wraps your application.

For detailed instructions on integration and all available methods, be sure to check out the Provider API Docs.

Installation

Install the package using npm:

npm install yours-wallet-provider

Usage

Setup the Provider

First, wrap your application with the YoursProvider.

//... other imports
import { YoursProvider } from "yours-wallet-provider";

const root = ReactDOM.createRoot(
  document.getElementById("root") as HTMLElement
);
root.render(
  <YoursProvider>
    <App />
  </YoursProvider>
);

Use the Wallet Hook

You can now use the useYoursWallet hook to interact with the wallet.

import { useYoursWallet } from 'yours-wallet-provider';

function YourComponent() {
  const wallet = useYoursWallet();
  const isReady = wallet.isReady;
  console.log(isReady);
  // true

  return (
    // Your TSX
  );
}

Use the Yours.org Icon

You can also import the YoursIcon for use in your project.

import { YoursIcon } from "yours-wallet-provider";

function YourComponent() {
  return (
    <div>
      <YoursIcon size="32px" />
    </div>
  );
}
3.3.6

11 months ago

3.4.0

11 months ago

3.2.2

1 year ago

3.2.1

1 year ago

3.2.0

1 year ago

3.3.5

11 months ago

3.3.4

11 months ago

3.4.2

11 months ago

3.2.4

12 months ago

3.4.1

11 months ago

3.2.3

12 months ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.1.6

1 year ago

3.0.6

1 year ago

3.0.5

1 year ago

2.4.7

1 year ago

2.4.6

1 year ago

3.0.0

1 year ago

2.5.0

1 year ago

2.4.1

1 year ago

2.5.2

1 year ago

2.4.3

1 year ago

2.5.1

1 year ago

2.4.2

1 year ago

2.4.5

1 year ago

2.5.3

1 year ago

2.4.4

1 year ago

2.4.0

1 year ago