@vue-solana/nuxt 0.1.3 → 0.2.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 +18 -7
- package/dist/module.cjs +2 -1
- package/dist/module.mjs +2 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -9,8 +9,8 @@ New to Solana? Start with the official docs and the project concepts guide:
|
|
|
9
9
|
- [Solana Documentation](https://solana.com/docs)
|
|
10
10
|
- [Solana RPC Methods](https://solana.com/docs/rpc)
|
|
11
11
|
- [Solana Clusters](https://solana.com/docs/references/clusters)
|
|
12
|
-
- [Vue Solana Concepts Guide](https://
|
|
13
|
-
- [`@vue-solana/nuxt` docs](https://
|
|
12
|
+
- [Vue Solana Concepts Guide](https://vue-solana-docs.vercel.app/concepts/solana-for-vue-developers)
|
|
13
|
+
- [`@vue-solana/nuxt` docs](https://vue-solana-docs.vercel.app/packages/nuxt)
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
|
|
@@ -105,20 +105,31 @@ const { balance, loading, error, refresh } = useSolanaBalance(address);
|
|
|
105
105
|
|
|
106
106
|
```vue
|
|
107
107
|
<script setup lang="ts">
|
|
108
|
+
const { wallets, selectedWallet, selectWallet, refreshWallets } = useSolanaWallets();
|
|
108
109
|
const { publicKey, connected, connect, disconnect } = useSolanaWallet();
|
|
109
110
|
</script>
|
|
110
111
|
|
|
111
112
|
<template>
|
|
112
113
|
<section>
|
|
114
|
+
<button type="button" @click="refreshWallets">Refresh Wallets</button>
|
|
115
|
+
<button
|
|
116
|
+
v-for="wallet in wallets"
|
|
117
|
+
:key="wallet.name"
|
|
118
|
+
type="button"
|
|
119
|
+
@click="selectWallet(wallet)"
|
|
120
|
+
>
|
|
121
|
+
{{ wallet.name }}
|
|
122
|
+
</button>
|
|
123
|
+
<p>Selected: {{ selectedWallet?.name ?? "None" }}</p>
|
|
113
124
|
<p>Connected: {{ connected }}</p>
|
|
114
125
|
<p>Public key: {{ publicKey?.toBase58() }}</p>
|
|
115
|
-
<button type="button" @click="connect">Connect</button>
|
|
116
|
-
<button type="button" @click="disconnect">Disconnect</button>
|
|
126
|
+
<button type="button" :disabled="!selectedWallet || connected" @click="connect">Connect</button>
|
|
127
|
+
<button type="button" :disabled="!connected" @click="disconnect">Disconnect</button>
|
|
117
128
|
</section>
|
|
118
129
|
</template>
|
|
119
130
|
```
|
|
120
131
|
|
|
121
|
-
Browser
|
|
132
|
+
Browser wallets are discovered through the Solana Wallet Standard. Wallet actions work after selecting a discovered wallet or configuring a custom `SolanaWallet`.
|
|
122
133
|
|
|
123
134
|
## Example App
|
|
124
135
|
|
|
@@ -128,7 +139,7 @@ This README includes small snippets for quick reference. For a complete runnable
|
|
|
128
139
|
pnpm dev:nuxt
|
|
129
140
|
```
|
|
130
141
|
|
|
131
|
-
|
|
142
|
+
Docs: [`examples/nuxt`](https://vue-solana-docs.vercel.app/examples/nuxt)
|
|
132
143
|
|
|
133
144
|
## Known TypeScript Issue
|
|
134
145
|
|
|
@@ -155,4 +166,4 @@ Make sure your `tsconfig.json` includes `types/**/*.d.ts` or another pattern tha
|
|
|
155
166
|
|
|
156
167
|
## Status
|
|
157
168
|
|
|
158
|
-
This package is early-stage. RPC and
|
|
169
|
+
This package is early-stage. RPC, balance, wallet, and transaction composables are usable in Nuxt apps.
|
package/dist/module.cjs
CHANGED
|
@@ -30,7 +30,8 @@ const module$1 = kit.defineNuxtModule({
|
|
|
30
30
|
from: "@vue-solana/vue"
|
|
31
31
|
},
|
|
32
32
|
{ name: "useSolana", as: "useSolana", from: "@vue-solana/vue" },
|
|
33
|
-
{ name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue" }
|
|
33
|
+
{ name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue" },
|
|
34
|
+
{ name: "useWallets", as: "useSolanaWallets", from: "@vue-solana/vue" }
|
|
34
35
|
]);
|
|
35
36
|
}
|
|
36
37
|
});
|
package/dist/module.mjs
CHANGED
|
@@ -27,7 +27,8 @@ const module$1 = defineNuxtModule({
|
|
|
27
27
|
from: "@vue-solana/vue"
|
|
28
28
|
},
|
|
29
29
|
{ name: "useSolana", as: "useSolana", from: "@vue-solana/vue" },
|
|
30
|
-
{ name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue" }
|
|
30
|
+
{ name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue" },
|
|
31
|
+
{ name: "useWallets", as: "useSolanaWallets", from: "@vue-solana/vue" }
|
|
31
32
|
]);
|
|
32
33
|
}
|
|
33
34
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-solana/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.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/
|
|
42
|
-
"@vue-solana/
|
|
41
|
+
"@vue-solana/vue": "0.2.0",
|
|
42
|
+
"@vue-solana/core": "0.2.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@solana/web3-compat": "^0.0.21",
|