@vue-solana/vue 2.0.0 → 2.1.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 +159 -21
- package/dist/index.cjs +58 -20
- package/dist/index.d.cts +25 -5
- package/dist/index.d.mts +25 -5
- package/dist/index.d.ts +25 -5
- package/dist/index.mjs +37 -19
- package/dist/shared/vue.5euWd6-V.mjs +59 -0
- package/dist/shared/vue.9TPxZPMf.cjs +59 -0
- package/dist/shared/vue.B4-LEdSE.cjs +102 -0
- package/dist/shared/{vue.CP1DPDX9.cjs → vue.B6ainw2G.cjs} +1 -1
- package/dist/shared/vue.B8LptjZP.mjs +32 -0
- package/dist/shared/vue.B8pLQ8P4.cjs +105 -0
- package/dist/shared/vue.B8ub540p.mjs +109 -0
- package/dist/shared/{vue.DP7qY8Rk.mjs → vue.BD6Gm1nl.mjs} +2 -2
- package/dist/shared/{vue.BAlo-tIh.cjs → vue.BGxz4dru.cjs} +5 -1
- package/dist/shared/{vue.stUBDBI9.mjs → vue.BINkrA8h.mjs} +2 -2
- package/dist/shared/{vue.k9Q6aN-0.cjs → vue.BIxphCAq.cjs} +1 -1
- package/dist/shared/{vue.yQcL1yMv.mjs → vue.BOpgWr43.mjs} +2 -2
- package/dist/shared/{vue.dPRo2X5y.mjs → vue.BQRpjwKl.mjs} +2 -2
- package/dist/shared/{vue.CZwftA0L.cjs → vue.BVaMoz9y.cjs} +1 -1
- package/dist/shared/vue.BVj9lWBK.cjs +111 -0
- package/dist/shared/vue.BY0qpgYr.cjs +35 -0
- package/dist/shared/vue.Bk5xjlUx.cjs +61 -0
- package/dist/shared/{vue.3VLZmw05.mjs → vue.BsGwt78R.mjs} +1 -1
- package/dist/shared/{vue.B_LRH8SM.cjs → vue.Bwd1sGAM.cjs} +2 -2
- package/dist/shared/vue.ByxbBC3y.mjs +57 -0
- package/dist/shared/{vue.BbMPRDeO.mjs → vue.C13umiQi.mjs} +2 -2
- package/dist/shared/vue.C5FVoEZT.mjs +99 -0
- package/dist/shared/vue.CATOh_9G.mjs +42 -0
- package/dist/shared/{vue.XQFqlMId.cjs → vue.CIs8QhCw.cjs} +2 -2
- package/dist/shared/vue.CMohL_Cz.mjs +58 -0
- package/dist/shared/{vue.CnUlZSe8.mjs → vue.CQh3AUE8.mjs} +2 -5
- package/dist/shared/{vue.CSJSK0Nq.cjs → vue.CWZSMVnB.cjs} +3 -3
- package/dist/shared/{vue.DL-yMCNc.mjs → vue.CXB4NEMA.mjs} +2 -2
- package/dist/shared/{vue.D7xFeC2m.mjs → vue.C_4qJDiF.mjs} +1 -1
- package/dist/shared/vue.CoaIWGPT.cjs +38 -0
- package/dist/shared/vue.CogzzQXM.mjs +171 -0
- package/dist/shared/{vue.ChujsB0B.mjs → vue.CpkwC8Th.mjs} +1 -1
- package/dist/shared/vue.CrkK_T15.cjs +86 -0
- package/dist/shared/{vue.BMencBpI.cjs → vue.D-qi8PSL.cjs} +2 -2
- package/dist/shared/{vue.PJjEncbP.mjs → vue.D218Ow7t.mjs} +6 -2
- package/dist/shared/{vue.B2sFJ1xI.mjs → vue.D3Y0PWbF.mjs} +1 -1
- package/dist/shared/vue.D5U1yLG3.mjs +83 -0
- package/dist/shared/{vue.CXHYdyKZ.cjs → vue.DAg5wC1G.cjs} +2 -2
- package/dist/shared/vue.DDbVk0Zh.cjs +180 -0
- package/dist/shared/{vue.BaR1VPhl.cjs → vue.DE3emjSF.cjs} +2 -6
- package/dist/shared/vue.DEHxNvUX.cjs +7 -0
- package/dist/shared/vue.DFaMJLAQ.cjs +60 -0
- package/dist/shared/vue.DImwKTwJ.mjs +103 -0
- package/dist/shared/{vue.DgCmU1RR.cjs → vue.DKyQ7J67.cjs} +1 -1
- package/dist/shared/vue.DXQVIRZA.mjs +174 -0
- package/dist/shared/vue.DYk0Xfr3.mjs +36 -0
- package/dist/shared/vue.D_P5SqqD.mjs +5 -0
- package/dist/shared/{vue.C7yR7Cs0.cjs → vue.Di7yjJ-R.cjs} +2 -2
- package/dist/shared/vue.DtCbCcPd.cjs +173 -0
- package/dist/shared/{vue.WugzPOca.mjs → vue.Dyi1OCI1.mjs} +3 -3
- package/dist/shared/{vue.CEn2purG.cjs → vue.E_npPFoV.cjs} +2 -2
- package/dist/shared/{vue.__r7YYZE.cjs → vue.FiMmnMHr.cjs} +1 -1
- package/dist/shared/{vue.CZO8TwJP.mjs → vue.JUWqu6kD.mjs} +1 -1
- package/dist/shared/{vue.BaFrF2PF.mjs → vue.Mxc8w6Qk.mjs} +1 -1
- package/dist/shared/{vue.C32ozdA1.cjs → vue.Sbbm9JSu.cjs} +1 -1
- package/dist/shared/vue.g8fnm_ca.cjs +45 -0
- package/dist/swr.cjs +136 -0
- package/dist/swr.d.cts +41 -0
- package/dist/swr.d.mts +41 -0
- package/dist/swr.d.ts +41 -0
- package/dist/swr.mjs +131 -0
- package/dist/useAccountInfo.cjs +5 -4
- package/dist/useAccountInfo.mjs +5 -4
- package/dist/useAction.cjs +9 -0
- package/dist/useAction.d.cts +45 -0
- package/dist/useAction.d.mts +45 -0
- package/dist/useAction.d.ts +45 -0
- package/dist/useAction.mjs +3 -0
- package/dist/useBalance.cjs +5 -4
- package/dist/useBalance.mjs +5 -4
- package/dist/useClientCapability.cjs +12 -0
- package/dist/useClientCapability.d.cts +39 -0
- package/dist/useClientCapability.d.mts +39 -0
- package/dist/useClientCapability.d.ts +39 -0
- package/dist/useClientCapability.mjs +5 -0
- package/dist/useConnection.cjs +4 -3
- package/dist/useConnection.mjs +4 -3
- package/dist/useIdentity.cjs +12 -0
- package/dist/useIdentity.d.cts +3 -0
- package/dist/useIdentity.d.mts +3 -0
- package/dist/useIdentity.d.ts +3 -0
- package/dist/useIdentity.mjs +6 -0
- package/dist/usePayer.cjs +13 -0
- package/dist/usePayer.d.cts +18 -0
- package/dist/usePayer.d.mts +18 -0
- package/dist/usePayer.d.ts +18 -0
- package/dist/usePayer.mjs +6 -0
- package/dist/usePlanTransaction.cjs +14 -0
- package/dist/usePlanTransaction.d.cts +37 -0
- package/dist/usePlanTransaction.d.mts +37 -0
- package/dist/usePlanTransaction.d.ts +37 -0
- package/dist/usePlanTransaction.mjs +7 -0
- package/dist/usePlanTransactions.cjs +13 -0
- package/dist/usePlanTransactions.d.cts +4 -0
- package/dist/usePlanTransactions.d.mts +4 -0
- package/dist/usePlanTransactions.d.ts +4 -0
- package/dist/usePlanTransactions.mjs +7 -0
- package/dist/useProgramAccounts.cjs +5 -4
- package/dist/useProgramAccounts.mjs +5 -4
- package/dist/useRequest.cjs +11 -0
- package/dist/useRequest.d.cts +57 -0
- package/dist/useRequest.d.mts +57 -0
- package/dist/useRequest.d.ts +57 -0
- package/dist/useRequest.mjs +5 -0
- package/dist/useRpc.cjs +3 -2
- package/dist/useRpc.mjs +3 -2
- package/dist/useSelectedWalletAccount.cjs +13 -0
- package/dist/useSelectedWalletAccount.d.cts +117 -0
- package/dist/useSelectedWalletAccount.d.mts +117 -0
- package/dist/useSelectedWalletAccount.d.ts +117 -0
- package/dist/useSelectedWalletAccount.mjs +3 -0
- package/dist/useSignAndSendTransaction.cjs +7 -6
- package/dist/useSignAndSendTransaction.mjs +7 -6
- package/dist/useSignAndSendTransactions.cjs +15 -0
- package/dist/useSignAndSendTransactions.d.cts +35 -0
- package/dist/useSignAndSendTransactions.d.mts +35 -0
- package/dist/useSignAndSendTransactions.d.ts +35 -0
- package/dist/useSignAndSendTransactions.mjs +8 -0
- package/dist/useSignIn.cjs +13 -0
- package/dist/useSignIn.d.cts +23 -0
- package/dist/useSignIn.d.mts +23 -0
- package/dist/useSignIn.d.ts +23 -0
- package/dist/useSignIn.mjs +7 -0
- package/dist/useSignMessage.cjs +4 -3
- package/dist/useSignMessage.mjs +4 -3
- package/dist/useSignTransactions.cjs +13 -0
- package/dist/useSignTransactions.d.cts +24 -0
- package/dist/useSignTransactions.d.mts +24 -0
- package/dist/useSignTransactions.d.ts +24 -0
- package/dist/useSignTransactions.mjs +7 -0
- package/dist/useSignatureStatus.cjs +5 -4
- package/dist/useSignatureStatus.mjs +5 -4
- package/dist/useSolana.cjs +2 -1
- package/dist/useSolana.mjs +2 -1
- package/dist/useSolanaClient.cjs +3 -2
- package/dist/useSolanaClient.mjs +3 -2
- package/dist/useSubscription.cjs +9 -0
- package/dist/useSubscription.d.cts +58 -0
- package/dist/useSubscription.d.mts +58 -0
- package/dist/useSubscription.d.ts +58 -0
- package/dist/useSubscription.mjs +3 -0
- package/dist/useTokenAccounts.cjs +5 -4
- package/dist/useTokenAccounts.mjs +5 -4
- package/dist/useTokenBalance.cjs +5 -4
- package/dist/useTokenBalance.mjs +5 -4
- package/dist/useTrackedData.cjs +10 -0
- package/dist/useTrackedData.d.cts +86 -0
- package/dist/useTrackedData.d.mts +86 -0
- package/dist/useTrackedData.d.ts +86 -0
- package/dist/useTrackedData.mjs +4 -0
- package/dist/useTransaction.cjs +2 -1
- package/dist/useTransaction.d.cts +12 -1
- package/dist/useTransaction.d.mts +12 -1
- package/dist/useTransaction.d.ts +12 -1
- package/dist/useTransaction.mjs +2 -1
- package/dist/useTransactionConfirmation.cjs +5 -4
- package/dist/useTransactionConfirmation.mjs +5 -4
- package/dist/useWallet.cjs +3 -2
- package/dist/useWallet.mjs +3 -2
- package/dist/useWallets.cjs +3 -2
- package/dist/useWallets.mjs +3 -2
- package/package.json +73 -3
- package/dist/shared/vue.C4d2JA8U.mjs +0 -44
- package/dist/shared/vue.CE5i8KZZ.cjs +0 -46
package/README.md
CHANGED
|
@@ -24,10 +24,15 @@ New to Solana? Start with the official docs and the project concepts guide:
|
|
|
24
24
|
- Vue plugin for shared Solana RPC and wallet context.
|
|
25
25
|
- SSR-safe composables that return inert state when no client plugin context is available.
|
|
26
26
|
- RPC status and latest blockhash reads.
|
|
27
|
-
- Balance, account info, program account,
|
|
27
|
+
- Balance, account info, program account, signature status, token account, and token balance composables.
|
|
28
28
|
- Unified wallet discovery and selection for browser extensions, Android Mobile Wallet Adapter, and supported iOS browser wallets.
|
|
29
29
|
- Message signing helpers for wallet ownership and authentication challenges.
|
|
30
|
-
-
|
|
30
|
+
- Sign In With Solana (SIWS) authentication through `useSignIn()`.
|
|
31
|
+
- App-wide selected wallet account context with persistence.
|
|
32
|
+
- Transaction submission and confirmation state helpers, including batch signing and sign-and-send.
|
|
33
|
+
- Live data composables over Kit reactive stores (`useRequest`, `useSubscription`, `useTrackedData`) plus SWR cache adapters.
|
|
34
|
+
- A generic async action state machine (`useAction`) built on `@vue-solana/core/action`.
|
|
35
|
+
- Reactive Kit client signers (`usePayer`, `useIdentity`) and transaction planning (`usePlanTransaction`, `usePlanTransactions`) with fail-fast client capability assertions.
|
|
31
36
|
- Direct subpath exports for narrower imports.
|
|
32
37
|
|
|
33
38
|
## Compatibility
|
|
@@ -74,6 +79,8 @@ createApp(App)
|
|
|
74
79
|
|
|
75
80
|
Android Mobile Wallet Adapter registration is enabled by default on supported Android Chrome clients. Pass `mobileWallet` options to customize the MWA app identity, or pass `mobileWallet: false` to disable Android mobile wallet registration.
|
|
76
81
|
|
|
82
|
+
iOS browser wallet universal links for Phantom, Solflare, and Backpack are enabled by default on iOS browsers. Pass `iosWallet` options to customize the app identity and redirect URL, or pass `iosWallet: false` to disable iOS browser wallet entries.
|
|
83
|
+
|
|
77
84
|
You can also pass a custom RPC endpoint:
|
|
78
85
|
|
|
79
86
|
```ts
|
|
@@ -99,6 +106,7 @@ Supported clusters are `mainnet-beta`, `devnet`, `testnet`, and `localnet`. Use
|
|
|
99
106
|
| `autoConnect` | `boolean` | `false` | Reconnects only a previously selected discovered wallet identity when it is discovered again. |
|
|
100
107
|
| `wallet` | `SolanaWallet` | Disabled | Custom wallet adapter, useful for tests or custom integrations. |
|
|
101
108
|
| `mobileWallet` | `MobileWalletOptions \| false` | Enabled on supported Android clients | Configures or disables Android Mobile Wallet Adapter registration. |
|
|
109
|
+
| `iosWallet` | `iOSWalletOptions \| false` | Enabled on iOS browsers | Configures or disables iOS browser wallet universal links (Phantom, Solflare, Backpack). |
|
|
102
110
|
|
|
103
111
|
The root export remains supported. For composables, prefer direct subpath imports in new code so bundlers can avoid evaluating unrelated package entry code:
|
|
104
112
|
|
|
@@ -174,6 +182,16 @@ const signatureStatus = useSignatureStatus(signature, {
|
|
|
174
182
|
});
|
|
175
183
|
```
|
|
176
184
|
|
|
185
|
+
Read SPL token accounts and balances through Kit RPC `jsonParsed`:
|
|
186
|
+
|
|
187
|
+
```ts
|
|
188
|
+
import { useTokenAccounts } from "@vue-solana/vue/useTokenAccounts";
|
|
189
|
+
import { useTokenBalance } from "@vue-solana/vue/useTokenBalance";
|
|
190
|
+
|
|
191
|
+
const tokenAccounts = useTokenAccounts(ownerAddress, { commitment: "confirmed" });
|
|
192
|
+
const tokenBalance = useTokenBalance(mintAddress, ownerAddress);
|
|
193
|
+
```
|
|
194
|
+
|
|
177
195
|
`useProgramAccounts()` can be expensive on public RPC nodes. Prefer narrow `filters`, use `dataSlice` when you only need part of account data, and avoid polling broad program scans.
|
|
178
196
|
|
|
179
197
|
## Wallet State
|
|
@@ -281,6 +299,91 @@ await confirmation.confirm(signature);
|
|
|
281
299
|
|
|
282
300
|
`useSignAndSendTransaction()` also clears `loading` if a wallet adapter never returns a result. In that stale case, `error` is set and the chain status may be unknown, so check the connected wallet or an explorer before retrying.
|
|
283
301
|
|
|
302
|
+
### Live Data
|
|
303
|
+
|
|
304
|
+
`useRequest()` fetches once per change and revalidates stale data in the background. Pass a request function, a pending Kit RPC request, or a ref/computed of either:
|
|
305
|
+
|
|
306
|
+
```ts
|
|
307
|
+
import { useSolanaClient } from "@vue-solana/vue/useSolanaClient";
|
|
308
|
+
import { useRequest } from "@vue-solana/vue/useRequest";
|
|
309
|
+
|
|
310
|
+
const { client } = useSolanaClient();
|
|
311
|
+
const { data, error, status, refresh } = useRequest(() => client.rpc.getSlot().send());
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
`useSubscription()` streams live slots from `rpcSubscriptions` reactive stores:
|
|
315
|
+
|
|
316
|
+
```ts
|
|
317
|
+
import { useSubscription } from "@vue-solana/vue/useSubscription";
|
|
318
|
+
|
|
319
|
+
const subscription = useSubscription(() => client.rpcSubscriptions.slotNotifications());
|
|
320
|
+
subscription.data; // { value: { slot: number } }
|
|
321
|
+
subscription.reconnect();
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
`useTrackedData()` pairs a slot-tracking request with a subscription, reusing a single subscription for concurrent mounts:
|
|
325
|
+
|
|
326
|
+
```ts
|
|
327
|
+
import { useTrackedData } from "@vue-solana/vue/useTrackedData";
|
|
328
|
+
|
|
329
|
+
const balance = useTrackedData({
|
|
330
|
+
rpcRequest: client.rpc.getBalance(address),
|
|
331
|
+
rpcSubscriptionRequest: client.rpcSubscriptions.balanceNotifications(address),
|
|
332
|
+
rpcValueMapper: (response) => response.value,
|
|
333
|
+
});
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
The `swr` adapters seed fresh mounts from the last-known value for the same cache key:
|
|
337
|
+
|
|
338
|
+
```ts
|
|
339
|
+
import { useRequestSwr } from "@vue-solana/vue/swr";
|
|
340
|
+
|
|
341
|
+
const balance = useRequestSwr(["balance", address], () => client.rpc.getBalance(address).send());
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### Sign In With Solana
|
|
345
|
+
|
|
346
|
+
`useSignIn()` triggers the SIWS flow when the connected wallet supports the `solana:signIn` feature:
|
|
347
|
+
|
|
348
|
+
```ts
|
|
349
|
+
import { useSignIn } from "@vue-solana/vue/useSignIn";
|
|
350
|
+
|
|
351
|
+
const { signInResult, status, loading, error, signIn } = useSignIn();
|
|
352
|
+
await signIn(); // { account, signedMessage, signature } — verify server-side
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Selected Wallet Account
|
|
356
|
+
|
|
357
|
+
`useSelectedWalletAccount()` requires a provider. Use the `SelectedWalletAccountProvider` component (or Nuxt's app-wide context) and read the shared selection anywhere in its subtree:
|
|
358
|
+
|
|
359
|
+
```vue
|
|
360
|
+
<script setup lang="ts">
|
|
361
|
+
import { SelectedWalletAccountProvider } from "@vue-solana/vue";
|
|
362
|
+
import { useSelectedWalletAccount } from "@vue-solana/vue/useSelectedWalletAccount";
|
|
363
|
+
|
|
364
|
+
const [selectedAccount, setSelectedAccount] = useSelectedWalletAccount();
|
|
365
|
+
</script>
|
|
366
|
+
|
|
367
|
+
<template>
|
|
368
|
+
<SelectedWalletAccountProvider>
|
|
369
|
+
<span>Active account: {{ selectedAccount?.address }}</span>
|
|
370
|
+
</SelectedWalletAccountProvider>
|
|
371
|
+
</template>
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### Batch Transactions
|
|
375
|
+
|
|
376
|
+
`useSignTransactions()` and `useSignAndSendTransactions()` batch wallet requests and fall back to singular calls when the wallet only supports one at a time:
|
|
377
|
+
|
|
378
|
+
```ts
|
|
379
|
+
import { useSignAndSendTransactions } from "@vue-solana/vue/useSignAndSendTransactions";
|
|
380
|
+
|
|
381
|
+
const { signatures, status, loading, error, execute } = useSignAndSendTransactions();
|
|
382
|
+
await execute([transactionOne, transactionTwo]); // signatures: string[]
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
When a wallet falls back to sequential signing and a later send fails, `useSignAndSendTransactions()` throws a `PartialSignAndSendError` whose `signatures` field lists the sends that already landed.
|
|
386
|
+
|
|
284
387
|
## Example App
|
|
285
388
|
|
|
286
389
|
This README includes small snippets for quick reference. For a complete runnable Vue + Vite flow, see the example app:
|
|
@@ -305,28 +408,47 @@ Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
|
|
|
305
408
|
|
|
306
409
|
## API
|
|
307
410
|
|
|
308
|
-
| API
|
|
309
|
-
|
|
|
310
|
-
| `createSolanaPlugin(options?)`
|
|
311
|
-
| `VueSolana`
|
|
312
|
-
| `useSolana()`
|
|
313
|
-
| `useRpc()`
|
|
314
|
-
| `useSolanaClient()`
|
|
315
|
-
| `useConnection()`
|
|
316
|
-
| `useWallet()`
|
|
317
|
-
| `useWallets()`
|
|
318
|
-
| `useSignMessage()`
|
|
319
|
-
| `useBalance(address, commitment?)`
|
|
320
|
-
| `useAccountInfo(address, options?)`
|
|
321
|
-
| `useProgramAccounts(programId, config?)`
|
|
322
|
-
| `useTransaction(handler, options?)`
|
|
323
|
-
| `useTransactionConfirmation(options?)`
|
|
324
|
-
| `useSignatureStatus(signature, options?)`
|
|
325
|
-
| `useSignAndSendTransaction()`
|
|
411
|
+
| API | Description |
|
|
412
|
+
| ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
|
|
413
|
+
| `createSolanaPlugin(options?)` | Installs the Vue Solana context. |
|
|
414
|
+
| `VueSolana` | Alias for `createSolanaPlugin`. |
|
|
415
|
+
| `useSolana()` | Returns the full injected Solana context. |
|
|
416
|
+
| `useRpc()` | Returns cluster, endpoint, connection status, latest blockhash, the Kit `client`, and `checkConnection()`. |
|
|
417
|
+
| `useSolanaClient()` | Returns the injected Kit client as `{ client, rpc }`. The recommended RPC path. |
|
|
418
|
+
| `useConnection()` | Returns the Kit `client`. Deprecated in favor of `useSolanaClient()`. |
|
|
419
|
+
| `useWallet()` | Returns wallet refs, computed connection state, and wallet actions. |
|
|
420
|
+
| `useWallets()` | Returns discovered browser extension wallets, Android MWA wallets, iOS browser wallet links, and wallet selection actions. |
|
|
421
|
+
| `useSignMessage()` | Signs arbitrary message bytes through the connected wallet when message signing is supported. |
|
|
422
|
+
| `useBalance(address, commitment?)` | Loads lamport balance for an address string. |
|
|
423
|
+
| `useAccountInfo(address, options?)` | Loads normalized account info (executable, lamports, owner, space, data bytes). |
|
|
424
|
+
| `useProgramAccounts(programId, config?)` | Loads accounts owned by a program with optional filters, commitment, and `dataSlice`. |
|
|
425
|
+
| `useTransaction(handler, options?)` | Generic async transaction state helper with optional timeout settings. |
|
|
426
|
+
| `useTransactionConfirmation(options?)` | Confirms a submitted signature with reactive status and timeout/error state. |
|
|
427
|
+
| `useSignatureStatus(signature, options?)` | Reads a transaction signature status with optional polling. |
|
|
428
|
+
| `useSignAndSendTransaction()` | Signs and sends a transaction through the configured wallet, with optional confirmation waiting. |
|
|
429
|
+
| `useTokenAccounts(owner, options?)` | Reads SPL token accounts for an owner. |
|
|
430
|
+
| `useTokenBalance(mint, owner, commitment?)` | Reads the token balance for a mint/owner pair. |
|
|
431
|
+
| `useAction(handler, options?)` | Generic async action state machine; each dispatch aborts the prior in-flight call. |
|
|
432
|
+
| `useRequest(source, options?)` | One-shot Kit request that re-fires when its source changes, preserving the previous `data` while revalidating. |
|
|
433
|
+
| `useSubscription(source, options?)` | Live data over a Kit reactive stream store (e.g. RPC subscriptions), torn down on unmount. |
|
|
434
|
+
| `useTrackedData(source, options?)` | Slot-deduplicated fetch plus subscription over Kit's slot-tracking store. |
|
|
435
|
+
| `useRequestSwr(key, ...)` / `useSubscriptionSwr(key, ...)` / `useTrackedDataSwr(key, ...)` | Cache-keyed SWR adapters seeding fresh mounts from the last-known result. |
|
|
436
|
+
| `clearSwrCache()` | Clears every cached SWR entry. |
|
|
437
|
+
| `useSignIn(input?)` | Sign In With Solana (SIWS) trigger returning `{ account, signedMessage, signature }` for server-side verification. |
|
|
438
|
+
| `useSelectedWalletAccount()` | App-wide selected wallet account context: `[selectedAccount, setSelectedAccount, filteredWallets]`. |
|
|
439
|
+
| `SelectedWalletAccountProvider` | Component that provides the selected wallet account context to its subtree. |
|
|
440
|
+
| `useSignTransactions()` | Batch-signs transactions through the wallet, preferring `signTransactions` and falling back to `signAllTransactions`. |
|
|
441
|
+
| `useSignAndSendTransactions()` | Signs and sends multiple transactions, returning one signature each, with a singular sequential fallback. |
|
|
442
|
+
| `useClientCapability(capability, options?)` | Fails fast with a clear error when the configured Solana client lacks a requested capability. |
|
|
443
|
+
| `usePayer()` | Reactive Kit client `payer` signer ref (requires a signer plugin on the client). |
|
|
444
|
+
| `useIdentity()` | Reactive Kit client `identity` signer ref (requires a signer plugin on the client). |
|
|
445
|
+
| `usePlanTransaction()` | Plans a single transaction message from instruction inputs without signing or sending. |
|
|
446
|
+
| `usePlanTransactions()` | Plans a batch of transaction messages from instruction inputs. |
|
|
326
447
|
|
|
327
448
|
Direct composable subpaths:
|
|
328
449
|
|
|
329
450
|
- `@vue-solana/vue/useSolana`
|
|
451
|
+
- `@vue-solana/vue/useSolanaClient`
|
|
330
452
|
- `@vue-solana/vue/useRpc`
|
|
331
453
|
- `@vue-solana/vue/useConnection`
|
|
332
454
|
- `@vue-solana/vue/useAccountInfo`
|
|
@@ -339,9 +461,25 @@ Direct composable subpaths:
|
|
|
339
461
|
- `@vue-solana/vue/useTransactionConfirmation`
|
|
340
462
|
- `@vue-solana/vue/useSignatureStatus`
|
|
341
463
|
- `@vue-solana/vue/useSignAndSendTransaction`
|
|
464
|
+
- `@vue-solana/vue/useTokenAccounts`
|
|
465
|
+
- `@vue-solana/vue/useTokenBalance`
|
|
466
|
+
- `@vue-solana/vue/useAction`
|
|
467
|
+
- `@vue-solana/vue/useRequest`
|
|
468
|
+
- `@vue-solana/vue/useSubscription`
|
|
469
|
+
- `@vue-solana/vue/useTrackedData`
|
|
470
|
+
- `@vue-solana/vue/useSignIn`
|
|
471
|
+
- `@vue-solana/vue/useSelectedWalletAccount`
|
|
472
|
+
- `@vue-solana/vue/useSignTransactions`
|
|
473
|
+
- `@vue-solana/vue/useSignAndSendTransactions`
|
|
474
|
+
- `@vue-solana/vue/useClientCapability`
|
|
475
|
+
- `@vue-solana/vue/usePayer`
|
|
476
|
+
- `@vue-solana/vue/useIdentity`
|
|
477
|
+
- `@vue-solana/vue/usePlanTransaction`
|
|
478
|
+
- `@vue-solana/vue/usePlanTransactions`
|
|
342
479
|
|
|
343
480
|
Other direct subpaths:
|
|
344
481
|
|
|
482
|
+
- `@vue-solana/vue/swr`
|
|
345
483
|
- `@vue-solana/vue/kit`
|
|
346
484
|
- `@vue-solana/vue/buffer-polyfill`
|
|
347
485
|
|
|
@@ -356,4 +494,4 @@ Other direct subpaths:
|
|
|
356
494
|
|
|
357
495
|
## Status
|
|
358
496
|
|
|
359
|
-
This package provides RPC, balance, browser extension wallet, Android mobile wallet, iOS browser wallet, message signing, and transaction composables.
|
|
497
|
+
This package provides RPC, balance, account, token, browser extension wallet, Android mobile wallet, iOS browser wallet, message signing, SIWS, live data, and transaction composables.
|
package/dist/index.cjs
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const useAccountInfo = require('./shared/vue.
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
3
|
+
const useAccountInfo = require('./shared/vue.D-qi8PSL.cjs');
|
|
4
|
+
const useAction = require('./shared/vue.CoaIWGPT.cjs');
|
|
5
|
+
const useBalance = require('./shared/vue.E_npPFoV.cjs');
|
|
6
|
+
const useClientCapability = require('./shared/vue.BY0qpgYr.cjs');
|
|
7
|
+
const useConnection = require('./shared/vue.BVaMoz9y.cjs');
|
|
8
|
+
const usePlanTransaction = require('./shared/vue.B4-LEdSE.cjs');
|
|
9
|
+
const useProgramAccounts = require('./shared/vue.Di7yjJ-R.cjs');
|
|
10
|
+
const usePayer = require('./shared/vue.g8fnm_ca.cjs');
|
|
11
|
+
const useRequest = require('./shared/vue.B8pLQ8P4.cjs');
|
|
12
|
+
const useRpc = require('./shared/vue.FiMmnMHr.cjs');
|
|
13
|
+
const SelectedWalletAccountProvider = require('./shared/vue.DDbVk0Zh.cjs');
|
|
14
|
+
const useSignMessage = require('./shared/vue.B6ainw2G.cjs');
|
|
15
|
+
const useSignAndSendTransaction = require('./shared/vue.CWZSMVnB.cjs');
|
|
16
|
+
const useSignTransactions = require('./shared/vue.DFaMJLAQ.cjs');
|
|
17
|
+
const useSignAndSendTransactions = require('./shared/vue.CrkK_T15.cjs');
|
|
18
|
+
const useSignatureStatus = require('./shared/vue.CIs8QhCw.cjs');
|
|
19
|
+
const useSignIn = require('./shared/vue.9TPxZPMf.cjs');
|
|
20
|
+
const useSolana = require('./shared/vue.DE3emjSF.cjs');
|
|
21
|
+
const useSolanaClient = require('./shared/vue.BIxphCAq.cjs');
|
|
22
|
+
const useSubscription = require('./shared/vue.BVj9lWBK.cjs');
|
|
23
|
+
const useTokenAccounts = require('./shared/vue.Bwd1sGAM.cjs');
|
|
24
|
+
const useTokenBalance = require('./shared/vue.DAg5wC1G.cjs');
|
|
25
|
+
const useTrackedData = require('./shared/vue.DtCbCcPd.cjs');
|
|
26
|
+
const useTransaction = require('./shared/vue.Bk5xjlUx.cjs');
|
|
27
|
+
const useTransactionConfirmation = require('./shared/vue.Sbbm9JSu.cjs');
|
|
28
|
+
const useWallet = require('./shared/vue.BGxz4dru.cjs');
|
|
29
|
+
const useWallets = require('./shared/vue.DKyQ7J67.cjs');
|
|
30
|
+
const injection = require('./shared/vue.DEHxNvUX.cjs');
|
|
19
31
|
const kit = require('@vue-solana/core/kit');
|
|
20
32
|
const errors = require('@vue-solana/core/errors');
|
|
21
33
|
const rpc = require('@vue-solana/core/rpc');
|
|
@@ -25,6 +37,7 @@ const vue = require('vue');
|
|
|
25
37
|
const iosWallet = require('@vue-solana/core/ios-wallet');
|
|
26
38
|
require('@vue-solana/core/address');
|
|
27
39
|
require('./shared/vue.DNxOpDXz.cjs');
|
|
40
|
+
require('@vue-solana/core/action');
|
|
28
41
|
require('@vue-solana/core/wallet');
|
|
29
42
|
require('@vue-solana/core/transaction');
|
|
30
43
|
require('bs58');
|
|
@@ -155,7 +168,10 @@ function createSolanaWalletRegistry(options) {
|
|
|
155
168
|
signMessage: adaptedWallet.signMessage?.bind(adaptedWallet),
|
|
156
169
|
signTransaction: adaptedWallet.signTransaction?.bind(adaptedWallet),
|
|
157
170
|
signAllTransactions: adaptedWallet.signAllTransactions?.bind(adaptedWallet),
|
|
158
|
-
signAndSendTransaction: adaptedWallet.signAndSendTransaction?.bind(adaptedWallet)
|
|
171
|
+
signAndSendTransaction: adaptedWallet.signAndSendTransaction?.bind(adaptedWallet),
|
|
172
|
+
signIn: adaptedWallet.signIn?.bind(adaptedWallet),
|
|
173
|
+
signTransactions: adaptedWallet.signTransactions?.bind(adaptedWallet),
|
|
174
|
+
signAndSendTransactions: adaptedWallet.signAndSendTransactions?.bind(adaptedWallet)
|
|
159
175
|
};
|
|
160
176
|
adaptedWallets.set(walletInfo.wallet, cachedAdapter);
|
|
161
177
|
return cachedAdapter;
|
|
@@ -199,7 +215,8 @@ function isObject(value) {
|
|
|
199
215
|
|
|
200
216
|
const RPC_CHECK_TIMEOUT_MS = 1e4;
|
|
201
217
|
function createSolanaPlugin(options = {}) {
|
|
202
|
-
|
|
218
|
+
const plugin = {
|
|
219
|
+
context: null,
|
|
203
220
|
install(app) {
|
|
204
221
|
const context = rpc.createSolanaContext(options);
|
|
205
222
|
const wallet = vue.shallowRef(options.wallet ?? null);
|
|
@@ -346,7 +363,8 @@ function createSolanaPlugin(options = {}) {
|
|
|
346
363
|
}
|
|
347
364
|
}
|
|
348
365
|
};
|
|
349
|
-
app.provide(
|
|
366
|
+
app.provide(injection.solanaInjectionKey, vueContext);
|
|
367
|
+
plugin.context = vueContext;
|
|
350
368
|
if (typeof window !== "undefined") {
|
|
351
369
|
window.setTimeout(() => {
|
|
352
370
|
try {
|
|
@@ -359,6 +377,7 @@ function createSolanaPlugin(options = {}) {
|
|
|
359
377
|
}
|
|
360
378
|
}
|
|
361
379
|
};
|
|
380
|
+
return plugin;
|
|
362
381
|
}
|
|
363
382
|
function isSameWallet(wallet, selectedWallet) {
|
|
364
383
|
return wallet.name === selectedWallet?.name && wallet.source === selectedWallet.source && wallet.platform === selectedWallet.platform;
|
|
@@ -366,24 +385,43 @@ function isSameWallet(wallet, selectedWallet) {
|
|
|
366
385
|
const VueSolana = createSolanaPlugin;
|
|
367
386
|
|
|
368
387
|
exports.useAccountInfo = useAccountInfo.useAccountInfo;
|
|
388
|
+
exports.useAction = useAction.useAction;
|
|
369
389
|
exports.useBalance = useBalance.useBalance;
|
|
390
|
+
exports.MissingClientCapabilityError = useClientCapability.MissingClientCapabilityError;
|
|
391
|
+
exports.useClientCapability = useClientCapability.useClientCapability;
|
|
370
392
|
exports.useConnection = useConnection.useConnection;
|
|
393
|
+
exports.usePlanTransaction = usePlanTransaction.usePlanTransaction;
|
|
394
|
+
exports.usePlanTransactions = usePlanTransaction.usePlanTransactions;
|
|
371
395
|
exports.useProgramAccounts = useProgramAccounts.useProgramAccounts;
|
|
396
|
+
exports.useIdentity = usePayer.useIdentity;
|
|
397
|
+
exports.usePayer = usePayer.usePayer;
|
|
398
|
+
exports.useRequest = useRequest.useRequest;
|
|
372
399
|
exports.useRpc = useRpc.useRpc;
|
|
400
|
+
exports.SelectedWalletAccountProvider = SelectedWalletAccountProvider.SelectedWalletAccountProvider;
|
|
401
|
+
exports.createSelectedWalletAccountContext = SelectedWalletAccountProvider.createSelectedWalletAccountContext;
|
|
402
|
+
exports.provideSelectedWalletAccount = SelectedWalletAccountProvider.provideSelectedWalletAccount;
|
|
403
|
+
exports.selectedWalletAccountInjectionKey = SelectedWalletAccountProvider.selectedWalletAccountInjectionKey;
|
|
404
|
+
exports.useSelectedWalletAccount = SelectedWalletAccountProvider.useSelectedWalletAccount;
|
|
373
405
|
exports.useSignMessage = useSignMessage.useSignMessage;
|
|
374
406
|
exports.useSignAndSendTransaction = useSignAndSendTransaction.useSignAndSendTransaction;
|
|
407
|
+
exports.useSignTransactions = useSignTransactions.useSignTransactions;
|
|
408
|
+
exports.PartialSignAndSendError = useSignAndSendTransactions.PartialSignAndSendError;
|
|
409
|
+
exports.useSignAndSendTransactions = useSignAndSendTransactions.useSignAndSendTransactions;
|
|
375
410
|
exports.useSignatureStatus = useSignatureStatus.useSignatureStatus;
|
|
376
|
-
exports.
|
|
411
|
+
exports.useSignIn = useSignIn.useSignIn;
|
|
377
412
|
exports.tryUseSolana = useSolana.tryUseSolana;
|
|
378
413
|
exports.useSolana = useSolana.useSolana;
|
|
379
414
|
exports.useSolanaClient = useSolanaClient.useSolanaClient;
|
|
415
|
+
exports.useSubscription = useSubscription.useSubscription;
|
|
380
416
|
exports.useTokenAccounts = useTokenAccounts.useTokenAccounts;
|
|
381
417
|
exports.useTokenBalance = useTokenBalance.useTokenBalance;
|
|
418
|
+
exports.useTrackedData = useTrackedData.useTrackedData;
|
|
382
419
|
exports.useTransaction = useTransaction.useTransaction;
|
|
383
420
|
exports.getConfirmedTransactionStatus = useTransactionConfirmation.getConfirmedTransactionStatus;
|
|
384
421
|
exports.useTransactionConfirmation = useTransactionConfirmation.useTransactionConfirmation;
|
|
385
422
|
exports.useWallet = useWallet.useWallet;
|
|
386
423
|
exports.useWallets = useWallets.useWallets;
|
|
424
|
+
exports.solanaInjectionKey = injection.solanaInjectionKey;
|
|
387
425
|
exports.address = kit.address;
|
|
388
426
|
exports.createSolanaClient = kit.createSolanaClient;
|
|
389
427
|
exports.lamports = kit.lamports;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
export { AccountInfo, UseAccountInfoOptions, useAccountInfo } from './useAccountInfo.cjs';
|
|
2
|
+
export { UseActionOptions, UseActionReturn, UseActionStatus, useAction } from './useAction.cjs';
|
|
2
3
|
export { BalanceInput, useBalance } from './useBalance.cjs';
|
|
4
|
+
export { MissingClientCapabilityError, UseClientCapabilityOptions, useClientCapability } from './useClientCapability.cjs';
|
|
3
5
|
export { useConnection } from './useConnection.cjs';
|
|
6
|
+
export { PlanTransactionConfig, PlanTransactionStatus, usePlanTransaction, usePlanTransactions } from './usePlanTransaction.cjs';
|
|
4
7
|
export { ProgramAccount, ProgramAccountDataSizeFilter, ProgramAccountDataSlice, ProgramAccountFilter, ProgramAccountMemcmpEncoding, ProgramAccountMemcmpFilter, UseProgramAccountsOptions, useProgramAccounts } from './useProgramAccounts.cjs';
|
|
8
|
+
export { useIdentity, usePayer } from './usePayer.cjs';
|
|
9
|
+
export { UseRequestOptions, UseRequestReturn, UseRequestSource, UseRequestStatus, useRequest } from './useRequest.cjs';
|
|
5
10
|
export { useRpc } from './useRpc.cjs';
|
|
11
|
+
export { SelectedWalletAccount, SelectedWalletAccountContext, SelectedWalletAccountOptions, SelectedWalletAccountProvider, WalletAccountFilter, createSelectedWalletAccountContext, provideSelectedWalletAccount, selectedWalletAccountInjectionKey, useSelectedWalletAccount } from './useSelectedWalletAccount.cjs';
|
|
6
12
|
export { SignMessageStatus, useSignMessage } from './useSignMessage.cjs';
|
|
7
13
|
export { SignAndSendTransactionOptions, SignAndSendTransactionStatus, useSignAndSendTransaction } from './useSignAndSendTransaction.cjs';
|
|
14
|
+
export { SignTransactionsStatus, useSignTransactions } from './useSignTransactions.cjs';
|
|
15
|
+
export { PartialSignAndSendError, SignAndSendTransactionsStatus, useSignAndSendTransactions } from './useSignAndSendTransactions.cjs';
|
|
8
16
|
export { SignatureStatus, UseSignatureStatusOptions, useSignatureStatus } from './useSignatureStatus.cjs';
|
|
17
|
+
export { SignInStatus, useSignIn } from './useSignIn.cjs';
|
|
9
18
|
export { tryUseSolana, useSolana } from './useSolana.cjs';
|
|
10
19
|
export { useSolanaClient } from './useSolanaClient.cjs';
|
|
20
|
+
export { UseSubscriptionOptions, UseSubscriptionReturn, UseSubscriptionSource, UseSubscriptionStatus, useSubscription } from './useSubscription.cjs';
|
|
11
21
|
export { UseTokenAccountsOptions, useTokenAccounts } from './useTokenAccounts.cjs';
|
|
12
22
|
export { useTokenBalance } from './useTokenBalance.cjs';
|
|
23
|
+
export { UseTrackedDataInitialSource, UseTrackedDataOptions, UseTrackedDataReturn, UseTrackedDataSource, UseTrackedDataStatus, UseTrackedDataStreamSource, useTrackedData } from './useTrackedData.cjs';
|
|
13
24
|
export { UseTransactionOptions, useTransaction } from './useTransaction.cjs';
|
|
14
25
|
export { TransactionConfirmationStatus, getConfirmedTransactionStatus, useTransactionConfirmation } from './useTransactionConfirmation.cjs';
|
|
15
26
|
export { useWallet } from './useWallet.cjs';
|
|
16
27
|
export { useWallets } from './useWallets.cjs';
|
|
17
|
-
|
|
28
|
+
import { V as VueSolanaContext } from './shared/vue.DL3z5PxP.cjs';
|
|
29
|
+
export { S as SolanaConnectionStatus, s as solanaInjectionKey } from './shared/vue.DL3z5PxP.cjs';
|
|
18
30
|
export { Address, Commitment, Lamports, Rpc, Signature, SolanaClient, SolanaRpcApi, address, createSolanaClient, lamports } from '@vue-solana/core/kit';
|
|
19
31
|
import { GetSolanaIosWalletsOptions } from '@vue-solana/core/ios-wallet';
|
|
20
32
|
import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-wallet';
|
|
@@ -29,10 +41,18 @@ interface VueSolanaPluginOptions extends SolanaConfig {
|
|
|
29
41
|
mobileWallet?: false | RegisterSolanaMobileWalletOptions;
|
|
30
42
|
iosWallet?: false | GetSolanaIosWalletsOptions;
|
|
31
43
|
}
|
|
32
|
-
|
|
44
|
+
interface VueSolanaPlugin {
|
|
45
|
+
/** Installs the plugin on a Vue app (called synchronously by `app.use`). */
|
|
33
46
|
install(app: App): void;
|
|
34
|
-
|
|
47
|
+
/**
|
|
48
|
+
* The app context built by `install`, available once `app.use(plugin)` has
|
|
49
|
+
* run. Lets framework integrations (e.g. the Nuxt module) hand the live
|
|
50
|
+
* context to consumers that run outside a component setup.
|
|
51
|
+
*/
|
|
52
|
+
context: VueSolanaContext | null;
|
|
53
|
+
}
|
|
54
|
+
declare function createSolanaPlugin(options?: VueSolanaPluginOptions): VueSolanaPlugin;
|
|
35
55
|
declare const VueSolana: typeof createSolanaPlugin;
|
|
36
56
|
|
|
37
|
-
export { VueSolana, createSolanaPlugin };
|
|
38
|
-
export type { VueSolanaPluginOptions };
|
|
57
|
+
export { VueSolana, VueSolanaContext, createSolanaPlugin };
|
|
58
|
+
export type { VueSolanaPlugin, VueSolanaPluginOptions };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
export { AccountInfo, UseAccountInfoOptions, useAccountInfo } from './useAccountInfo.mjs';
|
|
2
|
+
export { UseActionOptions, UseActionReturn, UseActionStatus, useAction } from './useAction.mjs';
|
|
2
3
|
export { BalanceInput, useBalance } from './useBalance.mjs';
|
|
4
|
+
export { MissingClientCapabilityError, UseClientCapabilityOptions, useClientCapability } from './useClientCapability.mjs';
|
|
3
5
|
export { useConnection } from './useConnection.mjs';
|
|
6
|
+
export { PlanTransactionConfig, PlanTransactionStatus, usePlanTransaction, usePlanTransactions } from './usePlanTransaction.mjs';
|
|
4
7
|
export { ProgramAccount, ProgramAccountDataSizeFilter, ProgramAccountDataSlice, ProgramAccountFilter, ProgramAccountMemcmpEncoding, ProgramAccountMemcmpFilter, UseProgramAccountsOptions, useProgramAccounts } from './useProgramAccounts.mjs';
|
|
8
|
+
export { useIdentity, usePayer } from './usePayer.mjs';
|
|
9
|
+
export { UseRequestOptions, UseRequestReturn, UseRequestSource, UseRequestStatus, useRequest } from './useRequest.mjs';
|
|
5
10
|
export { useRpc } from './useRpc.mjs';
|
|
11
|
+
export { SelectedWalletAccount, SelectedWalletAccountContext, SelectedWalletAccountOptions, SelectedWalletAccountProvider, WalletAccountFilter, createSelectedWalletAccountContext, provideSelectedWalletAccount, selectedWalletAccountInjectionKey, useSelectedWalletAccount } from './useSelectedWalletAccount.mjs';
|
|
6
12
|
export { SignMessageStatus, useSignMessage } from './useSignMessage.mjs';
|
|
7
13
|
export { SignAndSendTransactionOptions, SignAndSendTransactionStatus, useSignAndSendTransaction } from './useSignAndSendTransaction.mjs';
|
|
14
|
+
export { SignTransactionsStatus, useSignTransactions } from './useSignTransactions.mjs';
|
|
15
|
+
export { PartialSignAndSendError, SignAndSendTransactionsStatus, useSignAndSendTransactions } from './useSignAndSendTransactions.mjs';
|
|
8
16
|
export { SignatureStatus, UseSignatureStatusOptions, useSignatureStatus } from './useSignatureStatus.mjs';
|
|
17
|
+
export { SignInStatus, useSignIn } from './useSignIn.mjs';
|
|
9
18
|
export { tryUseSolana, useSolana } from './useSolana.mjs';
|
|
10
19
|
export { useSolanaClient } from './useSolanaClient.mjs';
|
|
20
|
+
export { UseSubscriptionOptions, UseSubscriptionReturn, UseSubscriptionSource, UseSubscriptionStatus, useSubscription } from './useSubscription.mjs';
|
|
11
21
|
export { UseTokenAccountsOptions, useTokenAccounts } from './useTokenAccounts.mjs';
|
|
12
22
|
export { useTokenBalance } from './useTokenBalance.mjs';
|
|
23
|
+
export { UseTrackedDataInitialSource, UseTrackedDataOptions, UseTrackedDataReturn, UseTrackedDataSource, UseTrackedDataStatus, UseTrackedDataStreamSource, useTrackedData } from './useTrackedData.mjs';
|
|
13
24
|
export { UseTransactionOptions, useTransaction } from './useTransaction.mjs';
|
|
14
25
|
export { TransactionConfirmationStatus, getConfirmedTransactionStatus, useTransactionConfirmation } from './useTransactionConfirmation.mjs';
|
|
15
26
|
export { useWallet } from './useWallet.mjs';
|
|
16
27
|
export { useWallets } from './useWallets.mjs';
|
|
17
|
-
|
|
28
|
+
import { V as VueSolanaContext } from './shared/vue.DL3z5PxP.mjs';
|
|
29
|
+
export { S as SolanaConnectionStatus, s as solanaInjectionKey } from './shared/vue.DL3z5PxP.mjs';
|
|
18
30
|
export { Address, Commitment, Lamports, Rpc, Signature, SolanaClient, SolanaRpcApi, address, createSolanaClient, lamports } from '@vue-solana/core/kit';
|
|
19
31
|
import { GetSolanaIosWalletsOptions } from '@vue-solana/core/ios-wallet';
|
|
20
32
|
import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-wallet';
|
|
@@ -29,10 +41,18 @@ interface VueSolanaPluginOptions extends SolanaConfig {
|
|
|
29
41
|
mobileWallet?: false | RegisterSolanaMobileWalletOptions;
|
|
30
42
|
iosWallet?: false | GetSolanaIosWalletsOptions;
|
|
31
43
|
}
|
|
32
|
-
|
|
44
|
+
interface VueSolanaPlugin {
|
|
45
|
+
/** Installs the plugin on a Vue app (called synchronously by `app.use`). */
|
|
33
46
|
install(app: App): void;
|
|
34
|
-
|
|
47
|
+
/**
|
|
48
|
+
* The app context built by `install`, available once `app.use(plugin)` has
|
|
49
|
+
* run. Lets framework integrations (e.g. the Nuxt module) hand the live
|
|
50
|
+
* context to consumers that run outside a component setup.
|
|
51
|
+
*/
|
|
52
|
+
context: VueSolanaContext | null;
|
|
53
|
+
}
|
|
54
|
+
declare function createSolanaPlugin(options?: VueSolanaPluginOptions): VueSolanaPlugin;
|
|
35
55
|
declare const VueSolana: typeof createSolanaPlugin;
|
|
36
56
|
|
|
37
|
-
export { VueSolana, createSolanaPlugin };
|
|
38
|
-
export type { VueSolanaPluginOptions };
|
|
57
|
+
export { VueSolana, VueSolanaContext, createSolanaPlugin };
|
|
58
|
+
export type { VueSolanaPlugin, VueSolanaPluginOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
export { AccountInfo, UseAccountInfoOptions, useAccountInfo } from './useAccountInfo.js';
|
|
2
|
+
export { UseActionOptions, UseActionReturn, UseActionStatus, useAction } from './useAction.js';
|
|
2
3
|
export { BalanceInput, useBalance } from './useBalance.js';
|
|
4
|
+
export { MissingClientCapabilityError, UseClientCapabilityOptions, useClientCapability } from './useClientCapability.js';
|
|
3
5
|
export { useConnection } from './useConnection.js';
|
|
6
|
+
export { PlanTransactionConfig, PlanTransactionStatus, usePlanTransaction, usePlanTransactions } from './usePlanTransaction.js';
|
|
4
7
|
export { ProgramAccount, ProgramAccountDataSizeFilter, ProgramAccountDataSlice, ProgramAccountFilter, ProgramAccountMemcmpEncoding, ProgramAccountMemcmpFilter, UseProgramAccountsOptions, useProgramAccounts } from './useProgramAccounts.js';
|
|
8
|
+
export { useIdentity, usePayer } from './usePayer.js';
|
|
9
|
+
export { UseRequestOptions, UseRequestReturn, UseRequestSource, UseRequestStatus, useRequest } from './useRequest.js';
|
|
5
10
|
export { useRpc } from './useRpc.js';
|
|
11
|
+
export { SelectedWalletAccount, SelectedWalletAccountContext, SelectedWalletAccountOptions, SelectedWalletAccountProvider, WalletAccountFilter, createSelectedWalletAccountContext, provideSelectedWalletAccount, selectedWalletAccountInjectionKey, useSelectedWalletAccount } from './useSelectedWalletAccount.js';
|
|
6
12
|
export { SignMessageStatus, useSignMessage } from './useSignMessage.js';
|
|
7
13
|
export { SignAndSendTransactionOptions, SignAndSendTransactionStatus, useSignAndSendTransaction } from './useSignAndSendTransaction.js';
|
|
14
|
+
export { SignTransactionsStatus, useSignTransactions } from './useSignTransactions.js';
|
|
15
|
+
export { PartialSignAndSendError, SignAndSendTransactionsStatus, useSignAndSendTransactions } from './useSignAndSendTransactions.js';
|
|
8
16
|
export { SignatureStatus, UseSignatureStatusOptions, useSignatureStatus } from './useSignatureStatus.js';
|
|
17
|
+
export { SignInStatus, useSignIn } from './useSignIn.js';
|
|
9
18
|
export { tryUseSolana, useSolana } from './useSolana.js';
|
|
10
19
|
export { useSolanaClient } from './useSolanaClient.js';
|
|
20
|
+
export { UseSubscriptionOptions, UseSubscriptionReturn, UseSubscriptionSource, UseSubscriptionStatus, useSubscription } from './useSubscription.js';
|
|
11
21
|
export { UseTokenAccountsOptions, useTokenAccounts } from './useTokenAccounts.js';
|
|
12
22
|
export { useTokenBalance } from './useTokenBalance.js';
|
|
23
|
+
export { UseTrackedDataInitialSource, UseTrackedDataOptions, UseTrackedDataReturn, UseTrackedDataSource, UseTrackedDataStatus, UseTrackedDataStreamSource, useTrackedData } from './useTrackedData.js';
|
|
13
24
|
export { UseTransactionOptions, useTransaction } from './useTransaction.js';
|
|
14
25
|
export { TransactionConfirmationStatus, getConfirmedTransactionStatus, useTransactionConfirmation } from './useTransactionConfirmation.js';
|
|
15
26
|
export { useWallet } from './useWallet.js';
|
|
16
27
|
export { useWallets } from './useWallets.js';
|
|
17
|
-
|
|
28
|
+
import { V as VueSolanaContext } from './shared/vue.DL3z5PxP.js';
|
|
29
|
+
export { S as SolanaConnectionStatus, s as solanaInjectionKey } from './shared/vue.DL3z5PxP.js';
|
|
18
30
|
export { Address, Commitment, Lamports, Rpc, Signature, SolanaClient, SolanaRpcApi, address, createSolanaClient, lamports } from '@vue-solana/core/kit';
|
|
19
31
|
import { GetSolanaIosWalletsOptions } from '@vue-solana/core/ios-wallet';
|
|
20
32
|
import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-wallet';
|
|
@@ -29,10 +41,18 @@ interface VueSolanaPluginOptions extends SolanaConfig {
|
|
|
29
41
|
mobileWallet?: false | RegisterSolanaMobileWalletOptions;
|
|
30
42
|
iosWallet?: false | GetSolanaIosWalletsOptions;
|
|
31
43
|
}
|
|
32
|
-
|
|
44
|
+
interface VueSolanaPlugin {
|
|
45
|
+
/** Installs the plugin on a Vue app (called synchronously by `app.use`). */
|
|
33
46
|
install(app: App): void;
|
|
34
|
-
|
|
47
|
+
/**
|
|
48
|
+
* The app context built by `install`, available once `app.use(plugin)` has
|
|
49
|
+
* run. Lets framework integrations (e.g. the Nuxt module) hand the live
|
|
50
|
+
* context to consumers that run outside a component setup.
|
|
51
|
+
*/
|
|
52
|
+
context: VueSolanaContext | null;
|
|
53
|
+
}
|
|
54
|
+
declare function createSolanaPlugin(options?: VueSolanaPluginOptions): VueSolanaPlugin;
|
|
35
55
|
declare const VueSolana: typeof createSolanaPlugin;
|
|
36
56
|
|
|
37
|
-
export { VueSolana, createSolanaPlugin };
|
|
38
|
-
export type { VueSolanaPluginOptions };
|
|
57
|
+
export { VueSolana, VueSolanaContext, createSolanaPlugin };
|
|
58
|
+
export type { VueSolanaPlugin, VueSolanaPluginOptions };
|