Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@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 3,100 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 0 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.