
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@agrotokenlabs/algorand-reader
Advanced tools
Algorand reader provides a set of functions to read the Algorand blockchain status. It allows to get balances, check opt-in, get nft metadata ARC-69 compliant and more.
Install the package
npm install algorand-reader
Most of the functions uses an Algodv2 client and an Indexer client, you could set up a sandbox or use an external provider.
// Algodv2 client using sandbox
const token = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
const server = 'http://localhost'
const port = 4001
const algodClient = new algosdk.Algodv2(token, server, port)
// Indexer client using sandbox
const token = ''
const server = 'http://localhost'
const port = 8980
const indexerClient = new algosdk.Indexer(token, server, port)
// Algodv2 client using a provider like AlgoNode on testnet
const token = ''
const server = 'https://testnet-api.algonode.cloud'
const port = 443
const client = new algosdk.Algodv2(token, server, port)
// Indexer client using a provider like AlgoNode on testnet
const token = ''
const server = 'https://testnet-idx.algonode.cloud'
const port = 443
const indexerClient = new algosdk.Indexer(token, server, port)
import * as reader from 'algorand-reader'
const address = 'SXPXEGTVZBIU56NDZC6HA3HZVHAD7CSYECQ2RIKYLMB6KOG43K7UBRGFPI'
const token = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
const server = 'http://localhost'
const port = 4001
const client = new algosdk.Algodv2(token, server, port)
// Check if an account is valid
await reader.validateAddress(address)
// Get balance in algos
await reader.getBalanceAlgos(client, address)
// Get balance in microalgos
await reader.getBalanceMicroalgos(client, address)
// Get min balance
await reader.getMinBalance(client, address)
const asaId = 113619241
// Get created asset by an account
await reader.getCreatedAssets(client, address)
// Get asa balance from an account
await reader.getAsaBalance(client, address, asaId)
// Check if the account is opted-in to an asa
await reader.isOptIn(client, address, asaId)
// Get circulating supply of an asa
await reader.getTokenCirculatingSupply(client, testId)
const token = ''
const server = 'http://localhost'
const port = 8980
const indexerClient = new algosdk.Indexer(token, server, port)
const nftId = 117345116
// Get metadata from the NFT
await reader.getAssetMetadata(indexerClient, nftId)
FAQs
An algorand reader for blockchain
We found that @agrotokenlabs/algorand-reader 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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.