@vue-solana/nuxt 0.6.1 → 0.6.3
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 +59 -31
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# @vue-solana/nuxt
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@vue-solana/nuxt)
|
|
4
|
+
[](https://www.npmjs.com/package/@vue-solana/nuxt)
|
|
5
|
+
[](https://github.com/vue-solana/vue-solana/blob/main/LICENSE)
|
|
6
|
+
[](https://vue-solana-docs.vercel.app/packages/nuxt)
|
|
7
|
+
|
|
8
|
+
Nuxt module for Solana wallet, RPC, account, message signing, and transaction composables with auto-imports.
|
|
4
9
|
|
|
5
10
|
Use this package in Nuxt apps that need the Vue Solana plugin installed automatically plus auto-imported composables for RPC, wallet state, message signing, and transactions.
|
|
6
11
|
|
|
@@ -14,6 +19,24 @@ 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
|
+
- Installs the Vue Solana plugin automatically.
|
|
25
|
+
- Auto-imports Solana RPC, wallet, account, balance, message signing, and transaction composables.
|
|
26
|
+
- Uses direct Vue package subpaths to avoid pulling unrelated runtime code into Nuxt bundles.
|
|
27
|
+
- Client-only runtime plugin with SSR-safe inert composable state before hydration.
|
|
28
|
+
- Unified wallet discovery for browser extensions, Android Mobile Wallet Adapter, and supported iOS browser wallets.
|
|
29
|
+
- Nuxt 3 and Nuxt 4 support.
|
|
30
|
+
|
|
31
|
+
## Compatibility
|
|
32
|
+
|
|
33
|
+
| Requirement | Supported |
|
|
34
|
+
| ------------------ | ----------------------------------------------- |
|
|
35
|
+
| Nuxt | `^3.0.0 \|\| ^4.0.0` |
|
|
36
|
+
| TypeScript | TypeScript 5.x recommended |
|
|
37
|
+
| Solana client peer | `@solana/web3-compat@^0.0.21` |
|
|
38
|
+
| Clusters | `mainnet-beta`, `devnet`, `testnet`, `localnet` |
|
|
39
|
+
|
|
17
40
|
## Install
|
|
18
41
|
|
|
19
42
|
```sh
|
|
@@ -52,6 +75,17 @@ Supported clusters are `mainnet-beta`, `devnet`, `testnet`, and `localnet`. Use
|
|
|
52
75
|
|
|
53
76
|
Nuxt module options are stored in public runtime config, so they must be JSON-serializable. Custom `wallet` adapter objects are intentionally excluded from Nuxt config; use the Vue plugin directly in client-only Vue code if you need to inject a custom wallet object.
|
|
54
77
|
|
|
78
|
+
### Module Options
|
|
79
|
+
|
|
80
|
+
| Option | Type | Default | Description |
|
|
81
|
+
| -------------- | ------------------------------------------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------- |
|
|
82
|
+
| `cluster` | `"mainnet-beta" \| "devnet" \| "testnet" \| "localnet"` | `"devnet"` | Solana cluster used when `endpoint` is omitted. |
|
|
83
|
+
| `endpoint` | `string` | Public endpoint for `cluster` | HTTP RPC endpoint. Use a dedicated RPC provider for production apps. |
|
|
84
|
+
| `wsEndpoint` | `string` | Derived from `endpoint` | WebSocket RPC endpoint. |
|
|
85
|
+
| `commitment` | Solana commitment | Solana client default | Default commitment for created connections. |
|
|
86
|
+
| `autoConnect` | `boolean` | `false` | Reconnects only a previously selected discovered wallet identity when it is discovered again. |
|
|
87
|
+
| `mobileWallet` | JSON-serializable mobile wallet options or `false` | Enabled on supported Android clients | Configures or disables Android Mobile Wallet Adapter registration. |
|
|
88
|
+
|
|
55
89
|
For development, use `devnet` and request free test SOL from the official faucet:
|
|
56
90
|
|
|
57
91
|
```txt
|
|
@@ -75,6 +109,21 @@ The module auto-imports these composables from direct `@vue-solana/vue/*` subpat
|
|
|
75
109
|
- `useSolanaSignMessage()`
|
|
76
110
|
- `useSolanaSignAndSendTransaction()`
|
|
77
111
|
|
|
112
|
+
| Composable | Purpose |
|
|
113
|
+
| ------------------------------------ | -------------------------------------------------------------------------------- |
|
|
114
|
+
| `useSolana()` | Full Solana context. |
|
|
115
|
+
| `useSolanaRpc()` | Cluster, endpoint, connection status, latest blockhash, and `checkConnection()`. |
|
|
116
|
+
| `useSolanaConnection()` | Raw Solana `Connection`. |
|
|
117
|
+
| `useSolanaAccountInfo()` | Account info reads and optional subscriptions. |
|
|
118
|
+
| `useSolanaWallet()` | Active wallet state and connect/disconnect actions. |
|
|
119
|
+
| `useSolanaWallets()` | Wallet discovery, selected wallet state, and selection actions. |
|
|
120
|
+
| `useSolanaBalance()` | Lamport balance reads. |
|
|
121
|
+
| `useSolanaProgramAccounts()` | Program account scans with filters and `dataSlice`. |
|
|
122
|
+
| `useSolanaTransactionConfirmation()` | Confirmation state for an already submitted signature. |
|
|
123
|
+
| `useSolanaSignatureStatus()` | Signature status reads with optional polling or websocket subscription. |
|
|
124
|
+
| `useSolanaSignMessage()` | Wallet message signing. |
|
|
125
|
+
| `useSolanaSignAndSendTransaction()` | Wallet transaction signing, sending, and optional confirmation. |
|
|
126
|
+
|
|
78
127
|
The runtime plugin is client-only. Auto-imported composables can be called during SSR and return inert state until hydration provides the real client context. Trigger RPC and wallet work from client lifecycle hooks or user actions.
|
|
79
128
|
|
|
80
129
|
Android Mobile Wallet Adapter registration also runs only on the client. On Android Chrome and Chrome PWAs, `Mobile Wallet Adapter` can appear in the same `useSolanaWallets()` list as browser extension wallets. On iOS browsers, Phantom, Solflare, and Backpack can appear in the same list through wallet-specific universal links. Desktop native app wallet adapters are planned but not implemented yet.
|
|
@@ -216,37 +265,16 @@ npx skills add vue-solana/vue-solana --skill vue-solana
|
|
|
216
265
|
|
|
217
266
|
Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
|
|
218
267
|
|
|
219
|
-
##
|
|
220
|
-
|
|
221
|
-
`@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.
|
|
222
|
-
|
|
223
|
-
If TypeScript cannot resolve `@solana/web3-compat`, add `types/web3-compat.d.ts` to your app:
|
|
224
|
-
|
|
225
|
-
```ts
|
|
226
|
-
declare module "@solana/web3-compat" {
|
|
227
|
-
export type {
|
|
228
|
-
AccountInfo,
|
|
229
|
-
Commitment,
|
|
230
|
-
RpcResponseAndContext,
|
|
231
|
-
SendOptions,
|
|
232
|
-
SignatureResult,
|
|
233
|
-
SignatureStatus,
|
|
234
|
-
TransactionSignature,
|
|
235
|
-
} from "@solana/web3.js";
|
|
236
|
-
export {
|
|
237
|
-
Connection,
|
|
238
|
-
Keypair,
|
|
239
|
-
PublicKey,
|
|
240
|
-
SystemProgram,
|
|
241
|
-
Transaction,
|
|
242
|
-
TransactionInstruction,
|
|
243
|
-
VersionedTransaction,
|
|
244
|
-
} from "@solana/web3.js";
|
|
245
|
-
}
|
|
246
|
-
```
|
|
268
|
+
## Caveats
|
|
247
269
|
|
|
248
|
-
|
|
270
|
+
- 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.
|
|
271
|
+
- Nuxt module options are stored in public runtime config, so they must be JSON-serializable.
|
|
272
|
+
- Public Solana RPC endpoints are useful for development, but production apps should use dedicated RPC infrastructure.
|
|
273
|
+
- Broad `useSolanaProgramAccounts()` scans can be expensive or blocked on public RPC nodes. Prefer narrow filters and `dataSlice`.
|
|
274
|
+
- Use `mainnet-beta` for Solana mainnet. `mainnet` is intentionally not accepted as a cluster alias.
|
|
275
|
+
- `@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.
|
|
276
|
+
- Desktop native app wallets are planned but not implemented yet.
|
|
249
277
|
|
|
250
278
|
## Status
|
|
251
279
|
|
|
252
|
-
This package
|
|
280
|
+
This package provides RPC, balance, browser extension wallet, Android mobile wallet, iOS browser wallet, message signing, and transaction composables for Nuxt apps.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-solana/nuxt",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Nuxt module for Solana applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@vue-solana/core": "0.7.
|
|
42
|
-
"@vue-solana/vue": "0.8.
|
|
41
|
+
"@vue-solana/core": "0.7.1",
|
|
42
|
+
"@vue-solana/vue": "0.8.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@solana/web3-compat": "^0.0.21",
|