Get started with arkane-connect CDN

MIT licensed

Arkane-Connect: Secure JS link to Arkanes auth services.

Tags:
  • arkane

Stable version

Copied!

How to start using arkane-connect CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with arkane-connect CDN - cdnhub.io</title>
    <script src="https://cdn.cdnhub.io/arkane-connect/1.27.0/connect.js"></script>
</head>
<body>
    <button id="connect-button">Connect Wallet</button>

    <script>
      const connectButton = document.getElementById('connect-button');

      if (window.Arkane) {
        window.Arkane.init((wallet) => {
          connectButton.innerText = 'Connected';
          connectButton.disabled = true;
          console.log('Connected wallet:', wallet);
        });
      } else {
        connectButton.addEventListener('click', async () => {
          try {
            const wallet = await window.Arkane.connect();
            connectButton.innerText = 'Connected';
            connectButton.disabled = true;
            console.log('Connected wallet:', wallet);
          } catch (error) {
            console.error('Error connecting wallet:', error);
          }
        });
      }
    </script>
  </body>
</html>
Copied!
Copied!

All versions