@vue-solana/vue 4.1.10 → 4.1.12

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.
Files changed (31) hide show
  1. package/README.md +48 -48
  2. package/dist/index.mjs +10 -10
  3. package/dist/shared/{vue.sPcsjyKU.mjs → vue.B0hf1OsS.mjs} +1 -1
  4. package/dist/shared/{vue.BTD4usyi.mjs → vue.B6Kw3XOI.mjs} +1 -1
  5. package/dist/shared/{vue.BiKE9Xuv.mjs → vue.B92OTUjz.mjs} +5 -4
  6. package/dist/shared/{vue.CbmzveKF.mjs → vue.BB5bTm1O.mjs} +1 -1
  7. package/dist/shared/{vue.D0MQeVy2.mjs → vue.BF7Vn27B.mjs} +38 -19
  8. package/dist/shared/{vue.CLAqNcLp.mjs → vue.BYAUL5N3.mjs} +1 -1
  9. package/dist/shared/{vue.BXNjyJ2c.mjs → vue.Be12jpqX.mjs} +1 -1
  10. package/dist/shared/{vue.Bu2cQ690.mjs → vue.Beyy7qk4.mjs} +1 -1
  11. package/dist/shared/{vue.SeuJipQ8.mjs → vue.BrX1CFPn.mjs} +4 -2
  12. package/dist/shared/{vue.BHBifdbc.mjs → vue.Cjjxa9Oe.mjs} +4 -2
  13. package/dist/shared/{vue.DPwdqRO_.mjs → vue.DeNcsEsq.mjs} +1 -1
  14. package/dist/shared/{vue.Ddf_Cdjx.mjs → vue.DxB7g0V1.mjs} +4 -2
  15. package/dist/useConnection.d.ts +8 -8
  16. package/dist/usePlanTransaction.mjs +1 -1
  17. package/dist/usePlanTransactions.mjs +1 -1
  18. package/dist/useRpc.d.ts +8 -8
  19. package/dist/useSendTransaction.mjs +1 -1
  20. package/dist/useSendTransactions.mjs +1 -1
  21. package/dist/useSignAndSendTransaction.mjs +1 -1
  22. package/dist/useSignAndSendTransactions.mjs +1 -1
  23. package/dist/useSignIn.mjs +1 -1
  24. package/dist/useSignMessage.mjs +1 -1
  25. package/dist/useSignTransactions.mjs +1 -1
  26. package/dist/useSignatureStatus.mjs +1 -1
  27. package/dist/useSolanaClient.d.ts +8 -8
  28. package/dist/useSolanaPay.d.ts +1 -1
  29. package/dist/useSolanaQrScanner.mjs +1 -1
  30. package/dist/useTransactionConfirmation.mjs +1 -1
  31. package/package.json +2 -2
package/README.md CHANGED
@@ -266,7 +266,7 @@ const signatureStatus = useSignatureStatus(signature, {
266
266
  });
267
267
  ```
268
268
 
269
- There is no per-call `commitment` option for `useSignatureStatus()`; `getSignatureStatuses` takes no per-call commitment, so reads use the commitment baked into the endpoint. Polling uses chained timeouts and `stopPolling()` prevents further ticks until the watched signature changes (which restarts polling). Invalid `pollIntervalMs` values return an `RPC_FAILURE` `SolanaError`.
269
+ There is no per-call `commitment` option for `useSignatureStatus()`; `getSignatureStatuses` takes no per-call commitment, so reads use the commitment baked into the endpoint. Polling uses chained timeouts and `stopPolling()` prevents further ticks until the watched signature changes (which restarts polling). Invalid `pollIntervalMs` values return an `INVALID_INPUT` `SolanaError`.
270
270
 
271
271
  Read SPL token accounts and balances through Kit RPC `jsonParsed`:
272
272
 
@@ -642,53 +642,53 @@ Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
642
642
 
643
643
  ## API
644
644
 
645
- | API | Description |
646
- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
647
- | `createSolanaPlugin(options?)` | Installs the Vue Solana context and returns `{ install, context, dispose }`. `dispose()` stops wallet discovery/subscriptions. |
648
- | `VueSolana` | Alias for `createSolanaPlugin`. |
649
- | `useSolana()` | Returns the full injected Solana context; throws when no plugin context is available (SSR fallback uses a fresh inert context per call). |
650
- | `tryUseSolana()` | Returns the injected Solana context or `null` when no plugin context is available (SSR-safe). |
651
- | `MissingClientCapabilityError` | Thrown by `useClientCapability()` (and client-sent composables) when the configured client lacks a required capability. |
652
- | `useRpc()` | Returns cluster, endpoint, connection status, latest blockhash, the Kit `client`, and `checkConnection()`. |
653
- | `useSolanaClient()` | Returns the injected Kit client as `{ client, rpc }`. The recommended RPC path. |
654
- | `useConnection()` | Returns the Kit `client`. Deprecated in favor of `useSolanaClient()`. |
655
- | `useWallet()` | Returns wallet refs, computed connection state, and wallet actions. |
656
- | `useWallets()` | Returns discovered browser extension wallets, Android MWA wallets, iOS browser wallet links, and wallet selection actions. |
657
- | `useSignMessage()` | Signs arbitrary message bytes through the connected wallet when message signing is supported. |
658
- | `useBalance(address, commitment?)` | Loads lamport balance for an address string. |
659
- | `useAirdrop()` | Airdrops SOL on devnet/testnet/localnets; `data` is the `Signature`, or `undefined` when applied directly. |
660
- | `useAccountInfo(address, options?)` | Loads normalized account info (executable, lamports, owner, space, data bytes). |
661
- | `useProgramAccounts(programId, config?)` | Loads accounts owned by a program with optional filters, commitment, and `dataSlice`. |
662
- | `useTransaction(handler, options?)` | Generic async transaction state helper with optional timeout settings. |
663
- | `useTransactionConfirmation(options?)` | Confirms a submitted signature with reactive status and timeout/error state. |
664
- | `useSignatureStatus(signature, options?)` | Reads a transaction signature status with optional polling. |
665
- | `useSignAndSendTransaction()` | Signs and sends a transaction through the configured wallet, with optional confirmation waiting. |
666
- | `useTokenAccounts(owner, options?)` | Reads SPL token accounts for an owner. |
667
- | `useTokenBalance(mint, owner, commitment?)` | Reads the token balance for a mint/owner pair. |
668
- | `useAction(handler, options?)` | Generic async action state machine; each dispatch aborts the prior in-flight call. |
669
- | `useRequest(source, options?)` | One-shot Kit request that re-fires when its source changes, preserving the previous `data` while revalidating. |
670
- | `useSubscription(source, options?)` | Live data over a Kit reactive stream store (e.g. RPC subscriptions), torn down on unmount. |
671
- | `useTrackedData(source, options?)` | Slot-deduplicated fetch plus subscription over Kit's slot-tracking store. |
672
- | `useRequestSwr(key, ...)` / `useSubscriptionSwr(key, ...)` / `useTrackedDataSwr(key, ...)` | Cache-keyed SWR adapters seeding fresh mounts from the last-known result. |
673
- | `clearSwrCache()` | Clears every cached SWR entry. |
674
- | `deleteSwrKey(key)` | Removes a single cached SWR entry by full cache key (including adapter prefix). |
675
- | `useSignIn(input?)` | Sign In With Solana (SIWS) trigger returning `{ account, signedMessage, signature }` for server-side verification. |
676
- | `useSolanaPay()` | Builds/parses Solana Pay transfer request URLs, generates a reference, and verifies settlement against it. |
677
- | `useSolanaPayConfirmation()` | Polls payment status for a Solana Pay reference. |
678
- | `useSolanaQrCode()` | Renders a Solana Pay URL as an SVG QR code. |
679
- | `useSolanaQrScanner()` | Scans Solana Pay QR codes through the camera and `BarcodeDetector`. |
680
- | `useSelectedWalletAccount()` | App-wide selected wallet account context: `[selectedAccount, setSelectedAccount, filteredWallets]`. |
681
- | `SelectedWalletAccountProvider` | Component that provides the selected wallet account context to its subtree. |
682
- | `useSignTransactions()` | Batch-signs transactions through the wallet, preferring `signTransactions` and falling back to `signAllTransactions`. |
683
- | `useSignAndSendTransactions()` | Signs and sends multiple transactions, returning one signature each, with a singular sequential fallback. |
684
- | `useClientCapability(capability, options?)` | Fails fast with a clear error when the configured Solana client lacks a requested capability. |
685
- | `tryUseSolana()` | Returns the injected Solana context or `null` when no plugin context is available (SSR-safe). |
686
- | `usePayer()` | Reactive Kit client `payer` signer ref. The default client exposes a configured payer when supplied. |
687
- | `useIdentity()` | Reactive Kit client `identity` signer ref (requires an identity signer on a custom client). |
688
- | `usePlanTransaction()` | Plans a single transaction message from instruction inputs without signing or sending; the default client includes the official planner. |
689
- | `usePlanTransactions()` | Plans a batch of transaction messages from instruction inputs. |
690
- | `useSendTransaction()` | Uses the official client transaction-sending capability to plan, sign, submit, and wait for `confirmed` commitment (no wallet). |
691
- | `useSendTransactions()` | Sends a batch through the same official capability, waiting for `confirmed` commitment. |
645
+ | API | Description |
646
+ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
647
+ | `createSolanaPlugin(options?)` | Installs the Vue Solana context and returns `{ install, context, dispose }`. `dispose()` stops wallet discovery/subscriptions. |
648
+ | `VueSolana` | Alias for `createSolanaPlugin`. |
649
+ | `useSolana()` | Returns the full injected Solana context; throws when no plugin context is available (SSR fallback uses a fresh inert context per call). |
650
+ | `tryUseSolana()` | Returns the injected Solana context or `null` when no plugin context is available (SSR-safe). |
651
+ | `MissingClientCapabilityError` | Thrown by `useClientCapability()` (and client-sent composables) when the configured client lacks a required capability; its `code` is `MISSING_CLIENT_CAPABILITY`. |
652
+ | `useRpc()` | Returns cluster, endpoint, connection status, latest blockhash, the Kit `client`, and `checkConnection()`. |
653
+ | `useSolanaClient()` | Returns the injected Kit client as `{ client, rpc }`. The recommended RPC path. |
654
+ | `useConnection()` | Returns the Kit `client`. Deprecated in favor of `useSolanaClient()`. |
655
+ | `useWallet()` | Returns wallet refs, computed connection state, and wallet actions. |
656
+ | `useWallets()` | Returns discovered browser extension wallets, Android MWA wallets, iOS browser wallet links, and wallet selection actions. |
657
+ | `useSignMessage()` | Signs arbitrary message bytes through the connected wallet when message signing is supported. |
658
+ | `useBalance(address, commitment?)` | Loads lamport balance for an address string. |
659
+ | `useAirdrop()` | Airdrops SOL on devnet/testnet/localnets; `data` is the `Signature`, or `undefined` when applied directly. |
660
+ | `useAccountInfo(address, options?)` | Loads normalized account info (executable, lamports, owner, space, data bytes). |
661
+ | `useProgramAccounts(programId, config?)` | Loads accounts owned by a program with optional filters, commitment, and `dataSlice`. |
662
+ | `useTransaction(handler, options?)` | Generic async transaction state helper with optional timeout settings. |
663
+ | `useTransactionConfirmation(options?)` | Confirms a submitted signature with reactive status and timeout/error state. |
664
+ | `useSignatureStatus(signature, options?)` | Reads a transaction signature status with optional polling. |
665
+ | `useSignAndSendTransaction()` | Signs and sends a transaction through the configured wallet, with optional confirmation waiting. |
666
+ | `useTokenAccounts(owner, options?)` | Reads SPL token accounts for an owner. |
667
+ | `useTokenBalance(mint, owner, commitment?)` | Reads the token balance for a mint/owner pair. |
668
+ | `useAction(handler, options?)` | Generic async action state machine; each dispatch aborts the prior in-flight call. |
669
+ | `useRequest(source, options?)` | One-shot Kit request that re-fires when its source changes, preserving the previous `data` while revalidating. |
670
+ | `useSubscription(source, options?)` | Live data over a Kit reactive stream store (e.g. RPC subscriptions), torn down on unmount. |
671
+ | `useTrackedData(source, options?)` | Slot-deduplicated fetch plus subscription over Kit's slot-tracking store. |
672
+ | `useRequestSwr(key, ...)` / `useSubscriptionSwr(key, ...)` / `useTrackedDataSwr(key, ...)` | Cache-keyed SWR adapters seeding fresh mounts from the last-known result. |
673
+ | `clearSwrCache()` | Clears every cached SWR entry. |
674
+ | `deleteSwrKey(key)` | Removes a single cached SWR entry by full cache key (including adapter prefix). |
675
+ | `useSignIn(input?)` | Sign In With Solana (SIWS) trigger returning `{ account, signedMessage, signature }` for server-side verification. |
676
+ | `useSolanaPay()` | Builds/parses Solana Pay transfer request URLs, generates a reference, and verifies settlement against it. |
677
+ | `useSolanaPayConfirmation()` | Polls payment status for a Solana Pay reference. |
678
+ | `useSolanaQrCode()` | Renders a Solana Pay URL as an SVG QR code. |
679
+ | `useSolanaQrScanner()` | Scans Solana Pay QR codes through the camera and `BarcodeDetector`. |
680
+ | `useSelectedWalletAccount()` | App-wide selected wallet account context: `[selectedAccount, setSelectedAccount, filteredWallets]`. |
681
+ | `SelectedWalletAccountProvider` | Component that provides the selected wallet account context to its subtree. |
682
+ | `useSignTransactions()` | Batch-signs transactions through the wallet, preferring `signTransactions` and falling back to `signAllTransactions`. |
683
+ | `useSignAndSendTransactions()` | Signs and sends multiple transactions, returning one signature each, with a singular sequential fallback. |
684
+ | `useClientCapability(capability, options?)` | Fails fast with a clear error when the configured Solana client lacks a requested capability. |
685
+ | `tryUseSolana()` | Returns the injected Solana context or `null` when no plugin context is available (SSR-safe). |
686
+ | `usePayer()` | Reactive Kit client `payer` signer ref. The default client exposes a configured payer when supplied. |
687
+ | `useIdentity()` | Reactive Kit client `identity` signer ref (requires an identity signer on a custom client). |
688
+ | `usePlanTransaction()` | Plans a single transaction message from instruction inputs without signing or sending; the default client includes the official planner. |
689
+ | `usePlanTransactions()` | Plans a batch of transaction messages from instruction inputs. |
690
+ | `useSendTransaction()` | Uses the official client transaction-sending capability to plan, sign, submit, and wait for `confirmed` commitment (no wallet). |
691
+ | `useSendTransactions()` | Sends a batch through the same official capability, waiting for `confirmed` commitment. |
692
692
 
693
693
  <br>
694
694
 
package/dist/index.mjs CHANGED
@@ -4,21 +4,21 @@ export { u as useAirdrop } from './shared/vue.CELGI7de.mjs';
4
4
  export { u as useBalance } from './shared/vue.DbJKnSrl.mjs';
5
5
  export { M as MissingClientCapabilityError, u as useClientCapability } from './shared/vue.CAltY57B.mjs';
6
6
  export { u as useConnection } from './shared/vue.C6OkOK2W.mjs';
7
- export { u as usePlanTransaction, a as usePlanTransactions } from './shared/vue.BXNjyJ2c.mjs';
7
+ export { u as usePlanTransaction, a as usePlanTransactions } from './shared/vue.Be12jpqX.mjs';
8
8
  export { u as useProgramAccounts } from './shared/vue.DcZ_R_RH.mjs';
9
9
  export { u as useIdentity, a as usePayer } from './shared/vue.D2J7_NpQ.mjs';
10
10
  export { u as useRequest } from './shared/vue.B8VvC8d2.mjs';
11
11
  export { u as useRpc } from './shared/vue.D8zNWw2t.mjs';
12
12
  export { S as SelectedWalletAccountProvider, c as createSelectedWalletAccountContext, p as provideSelectedWalletAccount, s as selectedWalletAccountInjectionKey, u as useSelectedWalletAccount } from './shared/vue.BngCaeXJ.mjs';
13
- export { u as useSendTransaction, a as useSendTransactions } from './shared/vue.CLAqNcLp.mjs';
14
- export { u as useSignMessage } from './shared/vue.Ddf_Cdjx.mjs';
15
- export { u as useSignAndSendTransaction } from './shared/vue.BTD4usyi.mjs';
16
- export { u as useSignTransactions } from './shared/vue.BHBifdbc.mjs';
17
- export { u as useSignAndSendTransactions } from './shared/vue.sPcsjyKU.mjs';
18
- export { u as useSignatureStatus } from './shared/vue.Bu2cQ690.mjs';
19
- export { u as useSignIn } from './shared/vue.SeuJipQ8.mjs';
13
+ export { u as useSendTransaction, a as useSendTransactions } from './shared/vue.BYAUL5N3.mjs';
14
+ export { u as useSignMessage } from './shared/vue.DxB7g0V1.mjs';
15
+ export { u as useSignAndSendTransaction } from './shared/vue.B6Kw3XOI.mjs';
16
+ export { u as useSignTransactions } from './shared/vue.Cjjxa9Oe.mjs';
17
+ export { u as useSignAndSendTransactions } from './shared/vue.B0hf1OsS.mjs';
18
+ export { u as useSignatureStatus } from './shared/vue.Beyy7qk4.mjs';
19
+ export { u as useSignIn } from './shared/vue.BrX1CFPn.mjs';
20
20
  export { t as tryUseSolana, u as useSolana } from './shared/vue.CcOZ9858.mjs';
21
- export { u as useSolanaQrScanner } from './shared/vue.D0MQeVy2.mjs';
21
+ export { u as useSolanaQrScanner } from './shared/vue.BF7Vn27B.mjs';
22
22
  export { u as useSolanaQrCode } from './shared/vue.Bo4nAja_.mjs';
23
23
  export { u as useSolanaPay } from './shared/vue.gvgOc5rc.mjs';
24
24
  export { u as useSolanaPayConfirmation } from './shared/vue.MN-kcudq.mjs';
@@ -28,7 +28,7 @@ export { u as useTokenAccounts } from './shared/vue.DTpvqDyY.mjs';
28
28
  export { u as useTokenBalance } from './shared/vue.FehFeE3w.mjs';
29
29
  export { u as useTrackedData } from './shared/vue.BNJTXSnQ.mjs';
30
30
  export { u as useTransaction } from './shared/vue.5euWd6-V.mjs';
31
- export { g as getConfirmedTransactionStatus, u as useTransactionConfirmation } from './shared/vue.DPwdqRO_.mjs';
31
+ export { g as getConfirmedTransactionStatus, u as useTransactionConfirmation } from './shared/vue.DeNcsEsq.mjs';
32
32
  export { u as useWallet } from './shared/vue.Bc_Kbwr5.mjs';
33
33
  export { u as useWallets } from './shared/vue.DyLgoSbX.mjs';
34
34
  import { s as solanaInjectionKey } from './shared/vue.D_P5SqqD.mjs';
@@ -2,7 +2,7 @@ import { PartialSignAndSendError, normalizeSolanaError } from '@vue-solana/core/
2
2
  import { withSolanaTimeout } from '@vue-solana/core/timeout';
3
3
  import { createNoWalletSelectedError, assertWalletCanSignAndSendTransactions } from '@vue-solana/core/wallet';
4
4
  import { shallowRef } from 'vue';
5
- import { u as useExecution } from './vue.BiKE9Xuv.mjs';
5
+ import { u as useExecution } from './vue.B92OTUjz.mjs';
6
6
  import { u as useWallet } from './vue.Bc_Kbwr5.mjs';
7
7
 
8
8
  const SIGN_AND_SEND_TIMEOUT_MS = 12e4;
@@ -5,7 +5,7 @@ import { createNoWalletSelectedError } from '@vue-solana/core/wallet';
5
5
  import { ref, computed } from 'vue';
6
6
  import { u as useSolanaClient } from './vue.CZApWQAY.mjs';
7
7
  import { u as useWallet } from './vue.Bc_Kbwr5.mjs';
8
- import { g as getConfirmedTransactionStatus } from './vue.DPwdqRO_.mjs';
8
+ import { g as getConfirmedTransactionStatus } from './vue.DeNcsEsq.mjs';
9
9
 
10
10
  const SIGN_AND_SEND_TIMEOUT_MS = 12e4;
11
11
  function useSignAndSendTransaction() {
@@ -1,9 +1,10 @@
1
1
  import { normalizeSolanaError } from '@vue-solana/core/errors';
2
2
  import { shallowRef, onScopeDispose, computed } from 'vue';
3
3
 
4
- function useExecution(busy, statuses = {}) {
5
- const errorStatus = statuses.error ?? "error";
6
- const idleStatus = statuses.idle ?? "idle";
4
+ function useExecution(busy, options = {}) {
5
+ const errorStatus = options.error ?? "error";
6
+ const idleStatus = options.idle ?? "idle";
7
+ const failureCode = options.failureCode ?? "RPC_FAILURE";
7
8
  const status = shallowRef(idleStatus);
8
9
  const error = shallowRef(null);
9
10
  let id = 0;
@@ -18,7 +19,7 @@ function useExecution(busy, statuses = {}) {
18
19
  }
19
20
  return result;
20
21
  } catch (cause) {
21
- const normalizedError = normalizeSolanaError(cause, "RPC_FAILURE");
22
+ const normalizedError = normalizeSolanaError(cause, failureCode);
22
23
  if (currentId === id) {
23
24
  error.value = normalizedError;
24
25
  status.value = errorStatus;
@@ -1,5 +1,5 @@
1
1
  import { shallowRef, onScopeDispose } from 'vue';
2
- import { u as useExecution } from './vue.BiKE9Xuv.mjs';
2
+ import { u as useExecution } from './vue.B92OTUjz.mjs';
3
3
  import { u as useClientCapability, M as MissingClientCapabilityError } from './vue.CAltY57B.mjs';
4
4
  import { u as useSolanaClient } from './vue.CZApWQAY.mjs';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { ref, shallowRef, onUnmounted } from 'vue';
2
2
  import { parseURL } from '@vue-solana/core/solana-pay';
3
3
 
4
- const DECODE_SIZE = 720;
4
+ const DECODE_SIZES = [360, 480];
5
5
  async function createQrCodeDetector() {
6
6
  const BarcodeDetectorCtor = globalThis.BarcodeDetector;
7
7
  if (!BarcodeDetectorCtor) {
@@ -29,6 +29,19 @@ async function loadQrDecoder() {
29
29
  return null;
30
30
  }
31
31
  }
32
+ async function enableContinuousFocus(stream) {
33
+ const [track] = stream.getVideoTracks?.() ?? [];
34
+ const capabilities = track?.getCapabilities?.();
35
+ if (!track || !capabilities?.focusMode?.includes("continuous")) {
36
+ return;
37
+ }
38
+ try {
39
+ await track.applyConstraints({
40
+ advanced: [{ focusMode: "continuous" }]
41
+ });
42
+ } catch {
43
+ }
44
+ }
32
45
  function useSolanaQrScanner() {
33
46
  const scanning = ref(false);
34
47
  const result = shallowRef(null);
@@ -85,26 +98,31 @@ function useSolanaQrScanner() {
85
98
  if (!qrDecoder || !side) {
86
99
  return null;
87
100
  }
88
- const size = Math.min(side, DECODE_SIZE);
89
101
  frameCanvas ??= document.createElement("canvas");
90
- frameCanvas.width = size;
91
- frameCanvas.height = size;
92
- const context = frameCanvas.getContext("2d", { willReadFrequently: true });
93
- if (!context) {
94
- return null;
102
+ for (const size of new Set(DECODE_SIZES.map((decodeSize) => Math.min(side, decodeSize)))) {
103
+ frameCanvas.width = size;
104
+ frameCanvas.height = size;
105
+ const context = frameCanvas.getContext("2d", { willReadFrequently: true });
106
+ if (!context) {
107
+ return null;
108
+ }
109
+ context.drawImage(
110
+ video,
111
+ (video.videoWidth - side) / 2,
112
+ (video.videoHeight - side) / 2,
113
+ side,
114
+ side,
115
+ 0,
116
+ 0,
117
+ size,
118
+ size
119
+ );
120
+ const text = qrDecoder(context.getImageData(0, 0, size, size).data, size, size);
121
+ if (text) {
122
+ return text;
123
+ }
95
124
  }
96
- context.drawImage(
97
- video,
98
- (video.videoWidth - side) / 2,
99
- (video.videoHeight - side) / 2,
100
- side,
101
- side,
102
- 0,
103
- 0,
104
- size,
105
- size
106
- );
107
- return qrDecoder(context.getImageData(0, 0, size, size).data, size, size);
125
+ return null;
108
126
  }
109
127
  async function scanFrame() {
110
128
  if (!videoElement || videoElement.readyState < 2) {
@@ -143,6 +161,7 @@ function useSolanaQrScanner() {
143
161
  mediaStream = await navigator.mediaDevices.getUserMedia({
144
162
  video: { facingMode: "environment", width: { ideal: 1280 }, height: { ideal: 720 } }
145
163
  });
164
+ await enableContinuousFocus(mediaStream);
146
165
  if (videoElement) {
147
166
  videoElement.srcObject = mediaStream;
148
167
  await videoElement.play().catch(() => {
@@ -1,4 +1,4 @@
1
- import { u as useClientAction } from './vue.CbmzveKF.mjs';
1
+ import { u as useClientAction } from './vue.BB5bTm1O.mjs';
2
2
 
3
3
  const SENDING_PROVIDER_HINT = "Use a client created by `createSolanaClient({ payer })` \u2014 or any client with a `payer` signer. Kit reads `client.payer` when it plans a transaction from an instruction plan.";
4
4
  const SEND_STATUSES = {
@@ -1,4 +1,4 @@
1
- import { u as useClientAction } from './vue.CbmzveKF.mjs';
1
+ import { u as useClientAction } from './vue.BB5bTm1O.mjs';
2
2
 
3
3
  const PLANNING_PROVIDER_HINT = "Install a planner plugin, e.g. `createClient().use(rpcTransactionPlanner())` from `@solana/kit-plugin-rpc`, and plan with a client that has a `payer` signer \u2014 Kit reads `client.payer` to set the fee payer.";
4
4
  const PLAN_STATUSES = {
@@ -89,7 +89,7 @@ function useSignatureStatus(signature, options = {}) {
89
89
  return;
90
90
  }
91
91
  if (options.pollIntervalMs <= 0) {
92
- error.value = createSolanaError("RPC_FAILURE", "pollIntervalMs must be greater than 0");
92
+ error.value = createSolanaError("INVALID_INPUT", "pollIntervalMs must be greater than 0");
93
93
  return;
94
94
  }
95
95
  try {
@@ -1,12 +1,14 @@
1
1
  import { createNoWalletSelectedError, assertWalletCanSignIn } from '@vue-solana/core/wallet';
2
2
  import { shallowRef } from 'vue';
3
- import { u as useExecution } from './vue.BiKE9Xuv.mjs';
3
+ import { u as useExecution } from './vue.B92OTUjz.mjs';
4
4
  import { u as useWallet } from './vue.Bc_Kbwr5.mjs';
5
5
 
6
6
  function useSignIn() {
7
7
  const { wallet } = useWallet();
8
8
  const signInResult = shallowRef(null);
9
- const { status, loading, error, execute } = useExecution("signing-in");
9
+ const { status, loading, error, execute } = useExecution("signing-in", {
10
+ failureCode: "WALLET_FAILURE"
11
+ });
10
12
  function signIn(input) {
11
13
  signInResult.value = null;
12
14
  return execute(
@@ -1,12 +1,14 @@
1
1
  import { createNoWalletSelectedError, assertWalletCanSignTransactions } from '@vue-solana/core/wallet';
2
2
  import { shallowRef } from 'vue';
3
- import { u as useExecution } from './vue.BiKE9Xuv.mjs';
3
+ import { u as useExecution } from './vue.B92OTUjz.mjs';
4
4
  import { u as useWallet } from './vue.Bc_Kbwr5.mjs';
5
5
 
6
6
  function useSignTransactions() {
7
7
  const { wallet } = useWallet();
8
8
  const signedTransactions = shallowRef(null);
9
- const { status, loading, error, execute } = useExecution("signing");
9
+ const { status, loading, error, execute } = useExecution("signing", {
10
+ failureCode: "WALLET_FAILURE"
11
+ });
10
12
  function sign(transactions) {
11
13
  signedTransactions.value = null;
12
14
  return execute(
@@ -1,6 +1,6 @@
1
1
  import { confirmTransactionSignature } from '@vue-solana/core/transaction';
2
2
  import { ref } from 'vue';
3
- import { u as useExecution } from './vue.BiKE9Xuv.mjs';
3
+ import { u as useExecution } from './vue.B92OTUjz.mjs';
4
4
  import { u as useSolanaClient } from './vue.CZApWQAY.mjs';
5
5
 
6
6
  function getConfirmedTransactionStatus(confirmation) {
@@ -1,13 +1,15 @@
1
1
  import { createNoWalletSelectedError, assertWalletCanSignMessage } from '@vue-solana/core/wallet';
2
2
  import { ref } from 'vue';
3
- import { u as useExecution } from './vue.BiKE9Xuv.mjs';
3
+ import { u as useExecution } from './vue.B92OTUjz.mjs';
4
4
  import { u as useWallet } from './vue.Bc_Kbwr5.mjs';
5
5
 
6
6
  function useSignMessage() {
7
7
  const { wallet } = useWallet();
8
8
  const signedMessage = ref(null);
9
9
  const signature = ref(null);
10
- const { status, loading, error, execute } = useExecution("signing");
10
+ const { status, loading, error, execute } = useExecution("signing", {
11
+ failureCode: "WALLET_FAILURE"
12
+ });
11
13
  function sign(message) {
12
14
  signedMessage.value = null;
13
15
  signature.value = null;
@@ -7,6 +7,14 @@ import * as _solana_kit from '@solana/kit';
7
7
  * in 5.0.0.
8
8
  */
9
9
  declare function useConnection(): Omit<_solana_kit.Client<{
10
+ planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
11
+ abortSignal?: AbortSignal;
12
+ maxInstructionsPerTransaction?: number;
13
+ }) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
14
+ planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
15
+ abortSignal?: AbortSignal;
16
+ maxInstructionsPerTransaction?: number;
17
+ }) => Promise<_solana_kit.TransactionPlan>;
10
18
  signTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
11
19
  abortSignal?: AbortSignal;
12
20
  maxInstructionsPerTransaction?: number;
@@ -16,14 +24,6 @@ declare function useConnection(): Omit<_solana_kit.Client<{
16
24
  rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
17
25
  getMinimumBalance: (space: number, config?: _solana_kit.GetMinimumBalanceConfig) => Promise<_solana_kit.Lamports>;
18
26
  transactionPlanner: _solana_kit.TransactionPlanner;
19
- planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
20
- abortSignal?: AbortSignal;
21
- maxInstructionsPerTransaction?: number;
22
- }) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
23
- planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
24
- abortSignal?: AbortSignal;
25
- maxInstructionsPerTransaction?: number;
26
- }) => Promise<_solana_kit.TransactionPlan>;
27
27
  signTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
28
28
  kind: "single";
29
29
  message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
@@ -1 +1 @@
1
- export { u as usePlanTransaction, a as usePlanTransactions } from './shared/vue.BXNjyJ2c.mjs';
1
+ export { u as usePlanTransaction, a as usePlanTransactions } from './shared/vue.Be12jpqX.mjs';
@@ -1 +1 @@
1
- export { a as usePlanTransactions } from './shared/vue.BXNjyJ2c.mjs';
1
+ export { a as usePlanTransactions } from './shared/vue.Be12jpqX.mjs';
package/dist/useRpc.d.ts CHANGED
@@ -15,6 +15,14 @@ declare function useRpc(): {
15
15
  latestBlockhash: vue.Ref<string | null, string | null>;
16
16
  checkConnection: () => Promise<void>;
17
17
  client: Omit<_solana_kit.Client<{
18
+ planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
19
+ abortSignal?: AbortSignal;
20
+ maxInstructionsPerTransaction?: number;
21
+ }) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
22
+ planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
23
+ abortSignal?: AbortSignal;
24
+ maxInstructionsPerTransaction?: number;
25
+ }) => Promise<_solana_kit.TransactionPlan>;
18
26
  signTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
19
27
  abortSignal?: AbortSignal;
20
28
  maxInstructionsPerTransaction?: number;
@@ -24,14 +32,6 @@ declare function useRpc(): {
24
32
  rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
25
33
  getMinimumBalance: (space: number, config?: _solana_kit.GetMinimumBalanceConfig) => Promise<_solana_kit.Lamports>;
26
34
  transactionPlanner: _solana_kit.TransactionPlanner;
27
- planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
28
- abortSignal?: AbortSignal;
29
- maxInstructionsPerTransaction?: number;
30
- }) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
31
- planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
32
- abortSignal?: AbortSignal;
33
- maxInstructionsPerTransaction?: number;
34
- }) => Promise<_solana_kit.TransactionPlan>;
35
35
  signTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
36
36
  kind: "single";
37
37
  message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
@@ -1 +1 @@
1
- export { u as useSendTransaction, a as useSendTransactions } from './shared/vue.CLAqNcLp.mjs';
1
+ export { u as useSendTransaction, a as useSendTransactions } from './shared/vue.BYAUL5N3.mjs';
@@ -1 +1 @@
1
- export { a as useSendTransactions } from './shared/vue.CLAqNcLp.mjs';
1
+ export { a as useSendTransactions } from './shared/vue.BYAUL5N3.mjs';
@@ -1 +1 @@
1
- export { u as useSignAndSendTransaction } from './shared/vue.BTD4usyi.mjs';
1
+ export { u as useSignAndSendTransaction } from './shared/vue.B6Kw3XOI.mjs';
@@ -1,2 +1,2 @@
1
- export { u as useSignAndSendTransactions } from './shared/vue.sPcsjyKU.mjs';
1
+ export { u as useSignAndSendTransactions } from './shared/vue.B0hf1OsS.mjs';
2
2
  export { PartialSignAndSendError } from '@vue-solana/core/errors';
@@ -1 +1 @@
1
- export { u as useSignIn } from './shared/vue.SeuJipQ8.mjs';
1
+ export { u as useSignIn } from './shared/vue.BrX1CFPn.mjs';
@@ -1 +1 @@
1
- export { u as useSignMessage } from './shared/vue.Ddf_Cdjx.mjs';
1
+ export { u as useSignMessage } from './shared/vue.DxB7g0V1.mjs';
@@ -1 +1 @@
1
- export { u as useSignTransactions } from './shared/vue.BHBifdbc.mjs';
1
+ export { u as useSignTransactions } from './shared/vue.Cjjxa9Oe.mjs';
@@ -1 +1 @@
1
- export { u as useSignatureStatus } from './shared/vue.Bu2cQ690.mjs';
1
+ export { u as useSignatureStatus } from './shared/vue.Beyy7qk4.mjs';
@@ -3,6 +3,14 @@ import * as _solana_kit from '@solana/kit';
3
3
 
4
4
  declare function useSolanaClient(): {
5
5
  client: Omit<_solana_kit.Client<{
6
+ planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
7
+ abortSignal?: AbortSignal;
8
+ maxInstructionsPerTransaction?: number;
9
+ }) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
10
+ planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
11
+ abortSignal?: AbortSignal;
12
+ maxInstructionsPerTransaction?: number;
13
+ }) => Promise<_solana_kit.TransactionPlan>;
6
14
  signTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
7
15
  abortSignal?: AbortSignal;
8
16
  maxInstructionsPerTransaction?: number;
@@ -12,14 +20,6 @@ declare function useSolanaClient(): {
12
20
  rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
13
21
  getMinimumBalance: (space: number, config?: _solana_kit.GetMinimumBalanceConfig) => Promise<_solana_kit.Lamports>;
14
22
  transactionPlanner: _solana_kit.TransactionPlanner;
15
- planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
16
- abortSignal?: AbortSignal;
17
- maxInstructionsPerTransaction?: number;
18
- }) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
19
- planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
20
- abortSignal?: AbortSignal;
21
- maxInstructionsPerTransaction?: number;
22
- }) => Promise<_solana_kit.TransactionPlan>;
23
23
  signTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
24
24
  kind: "single";
25
25
  message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
@@ -6,7 +6,7 @@ declare function useSolanaPay(): {
6
6
  requestUrl: vue.ShallowRef<string | null, string | null>;
7
7
  parsedRequest: vue.ShallowRef<unknown, unknown>;
8
8
  reference: vue.ShallowRef<unknown, unknown>;
9
- status: vue.ShallowRef<"confirmed" | "finalized" | "error" | "idle" | "pending" | "found" | "expired", "confirmed" | "finalized" | "error" | "idle" | "pending" | "found" | "expired">;
9
+ status: vue.ShallowRef<"idle" | "error" | "confirmed" | "finalized" | "pending" | "found" | "expired", "idle" | "error" | "confirmed" | "finalized" | "pending" | "found" | "expired">;
10
10
  loading: vue.ShallowRef<boolean, boolean>;
11
11
  error: vue.ShallowRef<unknown, unknown>;
12
12
  createTransferRequest: (input: Record<string, unknown>) => Promise<string>;
@@ -1 +1 @@
1
- export { u as useSolanaQrScanner } from './shared/vue.D0MQeVy2.mjs';
1
+ export { u as useSolanaQrScanner } from './shared/vue.BF7Vn27B.mjs';
@@ -1 +1 @@
1
- export { g as getConfirmedTransactionStatus, u as useTransactionConfirmation } from './shared/vue.DPwdqRO_.mjs';
1
+ export { g as getConfirmedTransactionStatus, u as useTransactionConfirmation } from './shared/vue.DeNcsEsq.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-solana/vue",
3
- "version": "4.1.10",
3
+ "version": "4.1.12",
4
4
  "description": "Vue plugin and composables for Solana applications.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -195,7 +195,7 @@
195
195
  },
196
196
  "dependencies": {
197
197
  "jsqr": "^1.4.0",
198
- "@vue-solana/core": "4.1.10"
198
+ "@vue-solana/core": "4.1.12"
199
199
  },
200
200
  "peerDependencies": {
201
201
  "vue": "^3.5.0"