0.3.0 • Published 1 year ago

myria-wallet-provider v0.3.0

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

1 year ago

0.2.0

1 year ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.0

2 years ago

0.1.1

2 years ago