Core Concepts
Architecture
Your app (web, mobile or backend) uses the SDK packages; the SDK talks to the Pollar API (control plane), which coordinates the Relay/Sponsor Service, Horizon/RPC and the Stellar network.
Developer App (Web / Mobile / Backend)
→ @pollar/core, @pollar/react, @pollar/react-native, pollar-kit UI
→ Pollar API / Control Plane
→ Relay / Sponsor Service → Signer Boundary
→ Horizon / RPC → Stellar Network + Soroban ContractsMain components
| Component | Role |
|---|---|
| @pollar/core | Shared logic: auth (Google, GitHub, Email OTP, Freighter, Albedo), wallet lifecycle, trustline orchestration, sponsorship rules, transaction preparation, Horizon queries via StellarClient. |
| @pollar/react | Provider, usePollar hook, WalletButton component, styles. |
| Pollar API | Per-tenant config, auth, API keys, wallet state, policies, analytics. |
| Relay / Sponsor Service | Builds and submits transactions that require server participation (sponsorship). |
| Horizon / RPC | Network state reads and transaction submission. |
Wallet lifecycle
Pollar treats wallet creation as a lifecycle:
- Unregistered — user has no session.
- Registered — user signs in (social or wallet).
- WalletCreated — SDK creates wallet metadata.
- PendingActivation (if
funding_mode = deferred) or Active (iffunding_mode = immediate). - Active — account is sponsored and active.
- TrustlineReady — required assets are enabled.
- ContractReady — app can submit operations or invoke contracts.
Why G-address first
Starting with G-addresses (classic accounts) solves the most urgent need: wallet creation, activation, trustlines, fee sponsorship and contract invocation readiness. Pollar does not assume every wallet will always be a G-address: the SDK and model support an address type. In v1 only G-addresses are created; the architecture is ready for C-address in the future.
On-chain vs off-chain
- On-chain: accounts, trustlines, sponsored reserves, sponsored fees, balances, transaction hashes, Soroban invocation results.
- Off-chain: API keys, per-tenant config, funding mode, activation queue, asset policies, analytics, wallet metadata, audit logs, dashboard.