Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@walletconnect/modal
Advanced tools
#### ๐ [Examples](https://github.com/WalletConnect/web3modal-examples)
@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.
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);
});
Web3Modal is a popular library for connecting to various wallet providers in a web application. It offers a modal interface similar to @walletconnect/modal but supports a wider range of wallet providers beyond WalletConnect-compatible wallets.
Torus provides a simple and user-friendly way to integrate blockchain wallets into web applications. It offers a seamless login experience using OAuth providers like Google and Facebook, making it easier for users to get started with blockchain applications.
Fortmatic is a wallet provider that allows users to log in using their phone number or email. It offers a straightforward integration process and a user-friendly interface, making it a good alternative to WalletConnect for certain use cases.
Simplest and most minimal way to implement ui for WalletConnect.
Please follow developer docs to set up WalletConnect Modal locally.
FAQs
#### ๐ [Examples](https://github.com/WalletConnect/web3modal-examples)
We found that @walletconnect/modal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 12 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.