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.
@drift-labs/snap-wallet-adapter
Advanced tools
A Solana Wallet Standard wallet adapter for the Connect by Drift MetaMask Snap.
This is a wallet adapter for the Connect by Drift MetaMask Snap that implements the Solana Wallet Standard. Installing and adding this snap to your application gives your users the ability to use MetaMask to interact with Solana!
The wallet adapter is locked to this version of the Connect by Drift snap.
To install:
npm install --save @drift-labs/snap-wallet-adapter
To use the adapter in your application, create a new wallet adapter using the SnapWalletAdapter
constructor that is exported from this package:
import { SnapWalletAdapter } from '@drift-labs/snap-wallet-adapter';
const driftSnapWalletAdapter = new SnapWalletAdapter();
To listen to events and connect, use the same interface as other Wallet Standard adapters:
driftSnapWalletAdapter.on('connect', handleConnect);
driftSnapWalletAdapter.on('disconnect', handleDisconnect);
driftSnapWalletAdapter.on('error', handleError);
await driftSnapWAlletAdapter.connet();
To display the name of the adapter and the icon you can use the icon and name properties of the wallet adapter instance (react example):
const jsx = (
<div>
<img src={driftSnapWalletAdapter.icon} />
{driftSnapWalletAdapter.name}
</div>
);
This allows the snap wallet adapter instance to be appended to an array of other Wallet Standard adapters, and seamlessly be displayed and interacted with without code changes.
The icon will display the MetaMask icon, and the name will disply as Connect by Drift
which is the name of the snap.
When the user connects to this wallet, MetaMask will open and either directly connect to the Connect by Drift snap, or will prompt the user to install the Connect by Drift snap if they haven't done so before.
FAQs
A Solana Wallet Standard wallet adapter for the Connect by Drift MetaMask Snap.
The npm package @drift-labs/snap-wallet-adapter receives a total of 120 weekly downloads. As such, @drift-labs/snap-wallet-adapter popularity was classified as not popular.
We found that @drift-labs/snap-wallet-adapter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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.