@vue-solana/vue 4.1.0 → 4.1.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
@@ -12,7 +12,9 @@ Solana wallet, RPC, account, message signing, and transaction composables for Vu
12
12
  This package is part of the Vue Solana family. Choose based on your app framework:
13
13
 
14
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
+
15
16
  - [`@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.). (This package.)
17
+
16
18
  - [`@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.
17
19
 
18
20
  This package builds on `@vue-solana/core`; install `@vue-solana/vue` for plain Vue apps and `@vue-solana/nuxt` for Nuxt apps.
@@ -22,28 +24,49 @@ Use this package in Vue 3 apps that need Solana RPC access, balance reads, walle
22
24
  New to Solana? Start with the official docs and the project concepts guide:
23
25
 
24
26
  - [Solana Documentation](https://solana.com/docs)
27
+
25
28
  - [Solana RPC Methods](https://solana.com/docs/rpc)
29
+
26
30
  - [Solana Clusters](https://solana.com/docs/references/clusters)
31
+
27
32
  - [Vue Solana Concepts Guide](https://vue-solana-docs.vercel.app/concepts/solana-for-vue-developers)
33
+
28
34
  - [`@vue-solana/vue` docs](https://vue-solana-docs.vercel.app/packages/vue)
35
+
29
36
  - [Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
37
+
30
38
  - [Live demo](https://vue-solana-docs.vercel.app/demo)
31
39
 
32
40
  ## Features
33
41
 
34
42
  - Vue plugin for shared Solana RPC and wallet context.
43
+
35
44
  - SSR-safe composables that return inert state when no client plugin context is available.
45
+
36
46
  - RPC status and latest blockhash reads.
47
+
37
48
  - Balance, account info, program account, signature status, token account, and token balance composables.
49
+
38
50
  - Unified wallet discovery and selection for browser extensions, Android Mobile Wallet Adapter, and supported iOS browser wallets.
51
+
39
52
  - Message signing helpers for wallet ownership and authentication challenges.
53
+
40
54
  - Sign In With Solana (SIWS) authentication through `useSignIn()`.
55
+
41
56
  - App-wide selected wallet account context with persistence.
57
+
42
58
  - Transaction submission and confirmation state helpers, including batch signing and sign-and-send.
59
+
60
+ - Solana Pay request building, QR rendering and scanning, and reference-based settlement confirmation (`useSolanaPay`, `useSolanaPayConfirmation`, `useSolanaQrCode`, `useSolanaQrScanner`).
61
+
43
62
  - Live data composables over Kit reactive stores (`useRequest`, `useSubscription`, `useTrackedData`) plus SWR cache adapters.
63
+
44
64
  - A generic async action state machine (`useAction`) built on `@vue-solana/core/action`.
65
+
45
66
  - Reactive Kit client signers (`usePayer`, `useIdentity`) and transaction planning (`usePlanTransaction`, `usePlanTransactions`) with fail-fast client capability assertions.
67
+
46
68
  - Client-sent transactions through the official Kit planner and RPC plan-sending executor installed by the default client.
69
+
47
70
  - Direct subpath exports for narrower imports.
48
71
 
49
72
  ## Compatibility
@@ -383,8 +406,11 @@ await execute(transaction);
383
406
  Return shapes:
384
407
 
385
408
  - `useSignMessage().execute(bytes)` resolves to `{ signedMessage, signature }`, both `Uint8Array`.
409
+
386
410
  - `useSignTransactions().execute(transactions)` resolves to the signed `Uint8Array[]` (also exposed as `signedTransactions`); pass a single-element array for one transaction.
411
+
387
412
  - `useSignAndSendTransaction().execute(transaction)` resolves to the submitted `signature` string; with `confirm: true` it also fills `confirmation`.
413
+
388
414
  - `useSignAndSendTransactions().execute(transactions)` resolves to a `string[]` of signatures (also exposed as `signatures`).
389
415
 
390
416
  A wallet may modify the message or transaction before signing — for example to add its own instruction or change the fee payer — and the Wallet Standard explicitly allows it. Re-read the returned `signedMessage` or signed transaction bytes instead of assuming they match your input byte-for-byte.
@@ -536,7 +562,9 @@ await dispatch(inputB); // aborts dispatch(inputA) before starting
536
562
  ```
537
563
 
538
564
  - `useAction` keeps the handler in a ref — every `dispatch` runs the latest closure, so there is no deps array to keep in sync. In-flight calls keep running with the closure they started with.
565
+
539
566
  - `dispatch` returns a `Promise<TResult>`. If a newer dispatch supersedes it, the older promise rejects with an abort error; awaiters should treat that as "superseded", not a failure, and fresh awaits win.
567
+
540
568
  - Calling `dispatch` again aborts the prior in-flight call with a fresh `AbortSignal`, and resets state to `idle` before the new run starts.
541
569
 
542
570
  ### Sign In With Solana
@@ -637,7 +665,7 @@ Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
637
665
  | `clearSwrCache()` | Clears every cached SWR entry. |
638
666
  | `deleteSwrKey(key)` | Removes a single cached SWR entry by full cache key (including adapter prefix). |
639
667
  | `useSignIn(input?)` | Sign In With Solana (SIWS) trigger returning `{ account, signedMessage, signature }` for server-side verification. |
640
- | `useSolanaPay()` | Builds/parses Solana Pay transfer request URLs and tracks confirmation status by reference. |
668
+ | `useSolanaPay()` | Builds/parses Solana Pay transfer request URLs, generates a reference, and verifies settlement against it. |
641
669
  | `useSolanaPayConfirmation()` | Polls payment status for a Solana Pay reference. |
642
670
  | `useSolanaQrCode()` | Renders a Solana Pay URL as an SVG QR code. |
643
671
  | `useSolanaQrScanner()` | Scans Solana Pay QR codes through the camera and `BarcodeDetector`. |
@@ -657,55 +685,97 @@ Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
657
685
  Direct composable subpaths:
658
686
 
659
687
  - `@vue-solana/vue/useSolana`
688
+
660
689
  - `@vue-solana/vue/useSolanaClient`
690
+
661
691
  - `@vue-solana/vue/useRpc`
692
+
662
693
  - `@vue-solana/vue/useConnection`
694
+
663
695
  - `@vue-solana/vue/useAccountInfo`
696
+
664
697
  - `@vue-solana/vue/useAirdrop`
698
+
665
699
  - `@vue-solana/vue/useBalance`
700
+
666
701
  - `@vue-solana/vue/useProgramAccounts`
702
+
667
703
  - `@vue-solana/vue/useWallet`
704
+
668
705
  - `@vue-solana/vue/useWallets`
706
+
669
707
  - `@vue-solana/vue/useSignMessage`
708
+
670
709
  - `@vue-solana/vue/useTransaction`
710
+
671
711
  - `@vue-solana/vue/useTransactionConfirmation`
712
+
672
713
  - `@vue-solana/vue/useSignatureStatus`
714
+
673
715
  - `@vue-solana/vue/useSignAndSendTransaction`
716
+
674
717
  - `@vue-solana/vue/useTokenAccounts`
718
+
675
719
  - `@vue-solana/vue/useTokenBalance`
720
+
676
721
  - `@vue-solana/vue/useAction`
722
+
677
723
  - `@vue-solana/vue/useRequest`
724
+
678
725
  - `@vue-solana/vue/useSubscription`
726
+
679
727
  - `@vue-solana/vue/useTrackedData`
728
+
680
729
  - `@vue-solana/vue/useSignIn`
730
+
681
731
  - `@vue-solana/vue/useSolanaPay`
732
+
682
733
  - `@vue-solana/vue/useSolanaPayConfirmation`
734
+
683
735
  - `@vue-solana/vue/useSolanaQrCode`
736
+
684
737
  - `@vue-solana/vue/useSolanaQrScanner`
738
+
685
739
  - `@vue-solana/vue/useSelectedWalletAccount`
740
+
686
741
  - `@vue-solana/vue/useSignTransactions`
742
+
687
743
  - `@vue-solana/vue/useSignAndSendTransactions`
744
+
688
745
  - `@vue-solana/vue/useClientCapability`
746
+
689
747
  - `@vue-solana/vue/usePayer`
748
+
690
749
  - `@vue-solana/vue/useIdentity`
750
+
691
751
  - `@vue-solana/vue/usePlanTransaction`
752
+
692
753
  - `@vue-solana/vue/usePlanTransactions`
754
+
693
755
  - `@vue-solana/vue/useSendTransaction`
756
+
694
757
  - `@vue-solana/vue/useSendTransactions`
695
758
 
696
759
  Other direct subpaths:
697
760
 
698
761
  - `@vue-solana/vue/swr`
762
+
699
763
  - `@vue-solana/vue/kit`
764
+
700
765
  - `@vue-solana/vue/buffer-polyfill`
701
766
 
702
767
  ## Caveats
703
768
 
704
769
  - Wallet and RPC operations require the plugin-provided client context. Composables are SSR-safe, but real wallet work should run after hydration or in user actions.
770
+
705
771
  - Public Solana RPC endpoints are useful for development, but production apps should use dedicated RPC infrastructure.
772
+
706
773
  - Broad `useProgramAccounts()` scans can be expensive or blocked on public RPC nodes. Prefer narrow filters and `dataSlice`.
774
+
707
775
  - Use `mainnet` for Solana mainnet. This is Solana's official mainnet cluster name; the legacy `mainnet-beta` spelling is still accepted and redirects to the same endpoint.
776
+
708
777
  - v2.0.0 removed `@solana/web3-compat` and the `web3` subpaths. Build transaction messages with `@vue-solana/vue/kit` and pass raw `Uint8Array` wire bytes to wallet flows. See the [Kit Migration guide](https://vue-solana-docs.vercel.app/guides/kit-migration) for migrating from v1.
778
+
709
779
  - Desktop native app wallets are planned but not implemented yet.
710
780
 
711
781
  ## Status
@@ -6,7 +6,7 @@ declare function useSolanaPay(): {
6
6
  requestUrl: vue.ShallowRef<string | null, string | null>;
7
7
  parsedRequest: vue.ShallowRef<unknown, unknown>;
8
8
  reference: vue.ShallowRef<unknown, unknown>;
9
- status: vue.ShallowRef<"confirmed" | "finalized" | "error" | "idle" | "pending" | "found" | "expired", "confirmed" | "finalized" | "error" | "idle" | "pending" | "found" | "expired">;
9
+ status: vue.ShallowRef<"idle" | "confirmed" | "finalized" | "error" | "pending" | "found" | "expired", "idle" | "confirmed" | "finalized" | "error" | "pending" | "found" | "expired">;
10
10
  loading: vue.ShallowRef<boolean, boolean>;
11
11
  error: vue.ShallowRef<unknown, unknown>;
12
12
  createTransferRequest: (input: Record<string, unknown>) => Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-solana/vue",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "Vue plugin and composables for Solana applications.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -194,7 +194,7 @@
194
194
  "access": "public"
195
195
  },
196
196
  "dependencies": {
197
- "@vue-solana/core": "4.1.0"
197
+ "@vue-solana/core": "4.1.1"
198
198
  },
199
199
  "peerDependencies": {
200
200
  "vue": "^3.5.0"