@vue-solana/vue 0.6.1 → 0.8.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.
Files changed (80) hide show
  1. package/README.md +39 -3
  2. package/dist/index.cjs +71 -34
  3. package/dist/index.d.cts +3 -1
  4. package/dist/index.d.mts +3 -1
  5. package/dist/index.d.ts +3 -1
  6. package/dist/index.mjs +69 -34
  7. package/dist/shared/{vue.DYf_CRDv.mjs → vue.5sF8eKgx.mjs} +30 -5
  8. package/dist/shared/{vue.BPnK_lsh.cjs → vue.BBoDTIfF.cjs} +6 -4
  9. package/dist/shared/{vue.DQhHHVu6.mjs → vue.BDl2vVkp.mjs} +10 -4
  10. package/dist/shared/{vue.DHVYJk8P.cjs → vue.BeA8WQ2g.cjs} +4 -2
  11. package/dist/shared/{vue.RQ9fETnm.mjs → vue.BlfFUgC-.mjs} +20 -28
  12. package/dist/shared/{vue.DEQJ23UM.cjs → vue.BnSjOzvb.cjs} +21 -29
  13. package/dist/shared/{vue.JC5FdU2O.mjs → vue.BzopW_4m.mjs} +8 -6
  14. package/dist/shared/{vue.gLqkzJY4.mjs → vue.C4d2JA8U.mjs} +7 -23
  15. package/dist/shared/{vue.DQi38JeF.cjs → vue.CE5i8KZZ.cjs} +6 -23
  16. package/dist/shared/{vue.7TzeDJZX.mjs → vue.Cl3hXlXK.mjs} +6 -4
  17. package/dist/shared/{vue.jOsz34kz.mjs → vue.CxMrojxC.mjs} +4 -2
  18. package/dist/shared/{vue.CUTLu1Gf.mjs → vue.CzTu_DPr.mjs} +4 -2
  19. package/dist/shared/{vue.dmuispJ3.cjs → vue.D1JtJ2lD.cjs} +4 -2
  20. package/dist/shared/{vue.DGhodYJh.d.cts → vue.DL3z5PxP.d.cts} +2 -1
  21. package/dist/shared/{vue.DGhodYJh.d.mts → vue.DL3z5PxP.d.mts} +2 -1
  22. package/dist/shared/{vue.DGhodYJh.d.ts → vue.DL3z5PxP.d.ts} +2 -1
  23. package/dist/shared/{vue.DUufwq8y.cjs → vue.DRlaqQCL.cjs} +8 -6
  24. package/dist/shared/vue.DfeKj9vL.cjs +94 -0
  25. package/dist/shared/vue.DuI_Jm5P.cjs +63 -0
  26. package/dist/shared/{vue.D_AM1Nl8.cjs → vue.NFoc_-Kt.cjs} +13 -7
  27. package/dist/shared/vue.PTQ2iRAi.mjs +61 -0
  28. package/dist/useAccountInfo.cjs +2 -1
  29. package/dist/useAccountInfo.d.cts +2 -1
  30. package/dist/useAccountInfo.d.mts +2 -1
  31. package/dist/useAccountInfo.d.ts +2 -1
  32. package/dist/useAccountInfo.mjs +2 -1
  33. package/dist/useBalance.cjs +3 -2
  34. package/dist/useBalance.d.cts +2 -1
  35. package/dist/useBalance.d.mts +2 -1
  36. package/dist/useBalance.d.ts +2 -1
  37. package/dist/useBalance.mjs +3 -2
  38. package/dist/useProgramAccounts.cjs +2 -1
  39. package/dist/useProgramAccounts.d.cts +2 -1
  40. package/dist/useProgramAccounts.d.mts +2 -1
  41. package/dist/useProgramAccounts.d.ts +2 -1
  42. package/dist/useProgramAccounts.mjs +2 -1
  43. package/dist/useRpc.d.cts +3 -2
  44. package/dist/useRpc.d.mts +3 -2
  45. package/dist/useRpc.d.ts +3 -2
  46. package/dist/useSignAndSendTransaction.cjs +6 -3
  47. package/dist/useSignAndSendTransaction.d.cts +2 -1
  48. package/dist/useSignAndSendTransaction.d.mts +2 -1
  49. package/dist/useSignAndSendTransaction.d.ts +2 -1
  50. package/dist/useSignAndSendTransaction.mjs +6 -3
  51. package/dist/useSignMessage.cjs +12 -0
  52. package/dist/useSignMessage.d.cts +236 -0
  53. package/dist/useSignMessage.d.mts +236 -0
  54. package/dist/useSignMessage.d.ts +236 -0
  55. package/dist/useSignMessage.mjs +6 -0
  56. package/dist/useSignatureStatus.cjs +2 -1
  57. package/dist/useSignatureStatus.d.cts +2 -1
  58. package/dist/useSignatureStatus.d.mts +2 -1
  59. package/dist/useSignatureStatus.d.ts +2 -1
  60. package/dist/useSignatureStatus.mjs +2 -1
  61. package/dist/useSolana.d.cts +2 -1
  62. package/dist/useSolana.d.mts +2 -1
  63. package/dist/useSolana.d.ts +2 -1
  64. package/dist/useTransaction.cjs +3 -1
  65. package/dist/useTransaction.d.cts +2 -1
  66. package/dist/useTransaction.d.mts +2 -1
  67. package/dist/useTransaction.d.ts +2 -1
  68. package/dist/useTransaction.mjs +3 -1
  69. package/dist/useTransactionConfirmation.cjs +2 -1
  70. package/dist/useTransactionConfirmation.d.cts +2 -1
  71. package/dist/useTransactionConfirmation.d.mts +2 -1
  72. package/dist/useTransactionConfirmation.d.ts +2 -1
  73. package/dist/useTransactionConfirmation.mjs +2 -1
  74. package/dist/useWallet.cjs +3 -1
  75. package/dist/useWallet.d.cts +14 -0
  76. package/dist/useWallet.d.mts +14 -0
  77. package/dist/useWallet.d.ts +14 -0
  78. package/dist/useWallet.mjs +3 -1
  79. package/package.json +7 -2
  80. package/dist/shared/vue.CwPjPFN6.cjs +0 -69
@@ -0,0 +1,94 @@
1
+ 'use strict';
2
+
3
+ const errors = require('@vue-solana/core/errors');
4
+ const wallet = require('@vue-solana/core/wallet');
5
+ const vue = require('vue');
6
+ const useSolana = require('./vue.C4tLiG3R.cjs');
7
+
8
+ function useWallet() {
9
+ const solana = useSolana.useSolana();
10
+ const wallet$1 = solana.wallet;
11
+ const connecting = vue.ref(false);
12
+ const disconnecting = vue.ref(false);
13
+ async function connect() {
14
+ const activeWallet = wallet$1.value;
15
+ if (!activeWallet) {
16
+ throw wallet.createNoWalletSelectedError();
17
+ }
18
+ connecting.value = true;
19
+ try {
20
+ const connection = activeWallet.connect();
21
+ vue.triggerRef(wallet$1);
22
+ await connection;
23
+ vue.triggerRef(wallet$1);
24
+ console.info("[Vue Solana] Wallet connected", {
25
+ publicKey: activeWallet.publicKey?.toBase58() ?? null
26
+ });
27
+ } catch (error) {
28
+ const normalizedError = errors.normalizeSolanaError(error, "RPC_FAILURE");
29
+ vue.triggerRef(wallet$1);
30
+ console.error("[Vue Solana] Wallet connection failed", normalizedError);
31
+ throw normalizedError;
32
+ } finally {
33
+ connecting.value = false;
34
+ }
35
+ }
36
+ async function disconnect() {
37
+ const activeWallet = wallet$1.value;
38
+ if (!activeWallet) {
39
+ return;
40
+ }
41
+ const publicKey = activeWallet.publicKey?.toBase58() ?? null;
42
+ disconnecting.value = true;
43
+ try {
44
+ await activeWallet.disconnect();
45
+ vue.triggerRef(wallet$1);
46
+ console.info("[Vue Solana] Wallet disconnected", { publicKey });
47
+ } catch (error) {
48
+ const normalizedError = errors.normalizeSolanaError(error, "RPC_FAILURE");
49
+ vue.triggerRef(wallet$1);
50
+ console.error("[Vue Solana] Wallet disconnection failed", normalizedError);
51
+ throw normalizedError;
52
+ } finally {
53
+ disconnecting.value = false;
54
+ }
55
+ }
56
+ const isConnecting = vue.computed(() => Boolean(connecting.value || wallet$1.value?.connecting));
57
+ const isDisconnecting = vue.computed(
58
+ () => Boolean(disconnecting.value || wallet$1.value?.disconnecting)
59
+ );
60
+ const canConnect = vue.computed(() => Boolean(wallet$1.value?.connect));
61
+ const canDisconnect = vue.computed(() => Boolean(wallet$1.value?.disconnect));
62
+ const canSignMessage = vue.computed(() => Boolean(wallet$1.value?.signMessage));
63
+ const canSignTransaction = vue.computed(() => Boolean(wallet$1.value?.signTransaction));
64
+ const canSignAllTransactions = vue.computed(() => Boolean(wallet$1.value?.signAllTransactions));
65
+ const canSignAndSendTransaction = vue.computed(() => Boolean(wallet$1.value?.signAndSendTransaction));
66
+ const capabilities = vue.computed(() => ({
67
+ connect: canConnect.value,
68
+ disconnect: canDisconnect.value,
69
+ signMessage: canSignMessage.value,
70
+ signTransaction: canSignTransaction.value,
71
+ signAllTransactions: canSignAllTransactions.value,
72
+ signAndSendTransaction: canSignAndSendTransaction.value
73
+ }));
74
+ return {
75
+ wallet: wallet$1,
76
+ publicKey: vue.computed(() => wallet$1.value?.publicKey ?? null),
77
+ connected: vue.computed(() => Boolean(wallet$1.value?.connected && wallet$1.value.publicKey)),
78
+ connecting: isConnecting,
79
+ disconnecting: isDisconnecting,
80
+ loading: vue.computed(() => isConnecting.value || isDisconnecting.value),
81
+ capabilities,
82
+ canConnect,
83
+ canDisconnect,
84
+ canSignMessage,
85
+ canSignTransaction,
86
+ canSignAllTransactions,
87
+ canSignAndSendTransaction,
88
+ setWallet: solana.setWallet,
89
+ connect,
90
+ disconnect
91
+ };
92
+ }
93
+
94
+ exports.useWallet = useWallet;
@@ -0,0 +1,63 @@
1
+ 'use strict';
2
+
3
+ const errors = require('@vue-solana/core/errors');
4
+ const wallet = require('@vue-solana/core/wallet');
5
+ const vue = require('vue');
6
+ const useWallet = require('./vue.DfeKj9vL.cjs');
7
+
8
+ function useSignMessage() {
9
+ const { wallet: wallet$1 } = useWallet.useWallet();
10
+ const signedMessage = vue.ref(null);
11
+ const signature = vue.ref(null);
12
+ const status = vue.ref("idle");
13
+ const loading = vue.ref(false);
14
+ const error = vue.ref(null);
15
+ let executionId = 0;
16
+ async function execute(message) {
17
+ const currentExecutionId = ++executionId;
18
+ status.value = "signing";
19
+ loading.value = true;
20
+ error.value = null;
21
+ signedMessage.value = null;
22
+ signature.value = null;
23
+ const activeWallet = wallet$1.value;
24
+ if (!activeWallet) {
25
+ const normalizedError = wallet.createNoWalletSelectedError();
26
+ error.value = normalizedError;
27
+ status.value = "error";
28
+ loading.value = false;
29
+ throw normalizedError;
30
+ }
31
+ try {
32
+ wallet.assertWalletCanSignMessage(activeWallet);
33
+ const result = await activeWallet.signMessage(message);
34
+ if (currentExecutionId === executionId) {
35
+ signedMessage.value = result.signedMessage;
36
+ signature.value = result.signature;
37
+ status.value = "signed";
38
+ }
39
+ return result;
40
+ } catch (cause) {
41
+ const normalizedError = errors.normalizeSolanaError(cause, "RPC_FAILURE");
42
+ if (currentExecutionId === executionId) {
43
+ error.value = normalizedError;
44
+ status.value = "error";
45
+ }
46
+ throw normalizedError;
47
+ } finally {
48
+ if (currentExecutionId === executionId) {
49
+ loading.value = false;
50
+ }
51
+ }
52
+ }
53
+ return {
54
+ signedMessage,
55
+ signature,
56
+ status,
57
+ loading,
58
+ error,
59
+ execute
60
+ };
61
+ }
62
+
63
+ exports.useSignMessage = useSignMessage;
@@ -1,11 +1,12 @@
1
1
  'use strict';
2
2
 
3
- const web3Compat = require('@solana/web3-compat');
3
+ const address = require('@vue-solana/core/address');
4
+ const errors = require('@vue-solana/core/errors');
4
5
  const vue = require('vue');
5
6
  const useConnection = require('./vue.CwhEmATP.cjs');
6
7
  const useSolana = require('./vue.C4tLiG3R.cjs');
7
8
 
8
- function useBalance(address, commitment) {
9
+ function useBalance(address$1, commitment) {
9
10
  const solana = useSolana.tryUseSolana();
10
11
  const connection = solana?.connection ?? useConnection.useConnection();
11
12
  const balance = vue.shallowRef(null);
@@ -14,7 +15,7 @@ function useBalance(address, commitment) {
14
15
  let refreshId = 0;
15
16
  async function refresh() {
16
17
  const requestId = ++refreshId;
17
- const value = vue.toValue(address);
18
+ const value = vue.toValue(address$1);
18
19
  if (!value || !solana) {
19
20
  balance.value = null;
20
21
  loading.value = false;
@@ -24,17 +25,22 @@ function useBalance(address, commitment) {
24
25
  loading.value = true;
25
26
  error.value = null;
26
27
  try {
27
- const publicKey = typeof value === "string" ? new web3Compat.PublicKey(value) : value;
28
+ const publicKey = address.parsePublicKey(value);
29
+ if (!publicKey) {
30
+ balance.value = null;
31
+ return null;
32
+ }
28
33
  const nextBalance = await connection.getBalance(publicKey, commitment);
29
34
  if (requestId === refreshId) {
30
35
  balance.value = nextBalance;
31
36
  }
32
37
  return nextBalance;
33
38
  } catch (cause) {
39
+ const normalizedError = errors.normalizeSolanaError(cause, "RPC_FAILURE");
34
40
  if (requestId === refreshId) {
35
- error.value = cause;
41
+ error.value = normalizedError;
36
42
  }
37
- throw cause;
43
+ throw normalizedError;
38
44
  } finally {
39
45
  if (requestId === refreshId) {
40
46
  loading.value = false;
@@ -45,7 +51,7 @@ function useBalance(address, commitment) {
45
51
  void refresh().catch(() => void 0);
46
52
  });
47
53
  vue.watch(
48
- () => vue.toValue(address),
54
+ () => vue.toValue(address$1),
49
55
  () => {
50
56
  void refresh().catch(() => void 0);
51
57
  }
@@ -0,0 +1,61 @@
1
+ import { normalizeSolanaError } from '@vue-solana/core/errors';
2
+ import { createNoWalletSelectedError, assertWalletCanSignMessage } from '@vue-solana/core/wallet';
3
+ import { ref } from 'vue';
4
+ import { u as useWallet } from './vue.5sF8eKgx.mjs';
5
+
6
+ function useSignMessage() {
7
+ const { wallet } = useWallet();
8
+ const signedMessage = ref(null);
9
+ const signature = ref(null);
10
+ const status = ref("idle");
11
+ const loading = ref(false);
12
+ const error = ref(null);
13
+ let executionId = 0;
14
+ async function execute(message) {
15
+ const currentExecutionId = ++executionId;
16
+ status.value = "signing";
17
+ loading.value = true;
18
+ error.value = null;
19
+ signedMessage.value = null;
20
+ signature.value = null;
21
+ const activeWallet = wallet.value;
22
+ if (!activeWallet) {
23
+ const normalizedError = createNoWalletSelectedError();
24
+ error.value = normalizedError;
25
+ status.value = "error";
26
+ loading.value = false;
27
+ throw normalizedError;
28
+ }
29
+ try {
30
+ assertWalletCanSignMessage(activeWallet);
31
+ const result = await activeWallet.signMessage(message);
32
+ if (currentExecutionId === executionId) {
33
+ signedMessage.value = result.signedMessage;
34
+ signature.value = result.signature;
35
+ status.value = "signed";
36
+ }
37
+ return result;
38
+ } catch (cause) {
39
+ const normalizedError = normalizeSolanaError(cause, "RPC_FAILURE");
40
+ if (currentExecutionId === executionId) {
41
+ error.value = normalizedError;
42
+ status.value = "error";
43
+ }
44
+ throw normalizedError;
45
+ } finally {
46
+ if (currentExecutionId === executionId) {
47
+ loading.value = false;
48
+ }
49
+ }
50
+ }
51
+ return {
52
+ signedMessage,
53
+ signature,
54
+ status,
55
+ loading,
56
+ error,
57
+ execute
58
+ };
59
+ }
60
+
61
+ export { useSignMessage as u };
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const useAccountInfo = require('./shared/vue.BPnK_lsh.cjs');
3
+ const useAccountInfo = require('./shared/vue.BBoDTIfF.cjs');
4
4
  require('@vue-solana/core/address');
5
+ require('@vue-solana/core/errors');
5
6
  require('vue');
6
7
  require('./shared/vue.CwhEmATP.cjs');
7
8
  require('./shared/vue.COyyrsQU.cjs');
@@ -1,6 +1,7 @@
1
1
  import * as vue from 'vue';
2
2
  import { MaybeRefOrGetter } from 'vue';
3
3
  import { PublicKeyInput } from '@vue-solana/core/address';
4
+ import { SolanaError } from '@vue-solana/core/errors';
4
5
  import { Commitment } from '@solana/web3-compat';
5
6
 
6
7
  interface UseAccountInfoOptions {
@@ -10,7 +11,7 @@ interface UseAccountInfoOptions {
10
11
  declare function useAccountInfo(address: MaybeRefOrGetter<PublicKeyInput>, options?: UseAccountInfoOptions): {
11
12
  accountInfo: any;
12
13
  loading: vue.ShallowRef<boolean, boolean>;
13
- error: vue.ShallowRef<unknown, unknown>;
14
+ error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
14
15
  refresh: () => Promise<any>;
15
16
  stopWatching: () => Promise<void>;
16
17
  };
@@ -1,6 +1,7 @@
1
1
  import * as vue from 'vue';
2
2
  import { MaybeRefOrGetter } from 'vue';
3
3
  import { PublicKeyInput } from '@vue-solana/core/address';
4
+ import { SolanaError } from '@vue-solana/core/errors';
4
5
  import { Commitment } from '@solana/web3-compat';
5
6
 
6
7
  interface UseAccountInfoOptions {
@@ -10,7 +11,7 @@ interface UseAccountInfoOptions {
10
11
  declare function useAccountInfo(address: MaybeRefOrGetter<PublicKeyInput>, options?: UseAccountInfoOptions): {
11
12
  accountInfo: any;
12
13
  loading: vue.ShallowRef<boolean, boolean>;
13
- error: vue.ShallowRef<unknown, unknown>;
14
+ error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
14
15
  refresh: () => Promise<any>;
15
16
  stopWatching: () => Promise<void>;
16
17
  };
@@ -1,6 +1,7 @@
1
1
  import * as vue from 'vue';
2
2
  import { MaybeRefOrGetter } from 'vue';
3
3
  import { PublicKeyInput } from '@vue-solana/core/address';
4
+ import { SolanaError } from '@vue-solana/core/errors';
4
5
  import { Commitment } from '@solana/web3-compat';
5
6
 
6
7
  interface UseAccountInfoOptions {
@@ -10,7 +11,7 @@ interface UseAccountInfoOptions {
10
11
  declare function useAccountInfo(address: MaybeRefOrGetter<PublicKeyInput>, options?: UseAccountInfoOptions): {
11
12
  accountInfo: any;
12
13
  loading: vue.ShallowRef<boolean, boolean>;
13
- error: vue.ShallowRef<unknown, unknown>;
14
+ error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
14
15
  refresh: () => Promise<any>;
15
16
  stopWatching: () => Promise<void>;
16
17
  };
@@ -1,5 +1,6 @@
1
- export { u as useAccountInfo } from './shared/vue.7TzeDJZX.mjs';
1
+ export { u as useAccountInfo } from './shared/vue.Cl3hXlXK.mjs';
2
2
  import '@vue-solana/core/address';
3
+ import '@vue-solana/core/errors';
3
4
  import 'vue';
4
5
  import './shared/vue.DlEAL2G8.mjs';
5
6
  import './shared/vue.BqDzSepb.mjs';
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const useBalance = require('./shared/vue.D_AM1Nl8.cjs');
4
- require('@solana/web3-compat');
3
+ const useBalance = require('./shared/vue.NFoc_-Kt.cjs');
4
+ require('@vue-solana/core/address');
5
+ require('@vue-solana/core/errors');
5
6
  require('vue');
6
7
  require('./shared/vue.CwhEmATP.cjs');
7
8
  require('./shared/vue.COyyrsQU.cjs');
@@ -1,11 +1,12 @@
1
1
  import * as vue from 'vue';
2
2
  import { MaybeRefOrGetter } from 'vue';
3
3
  import { PublicKey, Commitment } from '@solana/web3-compat';
4
+ import { SolanaError } from '@vue-solana/core/errors';
4
5
 
5
6
  declare function useBalance(address: MaybeRefOrGetter<PublicKey | string | null | undefined>, commitment?: Commitment): {
6
7
  balance: vue.ShallowRef<number | null, number | null>;
7
8
  loading: vue.ShallowRef<boolean, boolean>;
8
- error: vue.ShallowRef<unknown, unknown>;
9
+ error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
9
10
  refresh: () => Promise<any>;
10
11
  };
11
12
 
@@ -1,11 +1,12 @@
1
1
  import * as vue from 'vue';
2
2
  import { MaybeRefOrGetter } from 'vue';
3
3
  import { PublicKey, Commitment } from '@solana/web3-compat';
4
+ import { SolanaError } from '@vue-solana/core/errors';
4
5
 
5
6
  declare function useBalance(address: MaybeRefOrGetter<PublicKey | string | null | undefined>, commitment?: Commitment): {
6
7
  balance: vue.ShallowRef<number | null, number | null>;
7
8
  loading: vue.ShallowRef<boolean, boolean>;
8
- error: vue.ShallowRef<unknown, unknown>;
9
+ error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
9
10
  refresh: () => Promise<any>;
10
11
  };
11
12
 
@@ -1,11 +1,12 @@
1
1
  import * as vue from 'vue';
2
2
  import { MaybeRefOrGetter } from 'vue';
3
3
  import { PublicKey, Commitment } from '@solana/web3-compat';
4
+ import { SolanaError } from '@vue-solana/core/errors';
4
5
 
5
6
  declare function useBalance(address: MaybeRefOrGetter<PublicKey | string | null | undefined>, commitment?: Commitment): {
6
7
  balance: vue.ShallowRef<number | null, number | null>;
7
8
  loading: vue.ShallowRef<boolean, boolean>;
8
- error: vue.ShallowRef<unknown, unknown>;
9
+ error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
9
10
  refresh: () => Promise<any>;
10
11
  };
11
12
 
@@ -1,5 +1,6 @@
1
- export { u as useBalance } from './shared/vue.DQhHHVu6.mjs';
2
- import '@solana/web3-compat';
1
+ export { u as useBalance } from './shared/vue.BDl2vVkp.mjs';
2
+ import '@vue-solana/core/address';
3
+ import '@vue-solana/core/errors';
3
4
  import 'vue';
4
5
  import './shared/vue.DlEAL2G8.mjs';
5
6
  import './shared/vue.BqDzSepb.mjs';
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const useProgramAccounts = require('./shared/vue.dmuispJ3.cjs');
3
+ const useProgramAccounts = require('./shared/vue.D1JtJ2lD.cjs');
4
4
  require('@vue-solana/core/address');
5
+ require('@vue-solana/core/errors');
5
6
  require('vue');
6
7
  require('./shared/vue.CwhEmATP.cjs');
7
8
  require('./shared/vue.COyyrsQU.cjs');
@@ -1,6 +1,7 @@
1
1
  import * as vue from 'vue';
2
2
  import { MaybeRefOrGetter } from 'vue';
3
3
  import { PublicKeyInput } from '@vue-solana/core/address';
4
+ import { SolanaError } from '@vue-solana/core/errors';
4
5
  import { PublicKey, AccountInfo, Commitment } from '@solana/web3-compat';
5
6
 
6
7
  type ProgramAccountMemcmpEncoding = "base58" | "base64" | "base64+zstd" | "bytes";
@@ -31,7 +32,7 @@ interface ProgramAccount<TData extends Buffer = Buffer> {
31
32
  declare function useProgramAccounts(programId: MaybeRefOrGetter<PublicKeyInput>, options?: UseProgramAccountsOptions): {
32
33
  accounts: vue.ShallowRef<ProgramAccount<Buffer<ArrayBufferLike>>[], ProgramAccount<Buffer<ArrayBufferLike>>[]>;
33
34
  loading: vue.ShallowRef<boolean, boolean>;
34
- error: vue.ShallowRef<unknown, unknown>;
35
+ error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
35
36
  refresh: () => Promise<ProgramAccount<Buffer<ArrayBufferLike>>[]>;
36
37
  };
37
38
 
@@ -1,6 +1,7 @@
1
1
  import * as vue from 'vue';
2
2
  import { MaybeRefOrGetter } from 'vue';
3
3
  import { PublicKeyInput } from '@vue-solana/core/address';
4
+ import { SolanaError } from '@vue-solana/core/errors';
4
5
  import { PublicKey, AccountInfo, Commitment } from '@solana/web3-compat';
5
6
 
6
7
  type ProgramAccountMemcmpEncoding = "base58" | "base64" | "base64+zstd" | "bytes";
@@ -31,7 +32,7 @@ interface ProgramAccount<TData extends Buffer = Buffer> {
31
32
  declare function useProgramAccounts(programId: MaybeRefOrGetter<PublicKeyInput>, options?: UseProgramAccountsOptions): {
32
33
  accounts: vue.ShallowRef<ProgramAccount<Buffer<ArrayBufferLike>>[], ProgramAccount<Buffer<ArrayBufferLike>>[]>;
33
34
  loading: vue.ShallowRef<boolean, boolean>;
34
- error: vue.ShallowRef<unknown, unknown>;
35
+ error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
35
36
  refresh: () => Promise<ProgramAccount<Buffer<ArrayBufferLike>>[]>;
36
37
  };
37
38
 
@@ -1,6 +1,7 @@
1
1
  import * as vue from 'vue';
2
2
  import { MaybeRefOrGetter } from 'vue';
3
3
  import { PublicKeyInput } from '@vue-solana/core/address';
4
+ import { SolanaError } from '@vue-solana/core/errors';
4
5
  import { PublicKey, AccountInfo, Commitment } from '@solana/web3-compat';
5
6
 
6
7
  type ProgramAccountMemcmpEncoding = "base58" | "base64" | "base64+zstd" | "bytes";
@@ -31,7 +32,7 @@ interface ProgramAccount<TData extends Buffer = Buffer> {
31
32
  declare function useProgramAccounts(programId: MaybeRefOrGetter<PublicKeyInput>, options?: UseProgramAccountsOptions): {
32
33
  accounts: vue.ShallowRef<ProgramAccount<Buffer<ArrayBufferLike>>[], ProgramAccount<Buffer<ArrayBufferLike>>[]>;
33
34
  loading: vue.ShallowRef<boolean, boolean>;
34
- error: vue.ShallowRef<unknown, unknown>;
35
+ error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
35
36
  refresh: () => Promise<ProgramAccount<Buffer<ArrayBufferLike>>[]>;
36
37
  };
37
38
 
@@ -1,5 +1,6 @@
1
- export { u as useProgramAccounts } from './shared/vue.CUTLu1Gf.mjs';
1
+ export { u as useProgramAccounts } from './shared/vue.CzTu_DPr.mjs';
2
2
  import '@vue-solana/core/address';
3
+ import '@vue-solana/core/errors';
3
4
  import 'vue';
4
5
  import './shared/vue.DlEAL2G8.mjs';
5
6
  import './shared/vue.BqDzSepb.mjs';
package/dist/useRpc.d.cts CHANGED
@@ -1,13 +1,14 @@
1
+ import * as _vue_solana_core_errors from '@vue-solana/core/errors';
1
2
  import * as vue from 'vue';
2
3
  import * as _vue_solana_core_types from '@vue-solana/core/types';
3
- import { S as SolanaConnectionStatus } from './shared/vue.DGhodYJh.cjs';
4
+ import { S as SolanaConnectionStatus } from './shared/vue.DL3z5PxP.cjs';
4
5
 
5
6
  declare function useRpc(): {
6
7
  cluster: vue.ComputedRef<_vue_solana_core_types.SolanaCluster>;
7
8
  endpoint: vue.ComputedRef<string>;
8
9
  wsEndpoint: vue.ComputedRef<string>;
9
10
  status: vue.Ref<SolanaConnectionStatus, SolanaConnectionStatus>;
10
- error: vue.Ref<string | null, string | null>;
11
+ error: vue.Ref<_vue_solana_core_errors.SolanaError | null, _vue_solana_core_errors.SolanaError | null>;
11
12
  latestBlockhash: vue.Ref<string | null, string | null>;
12
13
  checkConnection: () => Promise<void>;
13
14
  connection: Connection;
package/dist/useRpc.d.mts CHANGED
@@ -1,13 +1,14 @@
1
+ import * as _vue_solana_core_errors from '@vue-solana/core/errors';
1
2
  import * as vue from 'vue';
2
3
  import * as _vue_solana_core_types from '@vue-solana/core/types';
3
- import { S as SolanaConnectionStatus } from './shared/vue.DGhodYJh.mjs';
4
+ import { S as SolanaConnectionStatus } from './shared/vue.DL3z5PxP.mjs';
4
5
 
5
6
  declare function useRpc(): {
6
7
  cluster: vue.ComputedRef<_vue_solana_core_types.SolanaCluster>;
7
8
  endpoint: vue.ComputedRef<string>;
8
9
  wsEndpoint: vue.ComputedRef<string>;
9
10
  status: vue.Ref<SolanaConnectionStatus, SolanaConnectionStatus>;
10
- error: vue.Ref<string | null, string | null>;
11
+ error: vue.Ref<_vue_solana_core_errors.SolanaError | null, _vue_solana_core_errors.SolanaError | null>;
11
12
  latestBlockhash: vue.Ref<string | null, string | null>;
12
13
  checkConnection: () => Promise<void>;
13
14
  connection: Connection;
package/dist/useRpc.d.ts CHANGED
@@ -1,13 +1,14 @@
1
+ import * as _vue_solana_core_errors from '@vue-solana/core/errors';
1
2
  import * as vue from 'vue';
2
3
  import * as _vue_solana_core_types from '@vue-solana/core/types';
3
- import { S as SolanaConnectionStatus } from './shared/vue.DGhodYJh.js';
4
+ import { S as SolanaConnectionStatus } from './shared/vue.DL3z5PxP.js';
4
5
 
5
6
  declare function useRpc(): {
6
7
  cluster: vue.ComputedRef<_vue_solana_core_types.SolanaCluster>;
7
8
  endpoint: vue.ComputedRef<string>;
8
9
  wsEndpoint: vue.ComputedRef<string>;
9
10
  status: vue.Ref<SolanaConnectionStatus, SolanaConnectionStatus>;
10
- error: vue.Ref<string | null, string | null>;
11
+ error: vue.Ref<_vue_solana_core_errors.SolanaError | null, _vue_solana_core_errors.SolanaError | null>;
11
12
  latestBlockhash: vue.Ref<string | null, string | null>;
12
13
  checkConnection: () => Promise<void>;
13
14
  connection: Connection;
@@ -1,13 +1,16 @@
1
1
  'use strict';
2
2
 
3
- const useSignAndSendTransaction = require('./shared/vue.DEQJ23UM.cjs');
3
+ const useSignAndSendTransaction = require('./shared/vue.BnSjOzvb.cjs');
4
+ require('@vue-solana/core/errors');
5
+ require('@vue-solana/core/timeout');
4
6
  require('@vue-solana/core/transaction');
7
+ require('@vue-solana/core/wallet');
5
8
  require('vue');
6
9
  require('./shared/vue.CwhEmATP.cjs');
7
10
  require('./shared/vue.COyyrsQU.cjs');
8
11
  require('./shared/vue.C4tLiG3R.cjs');
9
- require('./shared/vue.CwPjPFN6.cjs');
10
- require('./shared/vue.DHVYJk8P.cjs');
12
+ require('./shared/vue.DfeKj9vL.cjs');
13
+ require('./shared/vue.BeA8WQ2g.cjs');
11
14
 
12
15
 
13
16
 
@@ -1,4 +1,5 @@
1
1
  import * as vue from 'vue';
2
+ import { SolanaError } from '@vue-solana/core/errors';
2
3
  import { SendTransactionOptions, ConfirmTransactionOptions, TransactionConfirmation, SolanaTransaction } from '@vue-solana/core/types';
3
4
  import { TransactionSignature } from '@solana/web3-compat';
4
5
 
@@ -20,7 +21,7 @@ declare function useSignAndSendTransaction(): {
20
21
  } | null>;
21
22
  status: vue.Ref<SignAndSendTransactionStatus, SignAndSendTransactionStatus>;
22
23
  loading: vue.Ref<boolean, boolean>;
23
- error: vue.Ref<unknown, unknown>;
24
+ error: vue.Ref<SolanaError | null, SolanaError | null>;
24
25
  execute: (transaction: SolanaTransaction, options?: SignAndSendTransactionOptions) => Promise<TransactionSignature>;
25
26
  };
26
27
 
@@ -1,4 +1,5 @@
1
1
  import * as vue from 'vue';
2
+ import { SolanaError } from '@vue-solana/core/errors';
2
3
  import { SendTransactionOptions, ConfirmTransactionOptions, TransactionConfirmation, SolanaTransaction } from '@vue-solana/core/types';
3
4
  import { TransactionSignature } from '@solana/web3-compat';
4
5
 
@@ -20,7 +21,7 @@ declare function useSignAndSendTransaction(): {
20
21
  } | null>;
21
22
  status: vue.Ref<SignAndSendTransactionStatus, SignAndSendTransactionStatus>;
22
23
  loading: vue.Ref<boolean, boolean>;
23
- error: vue.Ref<unknown, unknown>;
24
+ error: vue.Ref<SolanaError | null, SolanaError | null>;
24
25
  execute: (transaction: SolanaTransaction, options?: SignAndSendTransactionOptions) => Promise<TransactionSignature>;
25
26
  };
26
27
 
@@ -1,4 +1,5 @@
1
1
  import * as vue from 'vue';
2
+ import { SolanaError } from '@vue-solana/core/errors';
2
3
  import { SendTransactionOptions, ConfirmTransactionOptions, TransactionConfirmation, SolanaTransaction } from '@vue-solana/core/types';
3
4
  import { TransactionSignature } from '@solana/web3-compat';
4
5
 
@@ -20,7 +21,7 @@ declare function useSignAndSendTransaction(): {
20
21
  } | null>;
21
22
  status: vue.Ref<SignAndSendTransactionStatus, SignAndSendTransactionStatus>;
22
23
  loading: vue.Ref<boolean, boolean>;
23
- error: vue.Ref<unknown, unknown>;
24
+ error: vue.Ref<SolanaError | null, SolanaError | null>;
24
25
  execute: (transaction: SolanaTransaction, options?: SignAndSendTransactionOptions) => Promise<TransactionSignature>;
25
26
  };
26
27
 
@@ -1,8 +1,11 @@
1
- export { u as useSignAndSendTransaction } from './shared/vue.RQ9fETnm.mjs';
1
+ export { u as useSignAndSendTransaction } from './shared/vue.BlfFUgC-.mjs';
2
+ import '@vue-solana/core/errors';
3
+ import '@vue-solana/core/timeout';
2
4
  import '@vue-solana/core/transaction';
5
+ import '@vue-solana/core/wallet';
3
6
  import 'vue';
4
7
  import './shared/vue.DlEAL2G8.mjs';
5
8
  import './shared/vue.BqDzSepb.mjs';
6
9
  import './shared/vue.1M_c5FWA.mjs';
7
- import './shared/vue.DYf_CRDv.mjs';
8
- import './shared/vue.jOsz34kz.mjs';
10
+ import './shared/vue.5sF8eKgx.mjs';
11
+ import './shared/vue.CxMrojxC.mjs';
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ const useSignMessage = require('./shared/vue.DuI_Jm5P.cjs');
4
+ require('@vue-solana/core/errors');
5
+ require('@vue-solana/core/wallet');
6
+ require('vue');
7
+ require('./shared/vue.DfeKj9vL.cjs');
8
+ require('./shared/vue.C4tLiG3R.cjs');
9
+
10
+
11
+
12
+ exports.useSignMessage = useSignMessage.useSignMessage;