@vue-solana/vue 1.2.0 → 2.0.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 (120) hide show
  1. package/README.md +9 -8
  2. package/dist/buffer-polyfill.d.cts +0 -1
  3. package/dist/buffer-polyfill.d.mts +0 -1
  4. package/dist/buffer-polyfill.d.ts +0 -1
  5. package/dist/index.cjs +19 -17
  6. package/dist/index.d.cts +4 -8
  7. package/dist/index.d.mts +4 -8
  8. package/dist/index.d.ts +4 -8
  9. package/dist/index.mjs +20 -18
  10. package/dist/kit.d.cts +1 -1
  11. package/dist/kit.d.mts +1 -1
  12. package/dist/kit.d.ts +1 -1
  13. package/dist/shared/{vue.BtUKvuQw.mjs → vue.3VLZmw05.mjs} +2 -2
  14. package/dist/shared/{vue.QHAHFnw8.mjs → vue.B2sFJ1xI.mjs} +3 -3
  15. package/dist/shared/{vue.BEesxsrA.cjs → vue.BAlo-tIh.cjs} +3 -3
  16. package/dist/shared/vue.BMencBpI.cjs +82 -0
  17. package/dist/shared/{vue.BbX3ePDY.cjs → vue.B_LRH8SM.cjs} +9 -10
  18. package/dist/shared/{vue.By1CUlOU.mjs → vue.BaFrF2PF.mjs} +1 -1
  19. package/dist/shared/{vue.BE4KHksm.cjs → vue.BaR1VPhl.cjs} +0 -1
  20. package/dist/shared/{vue.CPjEwHSg.mjs → vue.BbMPRDeO.mjs} +20 -8
  21. package/dist/shared/vue.Bfu1dCKe.mjs +10 -0
  22. package/dist/shared/{vue.ByUemLSf.cjs → vue.C32ozdA1.cjs} +3 -3
  23. package/dist/shared/{vue.B14U1xmP.cjs → vue.C7yR7Cs0.cjs} +20 -8
  24. package/dist/shared/{vue.BsD6AAmO.cjs → vue.CEn2purG.cjs} +8 -8
  25. package/dist/shared/{vue.C0uCLjJ6.cjs → vue.CP1DPDX9.cjs} +1 -1
  26. package/dist/shared/{vue.DzKfcfpX.cjs → vue.CSJSK0Nq.cjs} +6 -6
  27. package/dist/shared/{vue.j1vB3h1n.cjs → vue.CXHYdyKZ.cjs} +9 -9
  28. package/dist/shared/{vue.CSzg70vB.mjs → vue.CZO8TwJP.mjs} +1 -1
  29. package/dist/shared/vue.CZwftA0L.cjs +9 -0
  30. package/dist/shared/vue.ChujsB0B.mjs +7 -0
  31. package/dist/shared/{vue.CYKT65tB.mjs → vue.CnUlZSe8.mjs} +0 -1
  32. package/dist/shared/{vue.DFbay4mm.mjs → vue.D7xFeC2m.mjs} +1 -1
  33. package/dist/shared/{vue.B12Pt1PQ.mjs → vue.DL-yMCNc.mjs} +18 -74
  34. package/dist/shared/vue.DNxOpDXz.cjs +12 -0
  35. package/dist/shared/{vue.D0ycWj82.mjs → vue.DP7qY8Rk.mjs} +9 -9
  36. package/dist/shared/{vue.G9t8pE0J.cjs → vue.DgCmU1RR.cjs} +1 -1
  37. package/dist/shared/{vue.B2AQR2bE.mjs → vue.PJjEncbP.mjs} +3 -3
  38. package/dist/shared/{vue.CM_uqVc0.mjs → vue.WugzPOca.mjs} +6 -6
  39. package/dist/shared/{vue.Bhdhmz8d.cjs → vue.XQFqlMId.cjs} +18 -74
  40. package/dist/shared/{vue.LNhX07HB.cjs → vue.__r7YYZE.cjs} +2 -2
  41. package/dist/shared/vue.dPRo2X5y.mjs +80 -0
  42. package/dist/shared/{vue.COPnX5fq.cjs → vue.k9Q6aN-0.cjs} +1 -1
  43. package/dist/shared/{vue.DDxhSi72.mjs → vue.stUBDBI9.mjs} +9 -9
  44. package/dist/shared/{vue.CKTUFwSI.mjs → vue.yQcL1yMv.mjs} +9 -10
  45. package/dist/useAccountInfo.cjs +6 -5
  46. package/dist/useAccountInfo.d.cts +12 -8
  47. package/dist/useAccountInfo.d.mts +12 -8
  48. package/dist/useAccountInfo.d.ts +12 -8
  49. package/dist/useAccountInfo.mjs +6 -5
  50. package/dist/useBalance.cjs +4 -4
  51. package/dist/useBalance.d.cts +4 -2
  52. package/dist/useBalance.d.mts +4 -2
  53. package/dist/useBalance.d.ts +4 -2
  54. package/dist/useBalance.mjs +4 -4
  55. package/dist/useConnection.cjs +3 -3
  56. package/dist/useConnection.d.cts +9 -2
  57. package/dist/useConnection.d.mts +9 -2
  58. package/dist/useConnection.d.ts +9 -2
  59. package/dist/useConnection.mjs +3 -3
  60. package/dist/useProgramAccounts.cjs +6 -5
  61. package/dist/useProgramAccounts.d.cts +24 -9
  62. package/dist/useProgramAccounts.d.mts +24 -9
  63. package/dist/useProgramAccounts.d.ts +24 -9
  64. package/dist/useProgramAccounts.mjs +6 -5
  65. package/dist/useRpc.cjs +2 -2
  66. package/dist/useRpc.d.cts +5 -2
  67. package/dist/useRpc.d.mts +5 -2
  68. package/dist/useRpc.d.ts +5 -2
  69. package/dist/useRpc.mjs +2 -2
  70. package/dist/useSignAndSendTransaction.cjs +6 -6
  71. package/dist/useSignAndSendTransaction.d.cts +18 -24
  72. package/dist/useSignAndSendTransaction.d.mts +18 -24
  73. package/dist/useSignAndSendTransaction.d.ts +18 -24
  74. package/dist/useSignAndSendTransaction.mjs +6 -6
  75. package/dist/useSignMessage.cjs +3 -3
  76. package/dist/useSignMessage.mjs +3 -3
  77. package/dist/useSignatureStatus.cjs +4 -4
  78. package/dist/useSignatureStatus.d.cts +9 -5
  79. package/dist/useSignatureStatus.d.mts +9 -5
  80. package/dist/useSignatureStatus.d.ts +9 -5
  81. package/dist/useSignatureStatus.mjs +4 -4
  82. package/dist/useSolana.cjs +1 -1
  83. package/dist/useSolana.mjs +1 -1
  84. package/dist/useSolanaClient.cjs +2 -2
  85. package/dist/useSolanaClient.mjs +2 -2
  86. package/dist/useTokenAccounts.cjs +6 -6
  87. package/dist/useTokenAccounts.d.cts +6 -6
  88. package/dist/useTokenAccounts.d.mts +6 -6
  89. package/dist/useTokenAccounts.d.ts +6 -6
  90. package/dist/useTokenAccounts.mjs +6 -6
  91. package/dist/useTokenBalance.cjs +6 -6
  92. package/dist/useTokenBalance.d.cts +2 -2
  93. package/dist/useTokenBalance.d.mts +2 -2
  94. package/dist/useTokenBalance.d.ts +2 -2
  95. package/dist/useTokenBalance.mjs +6 -6
  96. package/dist/useTransaction.d.cts +1 -2
  97. package/dist/useTransaction.d.mts +1 -2
  98. package/dist/useTransaction.d.ts +1 -2
  99. package/dist/useTransactionConfirmation.cjs +4 -4
  100. package/dist/useTransactionConfirmation.d.cts +18 -24
  101. package/dist/useTransactionConfirmation.d.mts +18 -24
  102. package/dist/useTransactionConfirmation.d.ts +18 -24
  103. package/dist/useTransactionConfirmation.mjs +4 -4
  104. package/dist/useWallet.cjs +2 -2
  105. package/dist/useWallet.d.cts +2 -2
  106. package/dist/useWallet.d.mts +2 -2
  107. package/dist/useWallet.d.ts +2 -2
  108. package/dist/useWallet.mjs +2 -2
  109. package/dist/useWallets.cjs +2 -2
  110. package/dist/useWallets.mjs +2 -2
  111. package/package.json +2 -8
  112. package/dist/shared/vue.CfrVAzEf.mjs +0 -129
  113. package/dist/shared/vue.DCgByzxg.cjs +0 -9
  114. package/dist/shared/vue.DiNn3XHm.mjs +0 -7
  115. package/dist/shared/vue._CAClzAz.cjs +0 -131
  116. package/dist/web3.cjs +0 -13
  117. package/dist/web3.d.cts +0 -1
  118. package/dist/web3.d.mts +0 -1
  119. package/dist/web3.d.ts +0 -1
  120. package/dist/web3.mjs +0 -1
@@ -1,8 +1,8 @@
1
- export { u as useTokenAccounts } from './shared/vue.CKTUFwSI.mjs';
2
- import '@vue-solana/core/address';
3
- import '@vue-solana/core/errors';
1
+ export { u as useTokenAccounts } from './shared/vue.yQcL1yMv.mjs';
4
2
  import '@vue-solana/core/token-accounts';
3
+ import '@vue-solana/core/errors';
4
+ import '@vue-solana/core/address';
5
5
  import 'vue';
6
- import './shared/vue.DiNn3XHm.mjs';
7
- import './shared/vue.BtUKvuQw.mjs';
8
- import './shared/vue.CYKT65tB.mjs';
6
+ import './shared/vue.ChujsB0B.mjs';
7
+ import './shared/vue.BaFrF2PF.mjs';
8
+ import './shared/vue.CnUlZSe8.mjs';
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- const useTokenBalance = require('./shared/vue.j1vB3h1n.cjs');
4
- require('@vue-solana/core/address');
5
- require('@vue-solana/core/errors');
3
+ const useTokenBalance = require('./shared/vue.CXHYdyKZ.cjs');
6
4
  require('@vue-solana/core/token-accounts');
5
+ require('@vue-solana/core/errors');
6
+ require('@vue-solana/core/address');
7
7
  require('vue');
8
- require('./shared/vue.DCgByzxg.cjs');
9
- require('./shared/vue.LNhX07HB.cjs');
10
- require('./shared/vue.BE4KHksm.cjs');
8
+ require('./shared/vue.CZwftA0L.cjs');
9
+ require('./shared/vue.k9Q6aN-0.cjs');
10
+ require('./shared/vue.BaR1VPhl.cjs');
11
11
 
12
12
 
13
13
 
@@ -1,10 +1,10 @@
1
1
  import * as _vue_solana_core_token_accounts from '@vue-solana/core/token-accounts';
2
2
  import * as vue from 'vue';
3
3
  import { MaybeRefOrGetter } from 'vue';
4
- import { PublicKey } from '@vue-solana/core/web3';
4
+ import { Commitment } from '@vue-solana/core/kit';
5
5
  import { SolanaError } from '@vue-solana/core/errors';
6
6
 
7
- declare function useTokenBalance(mint: MaybeRefOrGetter<PublicKey | string | null | undefined>, owner: MaybeRefOrGetter<PublicKey | string | null | undefined>): {
7
+ declare function useTokenBalance(mint: MaybeRefOrGetter<string | null | undefined>, owner: MaybeRefOrGetter<string | null | undefined>, commitment?: Commitment): {
8
8
  balance: vue.ShallowRef<bigint | null, bigint | null>;
9
9
  decimals: vue.ShallowRef<number | null, number | null>;
10
10
  loading: vue.ShallowRef<boolean, boolean>;
@@ -1,10 +1,10 @@
1
1
  import * as _vue_solana_core_token_accounts from '@vue-solana/core/token-accounts';
2
2
  import * as vue from 'vue';
3
3
  import { MaybeRefOrGetter } from 'vue';
4
- import { PublicKey } from '@vue-solana/core/web3';
4
+ import { Commitment } from '@vue-solana/core/kit';
5
5
  import { SolanaError } from '@vue-solana/core/errors';
6
6
 
7
- declare function useTokenBalance(mint: MaybeRefOrGetter<PublicKey | string | null | undefined>, owner: MaybeRefOrGetter<PublicKey | string | null | undefined>): {
7
+ declare function useTokenBalance(mint: MaybeRefOrGetter<string | null | undefined>, owner: MaybeRefOrGetter<string | null | undefined>, commitment?: Commitment): {
8
8
  balance: vue.ShallowRef<bigint | null, bigint | null>;
9
9
  decimals: vue.ShallowRef<number | null, number | null>;
10
10
  loading: vue.ShallowRef<boolean, boolean>;
@@ -1,10 +1,10 @@
1
1
  import * as _vue_solana_core_token_accounts from '@vue-solana/core/token-accounts';
2
2
  import * as vue from 'vue';
3
3
  import { MaybeRefOrGetter } from 'vue';
4
- import { PublicKey } from '@vue-solana/core/web3';
4
+ import { Commitment } from '@vue-solana/core/kit';
5
5
  import { SolanaError } from '@vue-solana/core/errors';
6
6
 
7
- declare function useTokenBalance(mint: MaybeRefOrGetter<PublicKey | string | null | undefined>, owner: MaybeRefOrGetter<PublicKey | string | null | undefined>): {
7
+ declare function useTokenBalance(mint: MaybeRefOrGetter<string | null | undefined>, owner: MaybeRefOrGetter<string | null | undefined>, commitment?: Commitment): {
8
8
  balance: vue.ShallowRef<bigint | null, bigint | null>;
9
9
  decimals: vue.ShallowRef<number | null, number | null>;
10
10
  loading: vue.ShallowRef<boolean, boolean>;
@@ -1,8 +1,8 @@
1
- export { u as useTokenBalance } from './shared/vue.D0ycWj82.mjs';
2
- import '@vue-solana/core/address';
3
- import '@vue-solana/core/errors';
1
+ export { u as useTokenBalance } from './shared/vue.DP7qY8Rk.mjs';
4
2
  import '@vue-solana/core/token-accounts';
3
+ import '@vue-solana/core/errors';
4
+ import '@vue-solana/core/address';
5
5
  import 'vue';
6
- import './shared/vue.DiNn3XHm.mjs';
7
- import './shared/vue.BtUKvuQw.mjs';
8
- import './shared/vue.CYKT65tB.mjs';
6
+ import './shared/vue.ChujsB0B.mjs';
7
+ import './shared/vue.BaFrF2PF.mjs';
8
+ import './shared/vue.CnUlZSe8.mjs';
@@ -1,12 +1,11 @@
1
1
  import * as vue from 'vue';
2
- import { TransactionSignature } from '@vue-solana/core/web3';
3
2
  import { SolanaError } from '@vue-solana/core/errors';
4
3
 
5
4
  interface UseTransactionOptions {
6
5
  timeoutMs?: number;
7
6
  timeoutMessage?: string;
8
7
  }
9
- declare function useTransaction<TArgs extends unknown[]>(handler: (...args: TArgs) => Promise<TransactionSignature>, options?: UseTransactionOptions): {
8
+ declare function useTransaction<TArgs extends unknown[]>(handler: (...args: TArgs) => Promise<string>, options?: UseTransactionOptions): {
10
9
  signature: vue.Ref<string | null, string | null>;
11
10
  loading: vue.Ref<boolean, boolean>;
12
11
  error: vue.Ref<SolanaError | null, SolanaError | null>;
@@ -1,12 +1,11 @@
1
1
  import * as vue from 'vue';
2
- import { TransactionSignature } from '@vue-solana/core/web3';
3
2
  import { SolanaError } from '@vue-solana/core/errors';
4
3
 
5
4
  interface UseTransactionOptions {
6
5
  timeoutMs?: number;
7
6
  timeoutMessage?: string;
8
7
  }
9
- declare function useTransaction<TArgs extends unknown[]>(handler: (...args: TArgs) => Promise<TransactionSignature>, options?: UseTransactionOptions): {
8
+ declare function useTransaction<TArgs extends unknown[]>(handler: (...args: TArgs) => Promise<string>, options?: UseTransactionOptions): {
10
9
  signature: vue.Ref<string | null, string | null>;
11
10
  loading: vue.Ref<boolean, boolean>;
12
11
  error: vue.Ref<SolanaError | null, SolanaError | null>;
@@ -1,12 +1,11 @@
1
1
  import * as vue from 'vue';
2
- import { TransactionSignature } from '@vue-solana/core/web3';
3
2
  import { SolanaError } from '@vue-solana/core/errors';
4
3
 
5
4
  interface UseTransactionOptions {
6
5
  timeoutMs?: number;
7
6
  timeoutMessage?: string;
8
7
  }
9
- declare function useTransaction<TArgs extends unknown[]>(handler: (...args: TArgs) => Promise<TransactionSignature>, options?: UseTransactionOptions): {
8
+ declare function useTransaction<TArgs extends unknown[]>(handler: (...args: TArgs) => Promise<string>, options?: UseTransactionOptions): {
10
9
  signature: vue.Ref<string | null, string | null>;
11
10
  loading: vue.Ref<boolean, boolean>;
12
11
  error: vue.Ref<SolanaError | null, SolanaError | null>;
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- const useTransactionConfirmation = require('./shared/vue.ByUemLSf.cjs');
3
+ const useTransactionConfirmation = require('./shared/vue.C32ozdA1.cjs');
4
4
  require('@vue-solana/core/transaction');
5
5
  require('@vue-solana/core/errors');
6
6
  require('vue');
7
- require('./shared/vue.DCgByzxg.cjs');
8
- require('./shared/vue.LNhX07HB.cjs');
9
- require('./shared/vue.BE4KHksm.cjs');
7
+ require('./shared/vue.CZwftA0L.cjs');
8
+ require('./shared/vue.k9Q6aN-0.cjs');
9
+ require('./shared/vue.BaR1VPhl.cjs');
10
10
 
11
11
 
12
12
 
@@ -1,42 +1,36 @@
1
- import * as _solana_web3_compat from '@solana/web3-compat';
1
+ import * as _solana_kit from '@solana/kit';
2
2
  import * as vue from 'vue';
3
+ import { Signature } from '@vue-solana/core/kit';
3
4
  import { TransactionConfirmation, ConfirmTransactionOptions } from '@vue-solana/core/types';
4
- import { TransactionSignature } from '@vue-solana/core/web3';
5
5
  import { SolanaError } from '@vue-solana/core/errors';
6
6
 
7
7
  type TransactionConfirmationStatus = "idle" | "confirming" | "processed" | "confirmed" | "finalized" | "error";
8
8
  declare function getConfirmedTransactionStatus(confirmation: TransactionConfirmation): Extract<TransactionConfirmationStatus, "processed" | "confirmed" | "finalized">;
9
9
  declare function useTransactionConfirmation(defaultOptions?: ConfirmTransactionOptions): {
10
- signature: vue.Ref<string | null, string | null>;
10
+ signature: vue.Ref<Signature | null, Signature | null>;
11
11
  confirmation: vue.Ref<{
12
- signature: TransactionSignature;
13
- commitment: _solana_web3_compat.Commitment;
14
- result: {
15
- context: {
16
- slot: number;
17
- apiVersion?: string | undefined;
18
- };
19
- value: {
20
- err: unknown | null;
21
- };
12
+ signature: Signature;
13
+ commitment: _solana_kit.Commitment;
14
+ status: {
15
+ slot: _solana_kit.Slot;
16
+ confirmations: bigint | null;
17
+ err: unknown | null;
18
+ confirmationStatus: _solana_kit.Commitment | null;
22
19
  };
23
20
  } | null, TransactionConfirmation | {
24
- signature: TransactionSignature;
25
- commitment: _solana_web3_compat.Commitment;
26
- result: {
27
- context: {
28
- slot: number;
29
- apiVersion?: string | undefined;
30
- };
31
- value: {
32
- err: unknown | null;
33
- };
21
+ signature: Signature;
22
+ commitment: _solana_kit.Commitment;
23
+ status: {
24
+ slot: _solana_kit.Slot;
25
+ confirmations: bigint | null;
26
+ err: unknown | null;
27
+ confirmationStatus: _solana_kit.Commitment | null;
34
28
  };
35
29
  } | null>;
36
30
  status: vue.Ref<TransactionConfirmationStatus, TransactionConfirmationStatus>;
37
31
  loading: vue.Ref<boolean, boolean>;
38
32
  error: vue.Ref<SolanaError | null, SolanaError | null>;
39
- confirm: (nextSignature: TransactionSignature, options?: ConfirmTransactionOptions) => Promise<TransactionConfirmation>;
33
+ confirm: (nextSignature: Signature, options?: ConfirmTransactionOptions) => Promise<TransactionConfirmation>;
40
34
  reset: () => void;
41
35
  };
42
36
 
@@ -1,42 +1,36 @@
1
- import * as _solana_web3_compat from '@solana/web3-compat';
1
+ import * as _solana_kit from '@solana/kit';
2
2
  import * as vue from 'vue';
3
+ import { Signature } from '@vue-solana/core/kit';
3
4
  import { TransactionConfirmation, ConfirmTransactionOptions } from '@vue-solana/core/types';
4
- import { TransactionSignature } from '@vue-solana/core/web3';
5
5
  import { SolanaError } from '@vue-solana/core/errors';
6
6
 
7
7
  type TransactionConfirmationStatus = "idle" | "confirming" | "processed" | "confirmed" | "finalized" | "error";
8
8
  declare function getConfirmedTransactionStatus(confirmation: TransactionConfirmation): Extract<TransactionConfirmationStatus, "processed" | "confirmed" | "finalized">;
9
9
  declare function useTransactionConfirmation(defaultOptions?: ConfirmTransactionOptions): {
10
- signature: vue.Ref<string | null, string | null>;
10
+ signature: vue.Ref<Signature | null, Signature | null>;
11
11
  confirmation: vue.Ref<{
12
- signature: TransactionSignature;
13
- commitment: _solana_web3_compat.Commitment;
14
- result: {
15
- context: {
16
- slot: number;
17
- apiVersion?: string | undefined;
18
- };
19
- value: {
20
- err: unknown | null;
21
- };
12
+ signature: Signature;
13
+ commitment: _solana_kit.Commitment;
14
+ status: {
15
+ slot: _solana_kit.Slot;
16
+ confirmations: bigint | null;
17
+ err: unknown | null;
18
+ confirmationStatus: _solana_kit.Commitment | null;
22
19
  };
23
20
  } | null, TransactionConfirmation | {
24
- signature: TransactionSignature;
25
- commitment: _solana_web3_compat.Commitment;
26
- result: {
27
- context: {
28
- slot: number;
29
- apiVersion?: string | undefined;
30
- };
31
- value: {
32
- err: unknown | null;
33
- };
21
+ signature: Signature;
22
+ commitment: _solana_kit.Commitment;
23
+ status: {
24
+ slot: _solana_kit.Slot;
25
+ confirmations: bigint | null;
26
+ err: unknown | null;
27
+ confirmationStatus: _solana_kit.Commitment | null;
34
28
  };
35
29
  } | null>;
36
30
  status: vue.Ref<TransactionConfirmationStatus, TransactionConfirmationStatus>;
37
31
  loading: vue.Ref<boolean, boolean>;
38
32
  error: vue.Ref<SolanaError | null, SolanaError | null>;
39
- confirm: (nextSignature: TransactionSignature, options?: ConfirmTransactionOptions) => Promise<TransactionConfirmation>;
33
+ confirm: (nextSignature: Signature, options?: ConfirmTransactionOptions) => Promise<TransactionConfirmation>;
40
34
  reset: () => void;
41
35
  };
42
36
 
@@ -1,42 +1,36 @@
1
- import * as _solana_web3_compat from '@solana/web3-compat';
1
+ import * as _solana_kit from '@solana/kit';
2
2
  import * as vue from 'vue';
3
+ import { Signature } from '@vue-solana/core/kit';
3
4
  import { TransactionConfirmation, ConfirmTransactionOptions } from '@vue-solana/core/types';
4
- import { TransactionSignature } from '@vue-solana/core/web3';
5
5
  import { SolanaError } from '@vue-solana/core/errors';
6
6
 
7
7
  type TransactionConfirmationStatus = "idle" | "confirming" | "processed" | "confirmed" | "finalized" | "error";
8
8
  declare function getConfirmedTransactionStatus(confirmation: TransactionConfirmation): Extract<TransactionConfirmationStatus, "processed" | "confirmed" | "finalized">;
9
9
  declare function useTransactionConfirmation(defaultOptions?: ConfirmTransactionOptions): {
10
- signature: vue.Ref<string | null, string | null>;
10
+ signature: vue.Ref<Signature | null, Signature | null>;
11
11
  confirmation: vue.Ref<{
12
- signature: TransactionSignature;
13
- commitment: _solana_web3_compat.Commitment;
14
- result: {
15
- context: {
16
- slot: number;
17
- apiVersion?: string | undefined;
18
- };
19
- value: {
20
- err: unknown | null;
21
- };
12
+ signature: Signature;
13
+ commitment: _solana_kit.Commitment;
14
+ status: {
15
+ slot: _solana_kit.Slot;
16
+ confirmations: bigint | null;
17
+ err: unknown | null;
18
+ confirmationStatus: _solana_kit.Commitment | null;
22
19
  };
23
20
  } | null, TransactionConfirmation | {
24
- signature: TransactionSignature;
25
- commitment: _solana_web3_compat.Commitment;
26
- result: {
27
- context: {
28
- slot: number;
29
- apiVersion?: string | undefined;
30
- };
31
- value: {
32
- err: unknown | null;
33
- };
21
+ signature: Signature;
22
+ commitment: _solana_kit.Commitment;
23
+ status: {
24
+ slot: _solana_kit.Slot;
25
+ confirmations: bigint | null;
26
+ err: unknown | null;
27
+ confirmationStatus: _solana_kit.Commitment | null;
34
28
  };
35
29
  } | null>;
36
30
  status: vue.Ref<TransactionConfirmationStatus, TransactionConfirmationStatus>;
37
31
  loading: vue.Ref<boolean, boolean>;
38
32
  error: vue.Ref<SolanaError | null, SolanaError | null>;
39
- confirm: (nextSignature: TransactionSignature, options?: ConfirmTransactionOptions) => Promise<TransactionConfirmation>;
33
+ confirm: (nextSignature: Signature, options?: ConfirmTransactionOptions) => Promise<TransactionConfirmation>;
40
34
  reset: () => void;
41
35
  };
42
36
 
@@ -1,7 +1,7 @@
1
- export { g as getConfirmedTransactionStatus, u as useTransactionConfirmation } from './shared/vue.QHAHFnw8.mjs';
1
+ export { g as getConfirmedTransactionStatus, u as useTransactionConfirmation } from './shared/vue.B2sFJ1xI.mjs';
2
2
  import '@vue-solana/core/transaction';
3
3
  import '@vue-solana/core/errors';
4
4
  import 'vue';
5
- import './shared/vue.DiNn3XHm.mjs';
6
- import './shared/vue.BtUKvuQw.mjs';
7
- import './shared/vue.CYKT65tB.mjs';
5
+ import './shared/vue.ChujsB0B.mjs';
6
+ import './shared/vue.BaFrF2PF.mjs';
7
+ import './shared/vue.CnUlZSe8.mjs';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- const useWallet = require('./shared/vue.BEesxsrA.cjs');
3
+ const useWallet = require('./shared/vue.BAlo-tIh.cjs');
4
4
  require('@vue-solana/core/errors');
5
5
  require('@vue-solana/core/wallet');
6
6
  require('vue');
7
- require('./shared/vue.BE4KHksm.cjs');
7
+ require('./shared/vue.BaR1VPhl.cjs');
8
8
 
9
9
 
10
10
 
@@ -1,10 +1,10 @@
1
- import * as _solana_web3_compat from '@solana/web3-compat';
1
+ import * as _solana_kit from '@solana/kit';
2
2
  import * as vue from 'vue';
3
3
  import * as _vue_solana_core_types from '@vue-solana/core/types';
4
4
 
5
5
  declare function useWallet(): {
6
6
  wallet: vue.Ref<_vue_solana_core_types.SolanaWallet | null, _vue_solana_core_types.SolanaWallet | null>;
7
- publicKey: vue.ComputedRef<_solana_web3_compat.PublicKey | null>;
7
+ publicKey: vue.ComputedRef<_solana_kit.Address | null>;
8
8
  connected: vue.ComputedRef<boolean>;
9
9
  connecting: vue.ComputedRef<boolean>;
10
10
  disconnecting: vue.ComputedRef<boolean>;
@@ -1,10 +1,10 @@
1
- import * as _solana_web3_compat from '@solana/web3-compat';
1
+ import * as _solana_kit from '@solana/kit';
2
2
  import * as vue from 'vue';
3
3
  import * as _vue_solana_core_types from '@vue-solana/core/types';
4
4
 
5
5
  declare function useWallet(): {
6
6
  wallet: vue.Ref<_vue_solana_core_types.SolanaWallet | null, _vue_solana_core_types.SolanaWallet | null>;
7
- publicKey: vue.ComputedRef<_solana_web3_compat.PublicKey | null>;
7
+ publicKey: vue.ComputedRef<_solana_kit.Address | null>;
8
8
  connected: vue.ComputedRef<boolean>;
9
9
  connecting: vue.ComputedRef<boolean>;
10
10
  disconnecting: vue.ComputedRef<boolean>;
@@ -1,10 +1,10 @@
1
- import * as _solana_web3_compat from '@solana/web3-compat';
1
+ import * as _solana_kit from '@solana/kit';
2
2
  import * as vue from 'vue';
3
3
  import * as _vue_solana_core_types from '@vue-solana/core/types';
4
4
 
5
5
  declare function useWallet(): {
6
6
  wallet: vue.Ref<_vue_solana_core_types.SolanaWallet | null, _vue_solana_core_types.SolanaWallet | null>;
7
- publicKey: vue.ComputedRef<_solana_web3_compat.PublicKey | null>;
7
+ publicKey: vue.ComputedRef<_solana_kit.Address | null>;
8
8
  connected: vue.ComputedRef<boolean>;
9
9
  connecting: vue.ComputedRef<boolean>;
10
10
  disconnecting: vue.ComputedRef<boolean>;
@@ -1,5 +1,5 @@
1
- export { u as useWallet } from './shared/vue.B2AQR2bE.mjs';
1
+ export { u as useWallet } from './shared/vue.PJjEncbP.mjs';
2
2
  import '@vue-solana/core/errors';
3
3
  import '@vue-solana/core/wallet';
4
4
  import 'vue';
5
- import './shared/vue.CYKT65tB.mjs';
5
+ import './shared/vue.CnUlZSe8.mjs';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const useWallets = require('./shared/vue.G9t8pE0J.cjs');
4
- require('./shared/vue.BE4KHksm.cjs');
3
+ const useWallets = require('./shared/vue.DgCmU1RR.cjs');
4
+ require('./shared/vue.BaR1VPhl.cjs');
5
5
  require('vue');
6
6
 
7
7
 
@@ -1,3 +1,3 @@
1
- export { u as useWallets } from './shared/vue.DFbay4mm.mjs';
2
- import './shared/vue.CYKT65tB.mjs';
1
+ export { u as useWallets } from './shared/vue.D7xFeC2m.mjs';
2
+ import './shared/vue.CnUlZSe8.mjs';
3
3
  import 'vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-solana/vue",
3
- "version": "1.2.0",
3
+ "version": "2.0.0",
4
4
  "description": "Vue plugin and composables for Solana applications.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -115,11 +115,6 @@
115
115
  "import": "./dist/useTokenAccounts.mjs",
116
116
  "require": "./dist/useTokenAccounts.cjs"
117
117
  },
118
- "./web3": {
119
- "types": "./dist/web3.d.ts",
120
- "import": "./dist/web3.mjs",
121
- "require": "./dist/web3.cjs"
122
- },
123
118
  "./kit": {
124
119
  "types": "./dist/kit.d.ts",
125
120
  "import": "./dist/kit.mjs",
@@ -133,9 +128,8 @@
133
128
  "access": "public"
134
129
  },
135
130
  "dependencies": {
136
- "@solana/web3-compat": "^0.0.21",
137
131
  "bs58": "^6.0.0",
138
- "@vue-solana/core": "1.2.0"
132
+ "@vue-solana/core": "2.0.0"
139
133
  },
140
134
  "peerDependencies": {
141
135
  "vue": "^3.5.0"
@@ -1,129 +0,0 @@
1
- import { parsePublicKey } from '@vue-solana/core/address';
2
- import { normalizeSolanaError } from '@vue-solana/core/errors';
3
- import { shallowRef, onMounted, onUnmounted, watch, toValue } from 'vue';
4
- import { u as useConnection } from './vue.DiNn3XHm.mjs';
5
- import { t as tryUseSolana } from './vue.CYKT65tB.mjs';
6
-
7
- function useAccountInfo(address, options = {}) {
8
- const solana = tryUseSolana();
9
- const connection = solana?.connection ?? useConnection();
10
- const accountInfo = shallowRef(null);
11
- const loading = shallowRef(false);
12
- const error = shallowRef(null);
13
- let refreshId = 0;
14
- let watchId = 0;
15
- let subscriptionId = null;
16
- let manuallyStopped = false;
17
- async function refresh() {
18
- const requestId = ++refreshId;
19
- const value = toValue(address);
20
- if (!value || !solana) {
21
- accountInfo.value = null;
22
- loading.value = false;
23
- error.value = null;
24
- return null;
25
- }
26
- loading.value = true;
27
- error.value = null;
28
- try {
29
- const publicKey = parsePublicKey(value);
30
- if (!publicKey) {
31
- accountInfo.value = null;
32
- return null;
33
- }
34
- const nextAccountInfo = await connection.getAccountInfo(publicKey, options.commitment);
35
- if (requestId === refreshId) {
36
- accountInfo.value = nextAccountInfo;
37
- }
38
- return nextAccountInfo;
39
- } catch (cause) {
40
- const normalizedError = normalizeSolanaError(cause, "RPC_FAILURE");
41
- if (requestId === refreshId) {
42
- accountInfo.value = null;
43
- error.value = normalizedError;
44
- }
45
- throw normalizedError;
46
- } finally {
47
- if (requestId === refreshId) {
48
- loading.value = false;
49
- }
50
- }
51
- }
52
- async function stopWatching() {
53
- manuallyStopped = true;
54
- watchId += 1;
55
- await stopCurrentWatcher();
56
- }
57
- async function stopCurrentWatcher() {
58
- if (subscriptionId === null) {
59
- return;
60
- }
61
- const currentSubscriptionId = subscriptionId;
62
- subscriptionId = null;
63
- try {
64
- await connection.removeAccountChangeListener(currentSubscriptionId);
65
- } catch (cause) {
66
- error.value = normalizeSolanaError(cause, "RPC_FAILURE");
67
- }
68
- }
69
- async function startWatching() {
70
- const requestId = ++watchId;
71
- await stopCurrentWatcher();
72
- if (requestId !== watchId) {
73
- return;
74
- }
75
- if (manuallyStopped || !options.watch || !solana) {
76
- return;
77
- }
78
- try {
79
- const publicKey = parsePublicKey(toValue(address));
80
- if (!publicKey) {
81
- return;
82
- }
83
- const nextSubscriptionId = connection.onAccountChange(
84
- publicKey,
85
- (nextAccountInfo) => {
86
- if (requestId !== watchId) {
87
- return;
88
- }
89
- accountInfo.value = nextAccountInfo;
90
- error.value = null;
91
- },
92
- options.commitment
93
- );
94
- if (requestId !== watchId) {
95
- await connection.removeAccountChangeListener(nextSubscriptionId);
96
- return;
97
- }
98
- subscriptionId = nextSubscriptionId;
99
- } catch (cause) {
100
- if (requestId === watchId) {
101
- error.value = normalizeSolanaError(cause, "RPC_FAILURE");
102
- }
103
- }
104
- }
105
- onMounted(() => {
106
- void refresh().catch(() => void 0);
107
- void startWatching();
108
- });
109
- onUnmounted(() => {
110
- refreshId += 1;
111
- void stopWatching();
112
- });
113
- watch(
114
- () => toValue(address),
115
- () => {
116
- void refresh().catch(() => void 0);
117
- void startWatching();
118
- }
119
- );
120
- return {
121
- accountInfo,
122
- loading,
123
- error,
124
- refresh,
125
- stopWatching
126
- };
127
- }
128
-
129
- export { useAccountInfo as u };
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- const useRpc = require('./vue.LNhX07HB.cjs');
4
-
5
- function useConnection() {
6
- return useRpc.useRpc().connection;
7
- }
8
-
9
- exports.useConnection = useConnection;
@@ -1,7 +0,0 @@
1
- import { u as useRpc } from './vue.BtUKvuQw.mjs';
2
-
3
- function useConnection() {
4
- return useRpc().connection;
5
- }
6
-
7
- export { useConnection as u };