
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
customizer-nft
Advanced tools
The Customizer NFT is a library for get all NFTs
Using npm:
$ npm i customizer-nft
import {useCustomizerNFT} from "customizer-nft";
function App() {
const [address, setAddress] = useState(null);
const [listNFTs, setListNFTs] = useState(null);
const {
isWalletInstalled,
eventChangeAccount,
getAllNFTs,
connectWallet,
} = useCustomizerNFT();
useEffect(() => {
isWalletInstalled().then(account => setAddress(account));
}, []);
useEffect(() => {
eventChangeAccount(setAddress);
}, []);
useEffect(() => {
getAllNFTs(address).then(NFTs => setListNFTs(NFTs));
}, [address]);
const handleConnectWallet = () => {
connectWallet().then(r => setAddress(r));
};
return (
<div className="App">
<button onClick={handleConnectWallet}>Connect Wallet</button>
<div className="list">
{
listNFTs !== null ? listNFTs.map((nft, index) => {
return <img src={nft}/>
}) : null
}
</div>
</div>
);
}
export default App;
returns object with all functions
const {
isWalletInstalled,
eventChangeAccount,
getAllNFTs,
connectWallet,
} = useCustomizerNFT();
check if wallet is installed and connected
useEffect(() => {
isWalletInstalled().then(account => setAddress(account));
}, []);
check if user changed account in metamask
useEffect(() => {
eventChangeAccount(setAddress);
}, []);
Parameter | Type | Description |
---|---|---|
dispatch | Dispatch<SetStateAction<string>> | Required. Set address state |
get all NFTs used user address and return array with images link
useEffect(() => {
getAllNFTs(address).then(NFTs => setListNFTs(NFTs));
}, [address]);
Parameter | Type | Description |
---|---|---|
address | string | Required. user address from metamask |
net | mainnet testnet | Not Required. Default state is mainnet, looking for all nfts in mainnet. Second state is testnet looking for nfts in testnet |
formatsFilter | string[] | Not Required. Default is []. Filter with image format. Example ['.png', '.svg', '.jpg'] |
limit | number | Not Required. Default is 200 and this max value. Get 200 nfts from account for 1 request. If user has more than limit, make requests after not get all nfts from account |
connect wallet after click button event
const handleConnectWallet = () => {
connectWallet().then(r => setAddress(r));
};
FAQs
customizer nft
The npm package customizer-nft receives a total of 0 weekly downloads. As such, customizer-nft popularity was classified as not popular.
We found that customizer-nft demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.