@vue-solana/nuxt 0.3.1 → 0.4.0
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 +4 -0
- package/dist/module.cjs +6 -1
- package/dist/module.d.cts +1 -1
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.mjs +6 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -50,6 +50,8 @@ export default defineNuxtConfig({
|
|
|
50
50
|
|
|
51
51
|
Supported clusters are `mainnet-beta`, `devnet`, `testnet`, and `localnet`. Use `mainnet-beta` for Solana mainnet; this is Solana's official cluster name.
|
|
52
52
|
|
|
53
|
+
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
|
+
|
|
53
55
|
For development, use `devnet` and request free test SOL from the official faucet:
|
|
54
56
|
|
|
55
57
|
```txt
|
|
@@ -138,6 +140,8 @@ const { publicKey, connected, connect, disconnect } = useSolanaWallet();
|
|
|
138
140
|
|
|
139
141
|
Browser extension wallets are discovered through the Solana Wallet Standard. Android Mobile Wallet Adapter wallets are registered through `@solana-mobile/wallet-standard-mobile` on supported Android Chrome clients and exposed through the same wallet list. Wallet actions work after selecting a discovered wallet or configuring a custom `SolanaWallet`.
|
|
140
142
|
|
|
143
|
+
Selected discovered wallets are persisted under `localStorage["vue-solana:selected-wallet"]` as non-sensitive identity metadata: `name`, and `platform`/`source` when available. On reload, Vue Solana restores the selected wallet if the same wallet is discovered again. Set `solana.autoConnect: true` to opt into calling `connect()` for that restored wallet; arbitrary installed wallets are never auto-connected. Calling `selectWallet(null)` or `setWallet(customWallet)` clears the stored selection.
|
|
144
|
+
|
|
141
145
|
## Example App
|
|
142
146
|
|
|
143
147
|
This README includes small snippets for quick reference. For a complete runnable Nuxt flow, see the example app:
|
package/dist/module.cjs
CHANGED
|
@@ -33,7 +33,7 @@ const module$1 = kit.defineNuxtModule({
|
|
|
33
33
|
const publicConfig = nuxt.options.runtimeConfig.public;
|
|
34
34
|
publicConfig.solana = {
|
|
35
35
|
...typeof publicConfig.solana === "object" && publicConfig.solana !== null ? publicConfig.solana : {},
|
|
36
|
-
...options
|
|
36
|
+
...toPublicSolanaConfig(options)
|
|
37
37
|
};
|
|
38
38
|
nuxt.options.vite.optimizeDeps ??= {};
|
|
39
39
|
nuxt.options.vite.optimizeDeps.include = Array.from(
|
|
@@ -65,5 +65,10 @@ const module$1 = kit.defineNuxtModule({
|
|
|
65
65
|
]);
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
+
function toPublicSolanaConfig(options) {
|
|
69
|
+
const runtimeOptions = { ...options };
|
|
70
|
+
delete runtimeOptions.wallet;
|
|
71
|
+
return runtimeOptions;
|
|
72
|
+
}
|
|
68
73
|
|
|
69
74
|
module.exports = module$1;
|
package/dist/module.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineNuxtModule } from '@nuxt/kit';
|
|
2
2
|
import { VueSolanaPluginOptions } from '@vue-solana/vue';
|
|
3
3
|
|
|
4
|
-
type ModuleOptions = VueSolanaPluginOptions
|
|
4
|
+
type ModuleOptions = Omit<VueSolanaPluginOptions, "wallet">;
|
|
5
5
|
type DefinedNuxtModule = ReturnType<ReturnType<typeof defineNuxtModule<ModuleOptions>>["with"]>;
|
|
6
6
|
declare const module$1: DefinedNuxtModule;
|
|
7
7
|
|
package/dist/module.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineNuxtModule } from '@nuxt/kit';
|
|
2
2
|
import { VueSolanaPluginOptions } from '@vue-solana/vue';
|
|
3
3
|
|
|
4
|
-
type ModuleOptions = VueSolanaPluginOptions
|
|
4
|
+
type ModuleOptions = Omit<VueSolanaPluginOptions, "wallet">;
|
|
5
5
|
type DefinedNuxtModule = ReturnType<ReturnType<typeof defineNuxtModule<ModuleOptions>>["with"]>;
|
|
6
6
|
declare const module$1: DefinedNuxtModule;
|
|
7
7
|
|
package/dist/module.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineNuxtModule } from '@nuxt/kit';
|
|
2
2
|
import { VueSolanaPluginOptions } from '@vue-solana/vue';
|
|
3
3
|
|
|
4
|
-
type ModuleOptions = VueSolanaPluginOptions
|
|
4
|
+
type ModuleOptions = Omit<VueSolanaPluginOptions, "wallet">;
|
|
5
5
|
type DefinedNuxtModule = ReturnType<ReturnType<typeof defineNuxtModule<ModuleOptions>>["with"]>;
|
|
6
6
|
declare const module$1: DefinedNuxtModule;
|
|
7
7
|
|
package/dist/module.mjs
CHANGED
|
@@ -30,7 +30,7 @@ const module$1 = defineNuxtModule({
|
|
|
30
30
|
const publicConfig = nuxt.options.runtimeConfig.public;
|
|
31
31
|
publicConfig.solana = {
|
|
32
32
|
...typeof publicConfig.solana === "object" && publicConfig.solana !== null ? publicConfig.solana : {},
|
|
33
|
-
...options
|
|
33
|
+
...toPublicSolanaConfig(options)
|
|
34
34
|
};
|
|
35
35
|
nuxt.options.vite.optimizeDeps ??= {};
|
|
36
36
|
nuxt.options.vite.optimizeDeps.include = Array.from(
|
|
@@ -62,5 +62,10 @@ const module$1 = defineNuxtModule({
|
|
|
62
62
|
]);
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
+
function toPublicSolanaConfig(options) {
|
|
66
|
+
const runtimeOptions = { ...options };
|
|
67
|
+
delete runtimeOptions.wallet;
|
|
68
|
+
return runtimeOptions;
|
|
69
|
+
}
|
|
65
70
|
|
|
66
71
|
export { module$1 as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-solana/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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.
|
|
42
|
-
"@vue-solana/vue": "0.
|
|
41
|
+
"@vue-solana/core": "0.4.2",
|
|
42
|
+
"@vue-solana/vue": "0.5.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@solana/web3-compat": "^0.0.21",
|