@vue-solana/nuxt 4.0.0-rc.1 → 4.1.0

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
@@ -7,6 +7,16 @@
7
7
 
8
8
  Nuxt module for Solana wallet, RPC, account, token, message signing, live data, and transaction composables with auto-imports.
9
9
 
10
+ ## Related packages
11
+
12
+ This package is part of the Vue Solana family. Choose based on your app framework:
13
+
14
+ - [`@vue-solana/core`](https://www.npmjs.com/package/@vue-solana/core) — framework-agnostic Solana primitives: Kit RPC client helpers, wallet types, Android MWA registration, iOS browser wallet helpers, message signing, token account reads, and transaction helpers. **Use this directly** when you want shared RPC/wallet/transaction helpers without installing a Vue plugin (non-Vue apps, server/relayer code, or your own framework integration).
15
+ - [`@vue-solana/vue`](https://www.npmjs.com/package/@vue-solana/vue) — Vue 3 plugin plus composables for RPC, account, balance, wallet, message signing, live data, and transactions. **Use this** in plain Vue 3 apps (Vite, etc.).
16
+ - [`@vue-solana/nuxt`](https://www.npmjs.com/package/@vue-solana/nuxt) — Nuxt module that installs the Vue plugin and auto-imports the composables. **Use this** in Nuxt 3/4 apps. (This package.)
17
+
18
+ This package builds on `@vue-solana/vue` and `@vue-solana/core`; it is the recommended entry point for Nuxt apps.
19
+
10
20
  Use this package in Nuxt apps that need the Vue Solana plugin installed automatically plus auto-imported composables for RPC, wallet state, message signing, live data, and transactions.
11
21
 
12
22
  New to Solana? Start with the official docs and the project concepts guide:
@@ -116,6 +126,10 @@ The module auto-imports these composables from direct `@vue-solana/vue/*` subpat
116
126
  - `useSolanaWallets()`
117
127
  - `useSolanaSignMessage()`
118
128
  - `useSolanaSignIn()`
129
+ - `useSolanaPay()`
130
+ - `useSolanaPayConfirmation()`
131
+ - `useSolanaQrCode()`
132
+ - `useSolanaQrScanner()`
119
133
  - `useSolanaSignAndSendTransaction()`
120
134
  - `useSolanaSignTransactions()`
121
135
  - `useSolanaSignAndSendTransactions()`
@@ -153,11 +167,17 @@ The module auto-imports these composables from direct `@vue-solana/vue/*` subpat
153
167
  | `useSolanaWallets()` | Wallet discovery, selected wallet state, and selection actions. |
154
168
  | `useSolanaSignMessage()` | Wallet message signing. |
155
169
  | `useSolanaSignIn()` | Sign In With Solana (SIWS) trigger returning a server-verifiable result. |
170
+ | `useSolanaPay()` | Builds/parses Solana Pay transfer request URLs and tracks confirmation status by reference. |
171
+ | `useSolanaPayConfirmation()` | Polls payment status for a Solana Pay reference. |
172
+ | `useSolanaQrCode()` | Renders a Solana Pay URL as an SVG QR code. |
173
+ | `useSolanaQrScanner()` | Scans Solana Pay QR codes through the camera and `BarcodeDetector`. |
156
174
  | `useSolanaSignAndSendTransaction()` | Wallet transaction signing, sending, and optional confirmation. |
157
175
  | `useSolanaSignTransactions()` | Batch transaction signing (falls back to `signAllTransactions`). |
158
176
  | `useSolanaSignAndSendTransactions()` | Batch sign-and-send returning one signature per transaction. |
159
177
  | `useSolanaTransactionConfirmation()` | Confirmation state for an already submitted signature. |
160
- | `useSolanaSignatureStatus()` | Signature status reads with optional polling or websocket subscription. |
178
+ | `useSolanaSignatureStatus()` | Signature status reads with optional polling. |
179
+ | `useSolanaClientCapability()` | Fails fast when the installed client is missing a required capability. |
180
+ | `tryUseSolana()` | Returns the injected Solana context or `null` when no plugin context is available. |
161
181
  | `useSolanaTransaction()` | Generic async transaction state helper with optional timeout settings. |
162
182
  | `useSolanaAction()` | Generic async action state machine; each dispatch aborts the prior attempt. |
163
183
  | `useSolanaRequest()` | One-shot Kit request with stale-while-revalidate as its source changes. |
@@ -166,6 +186,10 @@ The module auto-imports these composables from direct `@vue-solana/vue/*` subpat
166
186
  | `useSolanaRequestSwr()` | Cache-keyed SWR adapter for one-shot Kit requests. |
167
187
  | `useSolanaSubscriptionSwr()` | Cache-keyed SWR adapter for Kit reactive stream stores. |
168
188
  | `useSolanaTrackedDataSwr()` | Cache-keyed SWR adapter for slot-tracked data. |
189
+ | `clearSwrCache()` | Clears every cached SWR entry. |
190
+ | `deleteSwrKey()` | Removes a single cached SWR entry by full cache key. |
191
+ | `useSolanaClientCapability()` | Fails fast when the installed client is missing a required capability. |
192
+ | `tryUseSolana()` | Returns the injected Solana context or `null` when no plugin context is available. |
169
193
  | `useSolanaSelectedWalletAccount()` | App-wide selected wallet account context provided by the runtime plugin. |
170
194
  | `useSolanaPayer()` | Reactive Kit client `payer` signer ref. Nuxt config intentionally does not provide one; use a client-only plugin with `clientPlugin: false`. |
171
195
  | `useSolanaIdentity()` | Reactive Kit client `identity` signer ref. |
@@ -300,7 +324,7 @@ async function signIn() {
300
324
  </template>
301
325
  ```
302
326
 
303
- Message signing is for wallet ownership or authentication challenges. It is separate from transaction signing and does not authorize on-chain activity. For auth flows, use a server-issued nonce and verify the returned signature server-side. The adapter also checks the signature against the account's public key before resolving, where Ed25519 (WebCrypto) is available — a best-effort client-side guard that rejects with `INVALID_SIGNATURE`, not a replacement for server-side verification.
327
+ Message signing is for wallet ownership or authentication challenges. It is separate from transaction signing and does not authorize on-chain activity. For auth flows, use a server-issued nonce and verify the returned signature server-side. The adapter also checks the signature against the account's public key before resolving, where Ed25519 (WebCrypto) is available — a best-effort client-side guard that rejects with `INVALID_SIGNATURE`, not a replacement for server-side verification. Sign-in results are bound to the requested account; a mismatch is rejected with `INVALID_SIGNATURE`. Connecting a wallet disconnects every other discovered wallet so only one wallet stays authorized.
304
328
 
305
329
  ## Client-Sent Transactions
306
330
 
@@ -333,7 +357,7 @@ Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
333
357
  ## Caveats
334
358
 
335
359
  - The runtime plugin is client-only. Auto-imported composables are SSR-safe, but real RPC and wallet work should run after hydration or in user actions.
336
- - The SWR cache (`useSolanaRequestSwr()`, `useSolanaSubscriptionSwr()`, `useSolanaTrackedDataSwr()`) is module-level and shared across SSR requests. Namespace cache keys per request or call `clearSwrCache()` (auto-imported) at the start of each server request to avoid leaking cached data between requests.
360
+ - The SWR cache (`useSolanaRequestSwr()`, `useSolanaSubscriptionSwr()`, `useSolanaTrackedDataSwr()`) is module-level and shared across SSR requests. Namespace cache keys per request or call `clearSwrCache()` (auto-imported) at the start of each server request to avoid leaking cached data between requests. The cache is capped at 1024 entries with oldest-first eviction; `deleteSwrKey()` (auto-imported) evicts a single key by its full cache key.
337
361
  - Nuxt module options are stored in public runtime config, so they must be JSON-serializable.
338
362
  - Public Solana RPC endpoints are useful for development, but production apps should use dedicated RPC infrastructure.
339
363
  - Broad `useSolanaProgramAccounts()` scans can be expensive or blocked on public RPC nodes. Prefer narrow filters and `dataSlice`.
package/dist/module.mjs CHANGED
@@ -28,6 +28,10 @@ const SOLANA_COMPOSABLE_IMPORTS = [
28
28
  ["useSignatureStatus", "useSolanaSignatureStatus"],
29
29
  ["useSolana", "useSolana"],
30
30
  ["useSolanaClient", "useSolanaClient"],
31
+ ["useSolanaPay", "useSolanaPay"],
32
+ ["useSolanaPayConfirmation", "useSolanaPayConfirmation"],
33
+ ["useSolanaQrCode", "useSolanaQrCode"],
34
+ ["useSolanaQrScanner", "useSolanaQrScanner"],
31
35
  ["useSubscription", "useSolanaSubscription"],
32
36
  ["useTokenAccounts", "useSolanaTokenAccounts"],
33
37
  ["useTokenBalance", "useSolanaTokenBalance"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-solana/nuxt",
3
- "version": "4.0.0-rc.1",
3
+ "version": "4.1.0",
4
4
  "description": "Nuxt module for Solana applications.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -45,7 +45,7 @@
45
45
  "access": "public"
46
46
  },
47
47
  "dependencies": {
48
- "@vue-solana/vue": "4.0.0-rc.1"
48
+ "@vue-solana/vue": "4.1.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "nuxt": "^3.0.0 || ^4.0.0"