@pollar/react 0.12.0-rc.5 → 0.12.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -2
- package/dist/index.css +13 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +113 -33
- package/dist/index.d.ts +113 -33
- package/dist/index.js +4462 -1314
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4464 -1316
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
React bindings for [Pollar](https://pollar.xyz) — drop-in authentication UI, transaction modals, and hooks for
|
|
4
4
|
Stellar and Solana applications.
|
|
5
5
|
|
|
6
|
-
> **0.12.
|
|
6
|
+
> **0.12.1** (requires `@pollar/core@^0.12.1`). Every modal and exported template speaks English, Spanish and
|
|
7
|
+
> Portuguese: the dashboard's language wins, then a component's `language` prop, the client's `locale`, and the
|
|
8
|
+
> browser's. `<SwapModal>` swaps on Solana too, with a Network selector when the app has venues on both chains.
|
|
9
|
+
> `<SendModal>` offers a Hash memo next to Text and ID. `<RequirementFormModal>` asks a field with `showIf` only while
|
|
10
|
+
> the answer it depends on matches. The card modal copies the number, expiry date and CVC, the email code input takes
|
|
11
|
+
> an autofilled one-time code, and the ramp widget says a route's minimum or maximum. A hook built with
|
|
12
|
+
> `createPollarAdapterHook` signs the auth entry an adapter answers with, without submitting anything, and hands it to
|
|
13
|
+
> the adapter's `complete`.
|
|
14
|
+
>
|
|
15
|
+
> Earlier: **0.12.0** (requires `@pollar/core@^0.12.0`). `<RampWidget>` runs on the v3 ramps API: routes, quotes leg by
|
|
7
16
|
> leg, the fields a quote asks for, the order's progress and its pending action; it signs a leg with the connected
|
|
8
17
|
> Stellar or Solana wallet only when the leg was built for it. **Wallets the user holds**: the wallet button lets the
|
|
9
18
|
> user pick co-signed or self-custody when the app leaves it to them, `<RecoveryModal>` manages passkeys, email,
|
|
@@ -244,6 +253,9 @@ const {
|
|
|
244
253
|
swap, // (quote: SwapQuote, opts?) => Promise<SubmitOutcome>
|
|
245
254
|
getSwapConfig, // () => Promise<SwapVenue[]> (which venues this app offers)
|
|
246
255
|
getSwapTokens, // () => Promise<SwapToken[]>
|
|
256
|
+
getSolanaSwapConfig, // () => Promise<SolanaSwapVenue[]> (Jupiter, Titan; mainnet)
|
|
257
|
+
getSolanaSwapQuote, // (params: SolanaSwapQuoteParams) => Promise<SolanaSwapQuote[]>
|
|
258
|
+
swapSolana, // (quote: SolanaSwapQuote, opts?) => Promise<SubmitOutcome>
|
|
247
259
|
openSwapModal, // () => void
|
|
248
260
|
|
|
249
261
|
// Earn (yield vaults + lending — DeFindex + Blend)
|
|
@@ -370,7 +382,7 @@ already wired inside `<PollarProvider>` — and most are exported in case you wa
|
|
|
370
382
|
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
371
383
|
| `<WalletButton>` | Drop-in button. Opens login when signed out; signed in, shows the wallet address with a dropdown (Send, Receive, copy address, balance, history, ramp, KYC, distribution rules, sessions, sign out, plus a "Create account" action when the external wallet has no on-chain account yet). Inline arc spinner during in-progress transactions |
|
|
372
384
|
| `<SendModal>` | Full send flow: network picker (shown when the app has more than one chain), asset picker, amount with Max (from the available balance), destination with Paste, inline build > sign > success/error. Sending is available on Stellar and Solana; Polygon can be browsed but not sent from |
|
|
373
|
-
| `<SwapModal>` | On-chain asset-to-asset swap: pick from/to assets and amount, quote across venues, execute (auto-trustline on the buy asset when needed); paste a custom buy token (code + issuer)
|
|
385
|
+
| `<SwapModal>` | On-chain asset-to-asset swap on Stellar and Solana (a Network selector when the app has venues on both): pick from/to assets and amount, quote across venues, execute (auto-trustline on the buy asset when needed); paste a custom Stellar buy token (code + issuer) |
|
|
374
386
|
| `<EarnModal>` | Deposit/withdraw across DeFindex vaults and Blend pools: provider + opportunity selection with live APY, wallet balance, over-spend guards, and auto-trustline on deposit |
|
|
375
387
|
| `<ReceiveModal>` | Wallet address as QR code with copy-to-clipboard (no external QR dependency required) |
|
|
376
388
|
| `<TxHistoryModal>` | Paginated multichain transaction history with auto-fetch on open. A `<ChainSelect>` in the header filters server-side (switching networks refetches and resets to page 1); rows link to their own chain's explorer (stellar.expert for Stellar, explorer.solana.com for Solana) and show the unified `{ amount, unit }` fee |
|
package/dist/index.css
CHANGED
|
@@ -3144,6 +3144,19 @@
|
|
|
3144
3144
|
letter-spacing: 0.08em;
|
|
3145
3145
|
text-transform: uppercase;
|
|
3146
3146
|
}
|
|
3147
|
+
.pollar-card-copy-row {
|
|
3148
|
+
display: flex;
|
|
3149
|
+
align-items: center;
|
|
3150
|
+
gap: 0.375rem;
|
|
3151
|
+
}
|
|
3152
|
+
.pollar-card-copy {
|
|
3153
|
+
color: inherit;
|
|
3154
|
+
opacity: 0.8;
|
|
3155
|
+
}
|
|
3156
|
+
.pollar-card-copy:hover {
|
|
3157
|
+
color: inherit;
|
|
3158
|
+
opacity: 1;
|
|
3159
|
+
}
|
|
3147
3160
|
.pollar-card-visual-bottom strong {
|
|
3148
3161
|
font-family: var(--pollar-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
3149
3162
|
font-weight: 600;
|