@vue-solana/nuxt 0.1.2 → 0.1.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 CHANGED
@@ -26,24 +26,24 @@ npm install @vue-solana/nuxt @vue-solana/vue @vue-solana/core @solana/web3-compa
26
26
 
27
27
  ```ts
28
28
  export default defineNuxtConfig({
29
- modules: ['@vue-solana/nuxt'],
29
+ modules: ["@vue-solana/nuxt"],
30
30
  solana: {
31
- cluster: 'devnet'
32
- }
33
- })
31
+ cluster: "devnet",
32
+ },
33
+ });
34
34
  ```
35
35
 
36
36
  You can also configure a custom RPC endpoint:
37
37
 
38
38
  ```ts
39
39
  export default defineNuxtConfig({
40
- modules: ['@vue-solana/nuxt'],
40
+ modules: ["@vue-solana/nuxt"],
41
41
  solana: {
42
- cluster: 'mainnet-beta',
43
- endpoint: 'https://your-rpc.example.com',
44
- commitment: 'confirmed'
45
- }
46
- })
42
+ cluster: "mainnet-beta",
43
+ endpoint: "https://your-rpc.example.com",
44
+ commitment: "confirmed",
45
+ },
46
+ });
47
47
  ```
48
48
 
49
49
  Supported clusters are `mainnet-beta`, `devnet`, `testnet`, and `localnet`. Use `mainnet-beta` for Solana mainnet; this is Solana's official cluster name.
@@ -69,13 +69,7 @@ The module auto-imports these composables from `@vue-solana/vue`:
69
69
 
70
70
  ```vue
71
71
  <script setup lang="ts">
72
- const {
73
- cluster,
74
- endpoint,
75
- status,
76
- latestBlockhash,
77
- checkConnection
78
- } = useSolanaRpc()
72
+ const { cluster, endpoint, status, latestBlockhash, checkConnection } = useSolanaRpc();
79
73
  </script>
80
74
 
81
75
  <template>
@@ -93,8 +87,8 @@ const {
93
87
 
94
88
  ```vue
95
89
  <script setup lang="ts">
96
- const address = ref('PASTE_A_SOLANA_ADDRESS')
97
- const { balance, loading, error, refresh } = useSolanaBalance(address)
90
+ const address = ref("PASTE_A_SOLANA_ADDRESS");
91
+ const { balance, loading, error, refresh } = useSolanaBalance(address);
98
92
  </script>
99
93
 
100
94
  <template>
@@ -111,7 +105,7 @@ const { balance, loading, error, refresh } = useSolanaBalance(address)
111
105
 
112
106
  ```vue
113
107
  <script setup lang="ts">
114
- const { publicKey, connected, connect, disconnect } = useSolanaWallet()
108
+ const { publicKey, connected, connect, disconnect } = useSolanaWallet();
115
109
  </script>
116
110
 
117
111
  <template>
@@ -143,12 +137,8 @@ Source: [`examples/nuxt`](https://github.com/vue-solana/vue-solana/tree/main/exa
143
137
  If TypeScript cannot resolve `@solana/web3-compat`, add `types/web3-compat.d.ts` to your app:
144
138
 
145
139
  ```ts
146
- declare module '@solana/web3-compat' {
147
- export type {
148
- Commitment,
149
- SendOptions,
150
- TransactionSignature
151
- } from '@solana/web3.js'
140
+ declare module "@solana/web3-compat" {
141
+ export type { Commitment, SendOptions, TransactionSignature } from "@solana/web3.js";
152
142
  export {
153
143
  Connection,
154
144
  Keypair,
@@ -156,8 +146,8 @@ declare module '@solana/web3-compat' {
156
146
  SystemProgram,
157
147
  Transaction,
158
148
  TransactionInstruction,
159
- VersionedTransaction
160
- } from '@solana/web3.js'
149
+ VersionedTransaction,
150
+ } from "@solana/web3.js";
161
151
  }
162
152
  ```
163
153
 
package/dist/module.cjs CHANGED
@@ -24,7 +24,11 @@ const module$1 = kit.defineNuxtModule({
24
24
  { name: "useBalance", as: "useSolanaBalance", from: "@vue-solana/vue" },
25
25
  { name: "useConnection", as: "useSolanaConnection", from: "@vue-solana/vue" },
26
26
  { name: "useRpc", as: "useSolanaRpc", from: "@vue-solana/vue" },
27
- { name: "useSignAndSendTransaction", as: "useSolanaSignAndSendTransaction", from: "@vue-solana/vue" },
27
+ {
28
+ name: "useSignAndSendTransaction",
29
+ as: "useSolanaSignAndSendTransaction",
30
+ from: "@vue-solana/vue"
31
+ },
28
32
  { name: "useSolana", as: "useSolana", from: "@vue-solana/vue" },
29
33
  { name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue" }
30
34
  ]);
package/dist/module.d.cts CHANGED
@@ -1,9 +1,8 @@
1
1
  import { defineNuxtModule } from '@nuxt/kit';
2
2
  import { SolanaConfig } from '@vue-solana/core';
3
3
 
4
- interface ModuleOptions extends SolanaConfig {
5
- }
6
- type DefinedNuxtModule = ReturnType<ReturnType<typeof defineNuxtModule<ModuleOptions>>['with']>;
4
+ type ModuleOptions = SolanaConfig;
5
+ type DefinedNuxtModule = ReturnType<ReturnType<typeof defineNuxtModule<ModuleOptions>>["with"]>;
7
6
  declare const module$1: DefinedNuxtModule;
8
7
 
9
8
  export = module$1;
package/dist/module.d.mts CHANGED
@@ -1,9 +1,8 @@
1
1
  import { defineNuxtModule } from '@nuxt/kit';
2
2
  import { SolanaConfig } from '@vue-solana/core';
3
3
 
4
- interface ModuleOptions extends SolanaConfig {
5
- }
6
- type DefinedNuxtModule = ReturnType<ReturnType<typeof defineNuxtModule<ModuleOptions>>['with']>;
4
+ type ModuleOptions = SolanaConfig;
5
+ type DefinedNuxtModule = ReturnType<ReturnType<typeof defineNuxtModule<ModuleOptions>>["with"]>;
7
6
  declare const module$1: DefinedNuxtModule;
8
7
 
9
8
  export { module$1 as default };
package/dist/module.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import { defineNuxtModule } from '@nuxt/kit';
2
2
  import { SolanaConfig } from '@vue-solana/core';
3
3
 
4
- interface ModuleOptions extends SolanaConfig {
5
- }
6
- type DefinedNuxtModule = ReturnType<ReturnType<typeof defineNuxtModule<ModuleOptions>>['with']>;
4
+ type ModuleOptions = SolanaConfig;
5
+ type DefinedNuxtModule = ReturnType<ReturnType<typeof defineNuxtModule<ModuleOptions>>["with"]>;
7
6
  declare const module$1: DefinedNuxtModule;
8
7
 
9
8
  export = module$1;
package/dist/module.mjs CHANGED
@@ -21,7 +21,11 @@ const module$1 = defineNuxtModule({
21
21
  { name: "useBalance", as: "useSolanaBalance", from: "@vue-solana/vue" },
22
22
  { name: "useConnection", as: "useSolanaConnection", from: "@vue-solana/vue" },
23
23
  { name: "useRpc", as: "useSolanaRpc", from: "@vue-solana/vue" },
24
- { name: "useSignAndSendTransaction", as: "useSolanaSignAndSendTransaction", from: "@vue-solana/vue" },
24
+ {
25
+ name: "useSignAndSendTransaction",
26
+ as: "useSolanaSignAndSendTransaction",
27
+ from: "@vue-solana/vue"
28
+ },
25
29
  { name: "useSolana", as: "useSolana", from: "@vue-solana/vue" },
26
30
  { name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue" }
27
31
  ]);
@@ -5,13 +5,15 @@ const _app = require('#app');
5
5
 
6
6
  const plugin = _app.defineNuxtPlugin((nuxtApp) => {
7
7
  const config = _app.useRuntimeConfig().public.solana;
8
- nuxtApp.vueApp.use(vue.createSolanaPlugin({
9
- cluster: config.cluster,
10
- endpoint: config.endpoint,
11
- wsEndpoint: config.wsEndpoint,
12
- commitment: config.commitment,
13
- autoConnect: config.autoConnect
14
- }));
8
+ nuxtApp.vueApp.use(
9
+ vue.createSolanaPlugin({
10
+ cluster: config.cluster,
11
+ endpoint: config.endpoint,
12
+ wsEndpoint: config.wsEndpoint,
13
+ commitment: config.commitment,
14
+ autoConnect: config.autoConnect
15
+ })
16
+ );
15
17
  });
16
18
 
17
19
  module.exports = plugin;
@@ -3,13 +3,15 @@ import { defineNuxtPlugin, useRuntimeConfig } from '#app';
3
3
 
4
4
  const plugin = defineNuxtPlugin((nuxtApp) => {
5
5
  const config = useRuntimeConfig().public.solana;
6
- nuxtApp.vueApp.use(createSolanaPlugin({
7
- cluster: config.cluster,
8
- endpoint: config.endpoint,
9
- wsEndpoint: config.wsEndpoint,
10
- commitment: config.commitment,
11
- autoConnect: config.autoConnect
12
- }));
6
+ nuxtApp.vueApp.use(
7
+ createSolanaPlugin({
8
+ cluster: config.cluster,
9
+ endpoint: config.endpoint,
10
+ wsEndpoint: config.wsEndpoint,
11
+ commitment: config.commitment,
12
+ autoConnect: config.autoConnect
13
+ })
14
+ );
13
15
  });
14
16
 
15
17
  export { plugin as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-solana/nuxt",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Nuxt module for Solana applications.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -39,16 +39,16 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@vue-solana/core": "0.1.2",
42
- "@vue-solana/vue": "0.1.2"
42
+ "@vue-solana/vue": "0.1.3"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@solana/web3-compat": "^0.0.21",
46
46
  "nuxt": "^3.0.0 || ^4.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@nuxt/kit": "^3.17.5",
49
+ "@nuxt/kit": "^4.4.6",
50
50
  "@solana/web3-compat": "^0.0.21",
51
- "nuxt": "^3.17.5",
51
+ "nuxt": "^4.4.6",
52
52
  "typescript": "^5.8.3",
53
53
  "unbuild": "^3.5.0",
54
54
  "vue": "^3.5.16"