@vue-solana/vue 0.8.1 → 0.8.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 +63 -46
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # @vue-solana/vue
2
2
 
3
- Vue plugin and composables for Solana applications.
3
+ [![npm version](https://img.shields.io/npm/v/@vue-solana/vue.svg)](https://www.npmjs.com/package/@vue-solana/vue)
4
+ [![npm downloads](https://img.shields.io/npm/dt/@vue-solana/vue.svg)](https://www.npmjs.com/package/@vue-solana/vue)
5
+ [![license](https://img.shields.io/npm/l/@vue-solana/vue.svg)](https://github.com/vue-solana/vue-solana/blob/main/LICENSE)
6
+ [![docs](https://img.shields.io/badge/docs-vue--solana-blue)](https://vue-solana-docs.vercel.app/packages/vue)
7
+
8
+ Solana wallet, RPC, account, message signing, and transaction composables for Vue 3.
4
9
 
5
10
  Use this package in Vue 3 apps that need Solana RPC access, balance reads, wallet state, message signing, and transaction helper state.
6
11
 
@@ -14,6 +19,26 @@ New to Solana? Start with the official docs and the project concepts guide:
14
19
  - [Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
15
20
  - [Live demo](https://vue-solana-docs.vercel.app/demo)
16
21
 
22
+ ## Features
23
+
24
+ - Vue plugin for shared Solana RPC and wallet context.
25
+ - SSR-safe composables that return inert state when no client plugin context is available.
26
+ - RPC status and latest blockhash reads.
27
+ - Balance, account info, program account, and signature status composables.
28
+ - Unified wallet discovery and selection for browser extensions, Android Mobile Wallet Adapter, and supported iOS browser wallets.
29
+ - Message signing helpers for wallet ownership and authentication challenges.
30
+ - Transaction submission and confirmation state helpers.
31
+ - Direct subpath exports for narrower imports.
32
+
33
+ ## Compatibility
34
+
35
+ | Requirement | Supported |
36
+ | ------------------ | ----------------------------------------------- |
37
+ | Vue | `^3.5.0` |
38
+ | TypeScript | TypeScript 5.x recommended |
39
+ | Solana client peer | `@solana/web3-compat@^0.0.21` |
40
+ | Clusters | `mainnet-beta`, `devnet`, `testnet`, `localnet` |
41
+
17
42
  ## Install
18
43
 
19
44
  ```sh
@@ -63,6 +88,18 @@ createApp(App).use(
63
88
 
64
89
  Supported clusters are `mainnet-beta`, `devnet`, `testnet`, and `localnet`. Use `mainnet-beta` for Solana mainnet; this is Solana's official cluster name.
65
90
 
91
+ ### Plugin Options
92
+
93
+ | Option | Type | Default | Description |
94
+ | -------------- | ------------------------------------------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------- |
95
+ | `cluster` | `"mainnet-beta" \| "devnet" \| "testnet" \| "localnet"` | `"devnet"` | Solana cluster used when `endpoint` is omitted. |
96
+ | `endpoint` | `string` | Public endpoint for `cluster` | HTTP RPC endpoint. Use a dedicated RPC provider for production apps. |
97
+ | `wsEndpoint` | `string` | Derived from `endpoint` | WebSocket RPC endpoint. |
98
+ | `commitment` | Solana commitment | Solana client default | Default commitment for created connections. |
99
+ | `autoConnect` | `boolean` | `false` | Reconnects only a previously selected discovered wallet identity when it is discovered again. |
100
+ | `wallet` | `SolanaWallet` | Disabled | Custom wallet adapter, useful for tests or custom integrations. |
101
+ | `mobileWallet` | `MobileWalletOptions \| false` | Enabled on supported Android clients | Configures or disables Android Mobile Wallet Adapter registration. |
102
+
66
103
  The root export remains supported. For composables, prefer direct subpath imports in new code so bundlers can avoid evaluating unrelated package entry code:
67
104
 
68
105
  ```ts
@@ -268,21 +305,23 @@ Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
268
305
 
269
306
  ## API
270
307
 
271
- - `createSolanaPlugin(options?)`: installs the Vue Solana context.
272
- - `VueSolana`: alias for `createSolanaPlugin`.
273
- - `useSolana()`: returns the full injected Solana context.
274
- - `useRpc()`: returns cluster, endpoint, connection status, latest blockhash, and `checkConnection()`.
275
- - `useConnection()`: returns the Solana `Connection`.
276
- - `useWallet()`: returns wallet refs, computed connection state, and wallet actions.
277
- - `useWallets()`: returns discovered browser extension wallets, Android Mobile Wallet Adapter wallets, iOS browser wallet links, and wallet selection actions.
278
- - `useSignMessage()`: signs arbitrary message bytes through the connected wallet when message signing is supported.
279
- - `useBalance(address, commitment?)`: loads lamport balance for a `PublicKey` or address string.
280
- - `useAccountInfo(address, options?)`: loads account info and can subscribe to account changes with `watch: true`.
281
- - `useProgramAccounts(programId, config?)`: loads accounts owned by a program with optional filters, commitment, and `dataSlice`.
282
- - `useTransaction(handler, options?)`: generic async transaction state helper with optional timeout settings.
283
- - `useTransactionConfirmation(options?)`: confirms a submitted signature with reactive status and timeout/error state.
284
- - `useSignatureStatus(signature, options?)`: reads a transaction signature status with optional polling or websocket subscription.
285
- - `useSignAndSendTransaction()`: signs and sends a transaction through the configured wallet, with optional confirmation waiting.
308
+ | API | Description |
309
+ | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
310
+ | `createSolanaPlugin(options?)` | Installs the Vue Solana context. |
311
+ | `VueSolana` | Alias for `createSolanaPlugin`. |
312
+ | `useSolana()` | Returns the full injected Solana context. |
313
+ | `useRpc()` | Returns cluster, endpoint, connection status, latest blockhash, and `checkConnection()`. |
314
+ | `useConnection()` | Returns the Solana `Connection`. |
315
+ | `useWallet()` | Returns wallet refs, computed connection state, and wallet actions. |
316
+ | `useWallets()` | Returns discovered browser extension wallets, Android MWA wallets, iOS browser wallet links, and wallet selection actions. |
317
+ | `useSignMessage()` | Signs arbitrary message bytes through the connected wallet when message signing is supported. |
318
+ | `useBalance(address, commitment?)` | Loads lamport balance for a `PublicKey` or address string. |
319
+ | `useAccountInfo(address, options?)` | Loads account info and can subscribe to account changes with `watch: true`. |
320
+ | `useProgramAccounts(programId, config?)` | Loads accounts owned by a program with optional filters, commitment, and `dataSlice`. |
321
+ | `useTransaction(handler, options?)` | Generic async transaction state helper with optional timeout settings. |
322
+ | `useTransactionConfirmation(options?)` | Confirms a submitted signature with reactive status and timeout/error state. |
323
+ | `useSignatureStatus(signature, options?)` | Reads a transaction signature status with optional polling or websocket subscription. |
324
+ | `useSignAndSendTransaction()` | Signs and sends a transaction through the configured wallet, with optional confirmation waiting. |
286
325
 
287
326
  Direct composable subpaths:
288
327
 
@@ -300,37 +339,15 @@ Direct composable subpaths:
300
339
  - `@vue-solana/vue/useSignatureStatus`
301
340
  - `@vue-solana/vue/useSignAndSendTransaction`
302
341
 
303
- ## Known TypeScript Issue
304
-
305
- `@solana/web3-compat@0.0.21` currently has broken TypeScript metadata. Runtime imports still use the real package, but TypeScript consumers may need a local declaration shim.
306
-
307
- If TypeScript cannot resolve `@solana/web3-compat`, add `types/web3-compat.d.ts` to your app:
308
-
309
- ```ts
310
- declare module "@solana/web3-compat" {
311
- export type {
312
- AccountInfo,
313
- Commitment,
314
- RpcResponseAndContext,
315
- SendOptions,
316
- SignatureResult,
317
- SignatureStatus,
318
- TransactionSignature,
319
- } from "@solana/web3.js";
320
- export {
321
- Connection,
322
- Keypair,
323
- PublicKey,
324
- SystemProgram,
325
- Transaction,
326
- TransactionInstruction,
327
- VersionedTransaction,
328
- } from "@solana/web3.js";
329
- }
330
- ```
342
+ ## Caveats
331
343
 
332
- Make sure your `tsconfig.json` includes `types/**/*.d.ts` or another pattern that includes the shim.
344
+ - 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.
345
+ - Public Solana RPC endpoints are useful for development, but production apps should use dedicated RPC infrastructure.
346
+ - Broad `useProgramAccounts()` scans can be expensive or blocked on public RPC nodes. Prefer narrow filters and `dataSlice`.
347
+ - Use `mainnet-beta` for Solana mainnet. `mainnet` is intentionally not accepted as a cluster alias.
348
+ - `@solana/web3-compat@0.0.21` currently has broken TypeScript package metadata. Runtime imports still use the real package, but TypeScript consumers may need a local declaration shim. See [Troubleshooting](https://vue-solana-docs.vercel.app/troubleshooting) for the workaround.
349
+ - Desktop native app wallets are planned but not implemented yet.
333
350
 
334
351
  ## Status
335
352
 
336
- This package is early-stage. RPC, balance, browser extension wallet, Android mobile wallet, iOS browser wallet, message signing, and transaction composables are usable.
353
+ This package provides RPC, balance, browser extension wallet, Android mobile wallet, iOS browser wallet, message signing, and transaction composables.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-solana/vue",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Vue plugin and composables for Solana applications.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -104,7 +104,7 @@
104
104
  },
105
105
  "dependencies": {
106
106
  "bs58": "^6.0.0",
107
- "@vue-solana/core": "0.7.0"
107
+ "@vue-solana/core": "0.7.1"
108
108
  },
109
109
  "peerDependencies": {
110
110
  "@solana/web3-compat": "^0.0.21",