@beastmankojak/cip-30-wallet-connector

1.0.2 • Public • Published

Example

    <script src="dist/main.js"></script>
    <script>
      (async () => {
        // Create an instance of the wallet class
        const nami = new cip30.wallet(
          await cip30.getSerializationLib(), // Dynamically load the web assembly serialization lib
          window.cardano?.nami, // The wallet extension api lives on the window.cardano object
        );

        const enabled = await nami.isEnabled();
        console.log(enabled);

        // This will pop the nami window that requests connection if it's not already connected
        await nami.enable();

        // This will grab the wallet address and write it to the conosle
        console.log('address:', await nami.getAddress());
      })();
    </script>

How to build

This project has been created using webpack-cli, you can now run

npm run build

or

yarn build

to bundle your application

Readme

Keywords

none

Package Sidebar

Install

npm i @beastmankojak/cip-30-wallet-connector

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

1.81 MB

Total Files

6

Last publish

Collaborators

  • beastmankojak