@vue-solana/nuxt 0.1.3 → 0.2.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 +21 -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,9 @@ 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
|
+
- [Live demo](https://vue-solana-docs.vercel.app/demo)
|
|
14
15
|
|
|
15
16
|
## Install
|
|
16
17
|
|
|
@@ -105,20 +106,31 @@ const { balance, loading, error, refresh } = useSolanaBalance(address);
|
|
|
105
106
|
|
|
106
107
|
```vue
|
|
107
108
|
<script setup lang="ts">
|
|
109
|
+
const { wallets, selectedWallet, selectWallet, refreshWallets } = useSolanaWallets();
|
|
108
110
|
const { publicKey, connected, connect, disconnect } = useSolanaWallet();
|
|
109
111
|
</script>
|
|
110
112
|
|
|
111
113
|
<template>
|
|
112
114
|
<section>
|
|
115
|
+
<button type="button" @click="refreshWallets">Refresh Wallets</button>
|
|
116
|
+
<button
|
|
117
|
+
v-for="wallet in wallets"
|
|
118
|
+
:key="wallet.name"
|
|
119
|
+
type="button"
|
|
120
|
+
@click="selectWallet(wallet)"
|
|
121
|
+
>
|
|
122
|
+
{{ wallet.name }}
|
|
123
|
+
</button>
|
|
124
|
+
<p>Selected: {{ selectedWallet?.name ?? "None" }}</p>
|
|
113
125
|
<p>Connected: {{ connected }}</p>
|
|
114
126
|
<p>Public key: {{ publicKey?.toBase58() }}</p>
|
|
115
|
-
<button type="button" @click="connect">Connect</button>
|
|
116
|
-
<button type="button" @click="disconnect">Disconnect</button>
|
|
127
|
+
<button type="button" :disabled="!selectedWallet || connected" @click="connect">Connect</button>
|
|
128
|
+
<button type="button" :disabled="!connected" @click="disconnect">Disconnect</button>
|
|
117
129
|
</section>
|
|
118
130
|
</template>
|
|
119
131
|
```
|
|
120
132
|
|
|
121
|
-
Browser
|
|
133
|
+
Browser wallets are discovered through the Solana Wallet Standard. Wallet actions work after selecting a discovered wallet or configuring a custom `SolanaWallet`.
|
|
122
134
|
|
|
123
135
|
## Example App
|
|
124
136
|
|
|
@@ -128,7 +140,9 @@ This README includes small snippets for quick reference. For a complete runnable
|
|
|
128
140
|
pnpm dev:nuxt
|
|
129
141
|
```
|
|
130
142
|
|
|
131
|
-
|
|
143
|
+
Docs: <a href="https://vue-solana-docs.vercel.app/examples/nuxt" target="_blank" rel="noopener noreferrer"><code>examples/nuxt</code></a>
|
|
144
|
+
|
|
145
|
+
Live demo: [vue-solana-docs.vercel.app/demo](https://vue-solana-docs.vercel.app/demo)
|
|
132
146
|
|
|
133
147
|
## Known TypeScript Issue
|
|
134
148
|
|
|
@@ -155,4 +169,4 @@ Make sure your `tsconfig.json` includes `types/**/*.d.ts` or another pattern tha
|
|
|
155
169
|
|
|
156
170
|
## Status
|
|
157
171
|
|
|
158
|
-
This package is early-stage. RPC and
|
|
172
|
+
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.1
|
|
3
|
+
"version": "0.2.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.1
|
|
42
|
-
"@vue-solana/vue": "0.1
|
|
41
|
+
"@vue-solana/core": "0.2.1",
|
|
42
|
+
"@vue-solana/vue": "0.2.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@solana/web3-compat": "^0.0.21",
|