
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.
@zeitgeistpm/avatara-react
Advanced tools
This package contains react components and utility hooks for rendering the zeitgeist rmrk2 avatar and managing its equipment.
This package contains react components and utility hooks for rendering the zeitgeist rmrk2 avatar and managing its equipment.
Render the zeitgeist avatar
import { AvatarContext, ZeitgeistAvatar } from "@zeitgeistpm/avatara-react"
const App = () => (
<AvatarContext.Provider>
<Component />
</AvatarContext.Provider>
)
const Component = () => (
<ZeitgeistAvatar
address={"3H7sh...Dj2jS"}
size={44}
copy={true} // optional, default = true, copy address on click polkadot style.
zoomed={false} // optional, default = false, set to true when rendering very small avatar.
fallback={<GenericAvatar />} // optional
loader={<Spinner />} // optional
onClick={clickedAvatar} // optional
/>
)
Hook to manage equipment for the avatar. Can accept items/badges when they are earned, preview items in inventory and commit a new set of equippment.
import { AvatarContext, ZeitgeistAvatar, useInventoryManagement } from "@zeitgeistpm/avatara-react"
const App = () => (
<AvatarContext.Provider>
<InventoryManagement />
</AvatarContext.Provider>
)
const InventoryManagement = () => {
const sdkContext = useAvatarContext()
const inventory = useInventoryManagement(selectedAddress)
return (
<div>
<ZeitgeistAvatar
address={"3H7sh...Dj2jS"}
size={196}
layoutPreview={inventory.layout} // will preview selected items
/>
<div>
<h2>Inventory.</h2>
{
inventory.items.accepted.map((item) => (
<Item
item={item}
checked={inventory.hasSelected(item)}
onCheck={(checked) => {
if(checked) {
inventory.select(item)
}
else {
inventory.unselect(item)
}
}}
loading={inventory.isAccepting(item)}
/>
))
}
</div>
<div>
<h2>Pending items!</h2>
{
inventory.items.pending.map((item) => (
<PendingItem
item={item}
onClickAccept={() => inventory.accept(item)}
loading={inventory.isAccepting(item)}
/>
))
}
</div>
<button
onClick={() => {() => inventory.commit()}
disabled={inventory.comitting}
>
Commit equipment changes.
</button>
</div>
)
}
FAQs
This package contains react components and utility hooks for rendering the zeitgeist rmrk2 avatar and managing its equipment.
We found that @zeitgeistpm/avatara-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
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.