Last updated 1 year ago
Fetch the balance of the current account.
This API may not be available on all providers.
async function getBalance(): BalanceResponse;
type BalanceResponse = { balance: number; currency?: "sats" | "EUR" | "USD" }
Code Example
await webln.enable(); const result = await webln.getBalance();
Demo