@vue-solana/nuxt 0.4.0 → 0.5.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
@@ -65,9 +65,13 @@ The module auto-imports these composables from direct `@vue-solana/vue/*` subpat
65
65
  - `useSolana()`
66
66
  - `useSolanaRpc()`
67
67
  - `useSolanaConnection()`
68
+ - `useSolanaAccountInfo()`
68
69
  - `useSolanaWallet()`
69
70
  - `useSolanaWallets()`
70
71
  - `useSolanaBalance()`
72
+ - `useSolanaProgramAccounts()`
73
+ - `useSolanaTransactionConfirmation()`
74
+ - `useSolanaSignatureStatus()`
71
75
  - `useSolanaSignAndSendTransaction()`
72
76
 
73
77
  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.
@@ -110,6 +114,25 @@ const { balance, loading, error, refresh } = useSolanaBalance(address);
110
114
  </template>
111
115
  ```
112
116
 
117
+ ## Read Account Data
118
+
119
+ ```vue
120
+ <script setup lang="ts">
121
+ const address = ref("PASTE_A_SOLANA_ADDRESS");
122
+ const programId = ref("PASTE_A_SOLANA_PROGRAM_ID");
123
+ const signature = ref("PASTE_A_TRANSACTION_SIGNATURE");
124
+
125
+ const account = useSolanaAccountInfo(address, { watch: true });
126
+ const programAccounts = useSolanaProgramAccounts(programId, {
127
+ dataSlice: { offset: 0, length: 32 },
128
+ filters: [{ dataSize: 165 }],
129
+ });
130
+ const signatureStatus = useSolanaSignatureStatus(signature, { pollIntervalMs: 2_000 });
131
+ </script>
132
+ ```
133
+
134
+ Use `useSolanaProgramAccounts()` carefully on public RPC nodes. Prefer narrow filters, use `dataSlice` for partial reads, and avoid polling broad scans.
135
+
113
136
  ## Wallet State
114
137
 
115
138
  ```vue
@@ -172,7 +195,15 @@ If TypeScript cannot resolve `@solana/web3-compat`, add `types/web3-compat.d.ts`
172
195
 
173
196
  ```ts
174
197
  declare module "@solana/web3-compat" {
175
- export type { Commitment, SendOptions, TransactionSignature } from "@solana/web3.js";
198
+ export type {
199
+ AccountInfo,
200
+ Commitment,
201
+ RpcResponseAndContext,
202
+ SendOptions,
203
+ SignatureResult,
204
+ SignatureStatus,
205
+ TransactionSignature,
206
+ } from "@solana/web3.js";
176
207
  export {
177
208
  Connection,
178
209
  Keypair,
package/dist/module.cjs CHANGED
@@ -51,15 +51,35 @@ const module$1 = kit.defineNuxtModule({
51
51
  mode: "client"
52
52
  });
53
53
  kit.addImports([
54
+ {
55
+ name: "useAccountInfo",
56
+ as: "useSolanaAccountInfo",
57
+ from: "@vue-solana/vue/useAccountInfo"
58
+ },
54
59
  { name: "useBalance", as: "useSolanaBalance", from: "@vue-solana/vue/useBalance" },
55
60
  { name: "useConnection", as: "useSolanaConnection", from: "@vue-solana/vue/useConnection" },
61
+ {
62
+ name: "useProgramAccounts",
63
+ as: "useSolanaProgramAccounts",
64
+ from: "@vue-solana/vue/useProgramAccounts"
65
+ },
56
66
  { name: "useRpc", as: "useSolanaRpc", from: "@vue-solana/vue/useRpc" },
57
67
  {
58
68
  name: "useSignAndSendTransaction",
59
69
  as: "useSolanaSignAndSendTransaction",
60
70
  from: "@vue-solana/vue/useSignAndSendTransaction"
61
71
  },
72
+ {
73
+ name: "useSignatureStatus",
74
+ as: "useSolanaSignatureStatus",
75
+ from: "@vue-solana/vue/useSignatureStatus"
76
+ },
62
77
  { name: "useSolana", as: "useSolana", from: "@vue-solana/vue/useSolana" },
78
+ {
79
+ name: "useTransactionConfirmation",
80
+ as: "useSolanaTransactionConfirmation",
81
+ from: "@vue-solana/vue/useTransactionConfirmation"
82
+ },
63
83
  { name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue/useWallet" },
64
84
  { name: "useWallets", as: "useSolanaWallets", from: "@vue-solana/vue/useWallets" }
65
85
  ]);
package/dist/module.mjs CHANGED
@@ -48,15 +48,35 @@ const module$1 = defineNuxtModule({
48
48
  mode: "client"
49
49
  });
50
50
  addImports([
51
+ {
52
+ name: "useAccountInfo",
53
+ as: "useSolanaAccountInfo",
54
+ from: "@vue-solana/vue/useAccountInfo"
55
+ },
51
56
  { name: "useBalance", as: "useSolanaBalance", from: "@vue-solana/vue/useBalance" },
52
57
  { name: "useConnection", as: "useSolanaConnection", from: "@vue-solana/vue/useConnection" },
58
+ {
59
+ name: "useProgramAccounts",
60
+ as: "useSolanaProgramAccounts",
61
+ from: "@vue-solana/vue/useProgramAccounts"
62
+ },
53
63
  { name: "useRpc", as: "useSolanaRpc", from: "@vue-solana/vue/useRpc" },
54
64
  {
55
65
  name: "useSignAndSendTransaction",
56
66
  as: "useSolanaSignAndSendTransaction",
57
67
  from: "@vue-solana/vue/useSignAndSendTransaction"
58
68
  },
69
+ {
70
+ name: "useSignatureStatus",
71
+ as: "useSolanaSignatureStatus",
72
+ from: "@vue-solana/vue/useSignatureStatus"
73
+ },
59
74
  { name: "useSolana", as: "useSolana", from: "@vue-solana/vue/useSolana" },
75
+ {
76
+ name: "useTransactionConfirmation",
77
+ as: "useSolanaTransactionConfirmation",
78
+ from: "@vue-solana/vue/useTransactionConfirmation"
79
+ },
60
80
  { name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue/useWallet" },
61
81
  { name: "useWallets", as: "useSolanaWallets", from: "@vue-solana/vue/useWallets" }
62
82
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-solana/nuxt",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
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.4.2",
42
- "@vue-solana/vue": "0.5.0"
41
+ "@vue-solana/core": "0.5.1",
42
+ "@vue-solana/vue": "0.6.1"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@solana/web3-compat": "^0.0.21",