PollarPollarDemo

Products

WalletTransactionsSessionsDistribution

Integrations

KYCSoonRampNewSwapNew

Wallet Adapters

Stellar Wallets KitPrivyNewAcceslySoon

Built with Pollar

Trustless WorkNiriumNewLumenWipeNew
WalletTransactionsSessionsDistributionKYCSoonRampNewSwapNewStellar Wallets KitPrivyNewAcceslySoonTrustless WorkNiriumNewLumenWipeNew
SendReceiveBalanceAssetsHistory

Receive

Show the connected wallet's address and QR code so others can send funds to it. Pollar renders the whole view inside a modal.

Drop-in button that opens a prebuilt modal showing the connected wallet's address and a QR code.

openReceiveModal() takes no arguments — it reads the connected wallet address from context.

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.

  • openReceiveModal()sync

    params: No arguments — it reads the connected wallet address from context.

    returns: void — opens the prebuilt modal with the address and QR code.

  • walletreactive value

    params: Not a function — a WalletInfo object read from usePollar(), or null when not connected.

    returns: The connected wallet (wallet.address holds the public key, wallet.custody/provider its type); re-renders when the session changes.

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

export function ReceiveButton() {
  const { openReceiveModal, isAuthenticated } = usePollar();

  // openReceiveModal reads the wallet address from context and
  // renders the address + QR for you.
  return (
    <button
      onClick={openReceiveModal}
      disabled={!isAuthenticated}
    >
      Receive
    </button>
  );
}