@pollar/core 0.8.2 → 0.9.0-rc.1

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 CHANGED
@@ -205,6 +205,41 @@ Same as React (`useSyncExternalStore`), plus the entry-file polyfills and inject
205
205
  React Native sections above. OAuth and external-wallet logins require `openAuthUrl` / `walletAdapter` to be injected
206
206
  (the built-in popup/extension adapters are web-only).
207
207
 
208
+ ## Logging
209
+
210
+ The SDK logs through a level-gated logger. Configure it on `PollarClient`:
211
+
212
+ ```ts
213
+ const client = new PollarClient({
214
+ apiKey: 'pk_...',
215
+ logLevel: 'warn', // 'silent' | 'error' | 'warn' | 'info' | 'debug' (default 'info')
216
+ });
217
+ ```
218
+
219
+ Levels are ordered `silent` < `error` < `warn` < `info` < `debug`; setting one emits that level and every more
220
+ important one. `silent` disables all SDK logging. State-transition chatter (`auth:…`, `transaction:…`, `network:…`)
221
+ and retry warnings live at `debug`, so the default `info` keeps the console quiet while still showing lifecycle events
222
+ (Initialized, Session stored/restored, Tokens refreshed) and all warnings/errors.
223
+
224
+ Route logs to your own sink (pino, Sentry breadcrumbs, a test spy…) with `logger` — filtering by `logLevel` still
225
+ applies on top:
226
+
227
+ ```ts
228
+ import { PollarClient, type PollarLogger } from '@pollar/core';
229
+
230
+ const sink: PollarLogger = {
231
+ error: (...a) => myLogger.error(...a),
232
+ warn: (...a) => myLogger.warn(...a),
233
+ info: (...a) => myLogger.info(...a),
234
+ debug: (...a) => myLogger.debug(...a),
235
+ };
236
+
237
+ const client = new PollarClient({ apiKey: 'pk_...', logLevel: 'debug', logger: sink });
238
+ ```
239
+
240
+ `client.getLogger()` returns the configured logger (used internally by `@pollar/react` so its own logs honor the same
241
+ level + sink). `@pollar/stellar-wallets-kit-adapter` accepts the same `logLevel` / `logger` on its options.
242
+
208
243
  ## Preserved-on-disk storage shape
209
244
 
210
245
  0.7.0 persists exactly:
@@ -1,4 +1,4 @@
1
- import { V as VisibilityProvider } from '../types-84G_htcn.mjs';
1
+ import { V as VisibilityProvider } from '../types-Dyky8g0p.mjs';
2
2
 
3
3
  /**
4
4
  * Create a `VisibilityProvider` backed by React Native's `AppState`.
@@ -1,4 +1,4 @@
1
- import { V as VisibilityProvider } from '../types-84G_htcn.js';
1
+ import { V as VisibilityProvider } from '../types-Dyky8g0p.js';
2
2
 
3
3
  /**
4
4
  * Create a `VisibilityProvider` backed by React Native's `AppState`.