PollarPollarDemo

Products

WalletTransactionsSessionsDistribution

Integrations

KYCSoonRampNewSwapNew

Wallet Adapters

Stellar Wallets KitPrivyNewAcceslySoon

Built with Pollar

Trustless WorkNiriumNewLumenWipeNew
WalletTransactionsSessionsDistributionKYCSoonRampNewSwapNewStellar Wallets KitPrivyNewAcceslySoonTrustless WorkNiriumNewLumenWipeNew
OverviewSetup

Privy adapter

Add email / Google login backed by a Privy embedded Stellar wallet as a Pollar wallet adapter.

With @pollar/react, mount <PrivyAdapterProvider> above <PollarProvider> — it wires Privy's hooks into the adapter — and register the same adapter in walletAdapters. Pollar's login modal then renders Privy's email/Google sub-modal.

Notes

  • Privy is React / React Native only — the adapter is inert until <PrivyAdapterProvider> (web) or the Expo provider (RN) mounts. There is no headless @pollar/core host for it.
  • loginMethods is a narrow subset Pollar drives: email, google, github.
  • The embedded Stellar wallet is created automatically on first login — no separate create-wallet step.
  • Use the SAME adapter instance for <PrivyAdapterProvider adapter> and the client's walletAdapters.
terminal
pnpm add @pollar/privy-adapter
@pollar/react— hooks & components
import { PollarProvider } from '@pollar/react';
import {
  createPrivyAdapter,
  PrivyAdapterProvider,
} from '@pollar/privy-adapter';

// Same instance for the bridge and the client's walletAdapters.
const privy = createPrivyAdapter({
  appId: 'your-privy-app-id',
  loginMethods: ['email', 'google'],
  meta: { label: 'Privy' },
});

export function Providers({ children }: { children: React.ReactNode }) {
  return (
    // Mounts Privy + the runtime bridge; place it above PollarProvider.
    <PrivyAdapterProvider adapter={privy}>
      <PollarProvider
        client={{
          apiKey: 'pub_testnet_…',
          stellarNetwork: 'testnet',
          walletAdapters: [privy],
        }}
      >
        {children}
      </PollarProvider>
    </PrivyAdapterProvider>
  );
}

// usePollar().login({ provider: 'privy' }) opens Privy's email/Google sub-modal.