npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

polar-auth-monorepo

v0.11.2

Published

Official SDK monorepo for [Pollar](https://pollar.xyz) — authentication and transaction infrastructure for Stellar and Solana applications.

Readme

@pollar

Official SDK monorepo for Pollar — authentication and transaction infrastructure for Stellar and Solana applications.

This repository is managed with Turborepo and contains the following published packages.


Packages

0.11.2 is additive (no breaking changes). New client.stellar namespace: sign SEP-53 message and SEP-10 challenge ownership proofs across custodial and external wallets, both returning the same sep53 scheme so a verifier treats them alike. The Transaction History modal goes multichain (network picker, per-chain explorer links, unified { amount, unit } fees), and the Freighter adapter runs on @stellar/freighter-api 6.0.0.

Latest break — 0.11.1: WalletBalanceRecord.balance and .available are string | null — null means the chain could not be read and must render as unavailable, never as 0. Every chain reports its native coin plus each token the app enabled (0.11.0 reported only the native token off Stellar). @pollar/react gained a network picker (<ChainSelect>) that scopes the wallet-balance, enabled-assets, send and receive modals to one chain instead of tagging every row.

Earlier breaks worth knowing before you jump versions: 0.11.0 moved every request to the /v2 API and went multichain (Solana joins Stellar). 0.10.0 replaced the singular walletAdapter resolver and loginWallet(id) with a walletAdapters: WalletAdapter[] array (login({ provider: id })), and forced every user to re-authenticate once.

Read UPGRADE.md for the migration steps and the CHANGELOG for the full version history before upgrading.

@pollar/core

Version: 0.11.2  |  Registry: npm

Framework-agnostic TypeScript SDK. Provides the PollarClient class and all lower-level utilities needed to integrate Pollar authentication and multichain (Stellar + Solana) transactions into any JavaScript environment.

Key features:

  • Authentication via Google, GitHub, Email OTP, Stellar wallets (Freighter, Albedo), and Solana wallets (Phantom, Solflare, Backpack)
  • DPoP-bound access + refresh tokens (RFC 9449) — stolen tokens are useless without the per-session keypair. Web keypair is non-extractable; React Native keypair lives in Keychain / EncryptedSharedPreferences
  • Pluggable Storage adapter — autodetects localStorage on web with in-memory fallback; first-class adapters for Expo SecureStore and react-native-keychain shipped as sub-path exports
  • Pluggable KeyManager — WebCryptoKeyManager (browsers) or NobleKeyManager (RN) with autodetection
  • Race-safe client.refresh() — concurrent 401 retries coalesce into one refresh; auto-retry on 401 with DPoP-Nonce rotation
  • Stellar transaction building and submission through the Pollar API; balances via refreshBalance() / getWalletBalance() on PollarClient
  • Multichain (Stellar + Solana) - v2 wallet balances are tagged by chain, and every chain reports its native coin plus each token the app enabled. A balance is null when the chain could not be read, which must render as unavailable rather than as zero. Login supports Sign In With Solana (SIWS) and the SDK signs Solana transactions for sponsored external transfers. Solana external-wallet connect ships via @pollar/solana-wallet-standard-adapter
  • Real-time state management with a typed event system (onAuthStateChange)
  • Multi-venue swaps - getSwapQuote() ranks routes across SDEX / Soroswap / Aquarius; swap() sets the trustline and executes through the standard tx pipeline with on-chain minReceived slippage. All three venues execute; which ones an app offers is driven by its per-app GET /swap/config
  • Earn (yield + lending) - getEarnProviders() / getEarnOpportunities() / getEarnPosition() / earnDeposit() / earnWithdraw() unify DeFindex vaults and Blend pools behind one provider-selected API, each opportunity carrying its live APY
  • SEP-24 on/off-ramps - anchor deposit/withdraw interactive flow via the ramps endpoints
  • Account creation - createAccount() puts an external wallet's classic account on-chain via a sponsored createAccount; the wallet surfaces existsOnStellar + fundingMode
  • Sponsored trustlines - setTrustline lets the app config decide who pays (server-side): custodial wallets hit the sponsored/self-pay trustline endpoint, external wallets co-sign whichever XDR the server returns. Pass skipSponsorship to force the user's own wallet to pay via change_trust
  • Stellar ownership proofs (SEP-53 / SEP-10) - client.stellar.sep53.signMessage() and client.stellar.sep10.sign() prove wallet ownership to a verifier. External wallets sign client-side via their adapter, custodial wallets sign server-side, and both return the same sep53 scheme
  • Network resilience - per-request timeout (default 10s) and idempotent-request retry; typed PollarNetworkError
  • KYC verification flow - provider selection, session start, and status polling
  • Transaction history - paginated fetch with status tracking
  • Built-in wallet adapters (FreighterAdapter, AlbedoAdapter) plus a walletAdapters: WalletAdapter[] array for external wallet stacks (each adapter auto-renders as a login entry and overrides a built-in by its type)
  • AdapterFn, PollarAdapter, and PollarAdapters types — generic adapter contract for custom signing flows (e.g. Trustless Work SDK)
  • Active-session management — listSessions() / revokeSession(familyId) / logoutEverywhere() against the refresh-token family on the server
  • getUserProfile() for in-memory PII access; destroy() to tear down the client cleanly
  • Full TypeScript typings, ships with ESM and CJS builds
npm install @pollar/core

Web (no extra setup):

import { PollarClient } from '@pollar/core';

const client = new PollarClient({ apiKey: 'pk_...' });

Expo / React Native:

import 'react-native-get-random-values'; // at app entry
import { PollarClient } from '@pollar/core';
import { createSecureStoreAdapter } from '@pollar/core/adapters/expo';

const storage = await createSecureStoreAdapter();
const client = new PollarClient({ apiKey: 'pk_...', storage });

HTTPS is required — DPoP needs SubtleCrypto and crypto.randomUUID, both secure-context only.


@pollar/react

Version: 0.11.2  |  Registry: npm

React bindings built on top of @pollar/core. Provides a context provider, hook, and pre-built UI components for drop-in authentication in React applications.

Key features:

  • <PollarProvider> — wraps your app and initialises the Pollar client; accepts adapters for custom signing flows
  • usePollar() — hook exposing session state, login, logout, balances, transaction/history state, and modal entry points
  • <WalletButton> — ready-made button that opens the authentication modal; dropdown includes Send, Receive, balance, and tx history; shows an inline spinner during in-progress transactions
  • <SendModal> — full send flow in a single modal: asset picker, amount input, destination address, and inline transaction status (build → sign → success/error)
  • <ReceiveModal> — displays the connected wallet address as a QR code with copy-to-clipboard; no external QR dependency required
  • <SwapModal> - multi-venue swap UI over the core swap API, with a route selector across venues and paste-a-custom-token
  • <EarnModal> - deposit/withdraw across DeFindex vaults and Blend pools, with live APY, wallet balance, over-spend guards, and auto-trustline on deposit; usePollar() mirrors the earn methods
  • <RampWidget> - SEP-24 buy/sell flow wired to the core ramps endpoints (external wallets sign the pending XDR inline)
  • <KycModal> - identity verification flow with provider selection and status polling (UI preview - backend coming soon)
  • <TxHistoryModal> — paginated multichain transaction history viewer with auto-fetch on open, a network picker that filters server-side, per-chain explorer links (stellar.expert for Stellar, explorer.solana.com for Solana), and the unified { amount, unit } fee per row
  • <WalletBalanceModal> — multichain wallet balances (Stellar, Polygon, Solana): a <ChainSelect> picks the network and the rows are scoped to it; an unreadable chain shows a dash, never 0
  • <EnabledAssetsModal> — the app's dashboard-enabled assets for the network picked in the header, with per-asset trustline state; establish/remove trustlines (Stellar only — other chains are informational)
  • <DistributionRulesModal> — manage the wallet's distribution rules
  • <ChainSelect> — the shared network picker, exported alongside chainsOf() / addressForChain() / resolveChain() so you can drive the templates that take chains / selectedChain / onSelectChain yourself
  • useChains() — the recommended hook for the app's configured chain order and primary address (returns { chains, primaryChain, primaryAddress, ready }); what the built-in wallet button and pickers read from
  • <SessionsModal> — drop-in active-sessions UI: lists every refresh-token family for the current user, per-row revoke, and a "Sign out everywhere" button
  • createPollarAdapterHook(key) — factory for fully-typed hooks that wrap custom adapters with automatic XDR signing
  • Template components for every modal — pure presentational layer for fully custom UIs
  • Bundled stylesheet (@pollar/react/styles.css) with pollar- namespaced class names
  • Peer dependency on React >= 18
npm install @pollar/react @pollar/core

@pollar/privy-adapter

Version: 0.11.2  |  Registry: npm

Client-side Privy wallet adapter for @pollar/core. It drives the whole Privy flow itself - email / Google / GitHub login, creating the user's Privy embedded wallet (Stellar or Solana), and raw-hash signing - then hands the signature to Pollar for the standard SEP-10 (Stellar) or SIWS (Solana) login + transaction flow. Self-driving: you configure it once and register it in walletAdapters, you do not wire up Privy's hooks yourself.

Key features:

  • createPrivyAdapter(config) + <PrivyAdapterProvider> - a WalletAdapter plus interactive-login methods the Pollar login modal drives (renders a Privy button and sub-modal for the configured loginMethods)
  • Web and React Native / Expo - the right build is picked automatically (@privy-io/react-auth on web, @privy-io/expo on RN); a non-React host fails fast with PrivyAdapterUnsupportedError
  • Auto-sync host login (onProviderAuthChange) that recovers web OAuth redirects and persisted Privy sessions; optional cleanupOAuthRedirect and debug logging
  • For server-side custody instead, use @pollar/privy-server-adapter below
npm install @pollar/privy-adapter @pollar/core @stellar/stellar-sdk @privy-io/react-auth react react-dom

@pollar/privy-server-adapter

Version: 0.11.2  |  Registry: npm

Server-side Privy adapter. A stateless HTTP proxy that lets Pollar sign Stellar or Solana transactions through your Privy server-wallet account without your PRIVY_APP_SECRET ever leaving your infrastructure. You run it in your own backend and point Pollar at its URL. (Formerly published as @pollar/privy-adapter, before the client-side rewrite took that name.)

Key features:

  • createPollarPrivyAdapter(config) - boots a Hono server (default port 3001) exposing POST /wallets/create, POST /wallets/sign, GET /wallets/:userId/address, and GET /health. Returns { start, stop } for lifecycle control
  • Async getCredentials() resolver so any secret manager (AWS Secrets Manager, GCP Secret Manager, Vault) works; cached for 5 min by default and rebuilt automatically on rotation
  • Bearer auth on /wallets/* using constant-time comparison (crypto.timingSafeEqual)
  • Configurable body-size cap (maxBodyBytes, default 64 KiB) and per-request timeout (requestTimeoutMs, default 10 s)
  • Per-userId wallet-address LRU cache (1000 entries, 10 min TTL) - no persistent state
  • Operation allowlist - optional allowedOperations / restrictToTrustlines cap what /wallets/sign will sign; disallowed transactions are rejected with TX_OPERATION_NOT_ALLOWED (403) before any Privy round-trip
  • Server-side only (Node 20+); do not import it in a client bundle
npm install @pollar/privy-server-adapter

@pollar/accesly-adapter

Version: 0.11.2  |  Registry: npm

Client-side Accesly smart-account wallet adapter for @pollar/core. Signs Stellar transactions with a user's Accesly C-address (passkey + MPC) smart wallet, client-side.

Key features:

  • createAcceslyAdapter({ address, signXdr, meta? }) - wraps an Accesly session (useAccesly from @accesly/react) as a Pollar WalletAdapter; renders as an accesly login entry (login({ provider: 'accesly' }))
npm install @pollar/accesly-adapter @pollar/core @accesly/react @accesly/core

@pollar/stellar-wallets-kit-adapter

Version: 0.11.2  |  Registry: npm

Plugs Stellar Wallets Kit into Pollar as a set of wallet adapters, without @pollar/core having to depend on the kit. One install gives Pollar access to every wallet module the kit supports - Freighter, Albedo, xBull, Lobstr, Rabet, Hana, Bitget, OneKey, Klever, Fordefi, CactusLink, HotWallet, plus Ledger / Trezor / WalletConnect via opt-in.

Key features:

  • stellarWalletsKitAdapters(options?) - factory that returns a WalletAdapter[] you pass to PollarClientConfig.walletAdapters (one adapter per module)
  • StellarWalletsKitAdapter - direct WalletAdapter implementation for use outside PollarClient
  • Defaults to 12 zero-setup modules; pass an explicit modules list to add Ledger / Trezor / WalletConnect or to trim the bundle
  • SSR-safe: stellarWalletsKitAdapters() returns [] when there is no window (Next.js / Remix) and builds the real list when it re-runs on the client
  • Peer deps: @creit.tech/stellar-wallets-kit@^2.0.0 and @pollar/core@^0.11.2 (the kit is not bundled)
npm install @pollar/stellar-wallets-kit-adapter @pollar/core @creit.tech/stellar-wallets-kit

@pollar/solana-wallet-standard-adapter

Version: 0.11.2  |  Registry: npm

The Solana counterpart to @pollar/stellar-wallets-kit-adapter. Connects user-controlled Solana wallets (Phantom, Solflare, Backpack, ...) to @pollar/core through the Wallet Standard, without bundling any wallet SDK into @pollar/core. Login uses SIWS (Sign In With Solana) via each wallet's native solana:signIn feature - the Solana analogue of Stellar's SEP-10 challenge.

Key features:

  • solanaWalletStandardAdapters(options?) - discovers every installed Solana wallet and returns one WalletAdapter each to pass to PollarClientConfig.walletAdapters; SSR-safe (returns [] when there is no window)
  • SolanaWalletStandardAdapter - direct WalletAdapter implementation for use outside PollarClient
  • Peer dep: @pollar/core@^0.11.2 only. The @wallet-standard/* packages and @solana/wallet-standard-features are bundled as regular dependencies, so consumers don't install them; no wallet SDK is bundled
npm install @pollar/solana-wallet-standard-adapter @pollar/core

Repository Structure

@pollar/
├── packages/
│   ├── core/                            # @pollar/core - framework-agnostic SDK
│   ├── react/                           # @pollar/react - React bindings and UI components
│   ├── privy-adapter/                   # @pollar/privy-adapter - client-side Privy wallet adapter (web + RN)
│   ├── privy-server-adapter/            # @pollar/privy-server-adapter - server-side Privy signing proxy
│   ├── accesly-adapter/                 # @pollar/accesly-adapter - client-side Accesly smart-wallet adapter
│   ├── stellar-wallets-kit-adapter/     # @pollar/stellar-wallets-kit-adapter - Stellar Wallets Kit bridge
│   └── solana-wallet-standard-adapter/  # @pollar/solana-wallet-standard-adapter - Solana Wallet Standard bridge
├── examples/                            # Example apps (e.g. privy-web)
├── docs/                                # API reference documentation
├── tests/                                # Smoke tests for the built SDK
├── turbo.json                           # Turborepo pipeline configuration
└── tsconfig.base.json                   # Shared TypeScript base configuration

Development

This monorepo uses Turborepo for task orchestration and npm workspaces as the package manager (pinned via packageManager in the root package.json).

Prerequisites

  • Node.js >= 20 (matches the engines floor declared by every published package)
  • npm >= 10

Install dependencies

npm install

Build all packages

npm run build

Build in watch mode

npm run dev

Type-check all packages

npm run lint

Clean build artifacts

npm run clean

License

MIT