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()hookparams: 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()syncparams: No arguments — asset, amount and destination are picked inside the modal.
returns: void — opens the prebuilt modal; there is nothing to await.
txreactive valueparams: 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().
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> ); }