Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@metamask/assets-controllers
Advanced tools
Controllers which manage interactions involving ERC-20, ERC-721, and ERC-1155 tokens (including NFTs)
@metamask/assets-controllers
Controllers which manage interactions involving ERC-20, ERC-721, and ERC-1155 tokens (including NFTs).
yarn add @metamask/assets-controllers
or
npm install @metamask/assets-controllers
This package features the following controllers:
RatesController
and CurrencyRateController
is that the second one is coupled to the NetworksController
and is EVM specific, whilst the first one can handle different blockchain currencies like BTC and SOL.RatesController
The RatesController
is responsible for managing the state related to cryptocurrency exchange rates and periodically updating these rates by fetching new data from an external API.
// Initialize the RatesController
const ratesController = new RatesController({
interval: 180000,
includeUsdRate: true,
state: {
fiatCurrency: 'eur',
cryptocurrencies: [Cryptocurrency.Btc],
},
});
// Start the polling process
ratesController.start().then(() => {
console.log('Polling for exchange rates has started.');
});
// Stop the polling process after some time
setTimeout(() => {
ratesController.stop().then(() => {
console.log('Polling for exchange rates has stopped.');
});
}, 300000);
This package is part of a monorepo. Instructions for contributing can be found in the monorepo README.
FAQs
Controllers which manage interactions involving ERC-20, ERC-721, and ERC-1155 tokens (including NFTs)
The npm package @metamask/assets-controllers receives a total of 2,439 weekly downloads. As such, @metamask/assets-controllers popularity was classified as popular.
We found that @metamask/assets-controllers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.