You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP โ†’
Socket
Socket
Sign inDemoInstall

@walletconnect/modal

Package Overview
Dependencies
Maintainers
10
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@walletconnect/modal

#### ๐Ÿ”Ž [Examples](https://github.com/WalletConnect/web3modal-examples)


Version published
Weekly downloads
226K
decreased by-2.61%
Maintainers
10
Created
Weekly downloads
ย 

Package description

What is @walletconnect/modal?

@walletconnect/modal is an npm package that provides a modal interface for connecting to WalletConnect-compatible wallets. It simplifies the process of integrating WalletConnect into web applications by offering a user-friendly modal for wallet selection and connection.

What are @walletconnect/modal's main functionalities?

Initialize WalletConnect Modal

This code initializes the WalletConnect modal with the necessary configuration options such as project ID and relay URL.

const WalletConnectModal = require('@walletconnect/modal');
const walletConnectModal = new WalletConnectModal({
  projectId: 'your_project_id',
  relayUrl: 'wss://relay.walletconnect.org'
});

Open WalletConnect Modal

This code opens the WalletConnect modal, allowing users to select and connect their wallet.

walletConnectModal.open();

Handle Wallet Connection

This code sets up an event listener to handle the wallet connection event, logging the connected accounts and chain ID.

walletConnectModal.on('connect', (error, payload) => {
  if (error) {
    throw error;
  }
  const { accounts, chainId } = payload.params[0];
  console.log('Connected accounts:', accounts);
  console.log('Connected chainId:', chainId);
});

Other packages similar to @walletconnect/modal

Readme

Source
๐Ÿ“š Documentation
๐Ÿ”Ž Examples
๐Ÿงช Laboratory

WalletConnect Modal

Simplest and most minimal way to implement ui for WalletConnect.

Development

Please follow developer docs to set up WalletConnect Modal locally.

Keywords

FAQs

Package last updated on 11 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc