PollarPollarDemo

Products

AuthenticationWalletTransactions

Integrations

KYCSoonRampNewSwapNewEarnNew

Wallet Adapters

Stellar Wallets KitPrivyNew

Adapters

Trustless Work

Built with Pollar

LumenWipeNew
SendReceiveBalanceAssetsHistoryDistribution

Send

Transfer assets to another Stellar address. Pollar renders the asset picker, amount input, review and signing flow inside a modal.

Drop-in button that opens a prebuilt modal — asset picker, amount, review and the signing flow are all rendered for you.

openSendModal() takes no arguments — asset, amount and destination are picked inside the modal.

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.

  • openSendModal()sync

    params: No arguments — asset, amount and destination are picked inside the modal.

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

  • txreactive value

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

    returns: Re-renders your component as the payment builds, signs and submits. Mirrors getClient().getTransactionState().

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

export function SendButton() {
  const { openSendModal, isAuthenticated } = usePollar();

  // openSendModal renders the asset picker, amount, review
  // and signing flow — built on top of client.runTx('payment').
  return (
    <button
      onClick={openSendModal}
      disabled={!isAuthenticated}
    >
      Send
    </button>
  );
}