Build
ONCHAIN STORAGE
SDK
API
getLoadedBalance()

irys.getLoadedBalance()

Returns the connected wallet's balance.

Returns

Type
Description
BigNumber
Wallet balance in atomic units. You can convert it into standard units using irys.utils.fromAtomic().

Example

const irys = await getIrys();
 
// Get loaded balance in atomic units
const atomicBalance = await irys.getLoadedBalance();
console.log(`Node balance (atomic units) = ${atomicBalance}`);
 
// Convert balance to standard
const convertedBalance = irys.utils.fromAtomic(atomicBalance);
console.log(`Node balance (converted) = ${convertedBalance}`);