0.3.0 • Published 3 years ago

myria-wallet-provider v0.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Installation

npm install myria-wallet-provider

Usages

  • Create an instance of WalletClient
import { WalletClient } from 'myria-wallet-provider';

const walletClient = new WalletClient();
  • Connect wallet
const Component = () => {
  const handleConnect = () => {
    try {
      const data = walletClient.connect();
      // handle data
    } catch (e) {
      // handle error
    }
  };
  return <button> Connect </button>;
};

By default, it will create a popup (new window) to connect, if the you want to embed an iframe instead, create an WalletClient instance with iframeOptions:

import { WalletClient } from 'myria-wallet-provider';

const walletClient = new WalletClient({
  iframeOptions: {
    containerSelector: '#__next',
  },
});
0.3.0

3 years ago

0.2.0

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.0

3 years ago

0.1.1

3 years ago