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.
asset-tracker
Advanced tools
Asset tracker is a one-stop library for the user to track their assets and holdings across multiple EVM and Non EVM chains.
This library will be updated continuously with more and more chain support and increasing granularity of data.
Install the library by running the command,
npm install --save asset-tracker
Import the library into your project using,
const assetTracker = require('asset-tracker');
This library comes with 2 different classes.
One is EVM
and other is nonEVM
with each class catering to their own set of chains and functionality.
// Initialize the EVM class
const tracker = new assetTracker.EVM(evmChain);
// Initialize the non EVM class
const tracker = new assetTracker.nonEVM(nonEvmChain);
Get Native Asset Balance
Returns the native asset balance of the initialized chain.
const nativeAssetbalance = await tracker.getNativeAssetBalance(address);
address
(required) - Address for which the native asset balance is to be fetched. Can be a contract address or an EOA.Discover Fungible Assets
Scans the address for any fungible asset balances and returns the same.
const fungibleAssets = await tracker.discoverFungibleAssets(address);
address
(required) - Address for which the list of fungible assets is to be checked.Discover Non Fungible Assets (NFTs)
Scans the address for any non fungible assets and returns the same.
const nonFungibleAssets = await tracker.discoverNonFungibleAssets(address);
address
(required) - Address for which the list of non fungible assets is to be checked.Get the list of transactions
Returns the list of transactions for the specified address. The function also accepts an option parameter type
which accepts the values incoming
or outgoing
to filter out the transactions.
const transactions = await tracker.getTransactions({ address, page, limit, type });
address
(required) - Address for which the list of transactions is to be fetched.page
(required) - Page number for pagination.limit
(required) - Number of results to be returned in every page for pagination.type
(optional. default = all
) - Parameter to filter out the incoming
or outgoing
transactions. Defaults to all
.Get the token details for a particular fungible token address
Returns the basic info about a particular fungible asset.
const fungibleAssetInfo = await tracker.getFungibleTokenDetails(contractAddress);
contractAddress
(required) - Contract address of the fungible token.Get the token details for a particular non fungible (NFT) token address
Returns the basic info about a particular non fungible asset.
const nonFungibleAssetInfo = await tracker.getNFTDetails(contractAddress);
contractAddress
(required) - Contract address of the non fungible token.Switch Chains
Switch between different supported chains. Once the chain is switched, all the subsequent functions will work for this new chain.
switchChain(chainName);
chainName
(required) - Name of the new chain to be switched.Note
Please note that currently, this library only supports EVM chains. Will soon be adding support for non EVM chains.
1.0.0 (16-10-2022)
Users can track their assets across supported EVM chains.
Functionalities included :
getNativeAssetBalance(address)
- Get the Native asset balance for an address on a particular chain.discoverFungibleAssets(address)
- Discover the fungible assets for an address on a particular chain.discoverNonFungibleAssets(address)
- Discover the non-fungible assets for an address on a particular chain.getTransactions({ address, page, limit, type })
- Discover the list of transactions for an address on a particular chain.getFungibleTokenDetails(contractAddress)
- Get the details for a particular fungible token from the contract.getNFTDetails(contractAddress)
- Get the details for a particular non fungible token from the contract.switchChain(chainName)
- Functionality to switch between the supported chains.FAQs
Asset tracker to track all your multichain assets.
The npm package asset-tracker receives a total of 0 weekly downloads. As such, asset-tracker popularity was classified as not popular.
We found that asset-tracker 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
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.