PollarPollarDemo

Products

WalletTransactionsSessionsDistribution

Integrations

KYCSoonRampNewSwapNew

Wallet Adapters

Stellar Wallets KitPrivyNewAcceslySoon

Built with Pollar

Trustless WorkNiriumNewLumenWipeNew
WalletTransactionsSessionsDistributionKYCSoonRampNewSwapNewStellar Wallets KitPrivyNewAcceslySoonTrustless WorkNiriumNewLumenWipeNew
SendReceiveBalanceAssetsHistory

Balance

Read a Stellar account's balances — the connected wallet's, or any address by public key.

Drop-in button that opens a prebuilt modal showing the connected wallet's balances, fully rendered.

openWalletBalanceModal() takes no arguments — it reads the connected wallet and renders the table for you.

Hook & values used

All of these come from the usePollar() hook — the react layer built on top of getClient().

  • usePollar()hook

    params: No arguments. Call it at the top level of a component — it reads React context, so it must run during render.

    returns: PollarContextValue — the whole SDK surface: reactive state values, modal openers, and getClient() to drop down to core.

  • openWalletBalanceModal()sync

    params: No arguments — it reads the connected wallet and renders the balances table inside the modal.

    returns: void — opens the prebuilt modal; there is nothing to await.

  • walletBalancereactive value

    params: Not a function — a value of type WalletBalanceState read from usePollar().

    returns: Re-renders your component whenever it changes. Mirrors getClient().getWalletBalanceState(): step plus data when loaded.

@pollar/react— hooks & components
import { usePollar } from '@pollar/react';

export function BalanceButton() {
  const { openWalletBalanceModal, isAuthenticated } = usePollar();

  // openWalletBalanceModal renders the connected wallet's
  // balances inside a modal — built on top of client.refreshBalance().
  return (
    <button
      onClick={openWalletBalanceModal}
      disabled={!isAuthenticated}
    >
      Balance
    </button>
  );
}
walletBalance.stepidle

Submit a request to load balances.