@solana/react-hooks 1.2.1 → 1.2.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.
Files changed (2) hide show
  1. package/README.md +19 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -432,9 +432,27 @@ function ClusterBadge() {
432
432
  }
433
433
  ```
434
434
 
435
+ ## Wallet connector filtering
436
+
437
+ Use `filterByNames` with `autoDiscover()` to filter wallets by name without wallet-specific code:
438
+
439
+ ```tsx
440
+ import { autoDiscover, createClient, filterByNames } from "@solana/client";
441
+
442
+ // Only show Phantom and Solflare
443
+ const client = createClient({
444
+ cluster: "devnet",
445
+ walletConnectors: autoDiscover({
446
+ filter: filterByNames("phantom", "solflare"),
447
+ }),
448
+ });
449
+ ```
450
+
451
+ This approach follows Wallet Standard's wallet-agnostic discovery pattern while still allowing you to curate which wallets appear in your app.
452
+
435
453
  ## Notes and defaults
436
454
 
437
- - Wallet connectors: use `autoDiscover()` to pick up Wallet Standard injectables; or explicitly compose `phantom()`, `solflare()`, `backpack()`, `metamask()`, etc.
455
+ - Wallet connectors: use `autoDiscover()` to pick up Wallet Standard injectables; use `filterByNames()` to filter by name, or explicitly compose `phantom()`, `solflare()`, `backpack()`, `metamask()`, etc.
438
456
  - Queries: all RPC query hooks accept `swr` options under `swr` and `disabled` flags. Suspense is opt-in via `SolanaQueryProvider`’s `suspense` prop.
439
457
  - Authorities: transaction helpers default to the connected wallet session when `authority` is omitted.
440
458
  - Types: every hook exports `UseHookNameParameters` / `UseHookNameReturnType` aliases.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/react-hooks",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "React hooks for the @solana/client Solana client",
5
5
  "exports": {
6
6
  "browser": "./dist/index.browser.mjs",
@@ -44,7 +44,7 @@
44
44
  "@solana/kit": "^5.0.0",
45
45
  "swr": "^2.3.6",
46
46
  "zustand": "^5.0.0",
47
- "@solana/client": "1.4.1"
47
+ "@solana/client": "1.5.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/react": "^19.0.0",