What is @walletconnect/modal-core?
@walletconnect/modal-core is a package that provides core functionalities for integrating WalletConnect modals into your web applications. It allows users to connect their cryptocurrency wallets to your application using a modal interface.
What are @walletconnect/modal-core's main functionalities?
Initialize WalletConnect Modal
This feature allows you to initialize the WalletConnect modal with your project ID and relay URL. This is the first step in setting up the modal for use in your application.
const WalletConnectModal = require('@walletconnect/modal-core');
const modal = new WalletConnectModal({
projectId: 'your_project_id',
relayUrl: 'wss://relay.walletconnect.org'
});
Open WalletConnect Modal
This feature allows you to open the WalletConnect modal, enabling users to select and connect their wallets.
modal.open();
Handle WalletConnect Session
This feature allows you to handle session updates from WalletConnect. You can listen for session updates and handle them accordingly in your application.
modal.on('session_update', (session) => {
console.log('Session updated:', session);
});
Other packages similar to @walletconnect/modal-core
web3modal
Web3Modal is a library that allows you to connect to various wallet providers in a simple and customizable way. It provides a modal interface similar to @walletconnect/modal-core but supports a wider range of wallet providers.
fortmatic
Fortmatic is a package that allows users to connect to your application using their phone number or email. It provides a different approach to wallet connection compared to @walletconnect/modal-core, focusing on ease of use and accessibility.
torus
Torus is a user-friendly wallet solution that allows users to log in using their social accounts. It provides a seamless experience for users who may not be familiar with traditional cryptocurrency wallets, offering an alternative to the modal-based approach of @walletconnect/modal-core.
@walletconnect/modal-core