@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.
- package/README.md +9 -8
- package/dist/buffer-polyfill.d.cts +0 -1
- package/dist/buffer-polyfill.d.mts +0 -1
- package/dist/buffer-polyfill.d.ts +0 -1
- package/dist/index.cjs +19 -17
- package/dist/index.d.cts +4 -8
- package/dist/index.d.mts +4 -8
- package/dist/index.d.ts +4 -8
- package/dist/index.mjs +20 -18
- package/dist/kit.d.cts +1 -1
- package/dist/kit.d.mts +1 -1
- package/dist/kit.d.ts +1 -1
- package/dist/shared/{vue.BtUKvuQw.mjs → vue.3VLZmw05.mjs} +2 -2
- package/dist/shared/{vue.QHAHFnw8.mjs → vue.B2sFJ1xI.mjs} +3 -3
- package/dist/shared/{vue.BEesxsrA.cjs → vue.BAlo-tIh.cjs} +3 -3
- package/dist/shared/vue.BMencBpI.cjs +82 -0
- package/dist/shared/{vue.BbX3ePDY.cjs → vue.B_LRH8SM.cjs} +9 -10
- package/dist/shared/{vue.By1CUlOU.mjs → vue.BaFrF2PF.mjs} +1 -1
- package/dist/shared/{vue.BE4KHksm.cjs → vue.BaR1VPhl.cjs} +0 -1
- package/dist/shared/{vue.CPjEwHSg.mjs → vue.BbMPRDeO.mjs} +20 -8
- package/dist/shared/vue.Bfu1dCKe.mjs +10 -0
- package/dist/shared/{vue.ByUemLSf.cjs → vue.C32ozdA1.cjs} +3 -3
- package/dist/shared/{vue.B14U1xmP.cjs → vue.C7yR7Cs0.cjs} +20 -8
- package/dist/shared/{vue.BsD6AAmO.cjs → vue.CEn2purG.cjs} +8 -8
- package/dist/shared/{vue.C0uCLjJ6.cjs → vue.CP1DPDX9.cjs} +1 -1
- package/dist/shared/{vue.DzKfcfpX.cjs → vue.CSJSK0Nq.cjs} +6 -6
- package/dist/shared/{vue.j1vB3h1n.cjs → vue.CXHYdyKZ.cjs} +9 -9
- package/dist/shared/{vue.CSzg70vB.mjs → vue.CZO8TwJP.mjs} +1 -1
- package/dist/shared/vue.CZwftA0L.cjs +9 -0
- package/dist/shared/vue.ChujsB0B.mjs +7 -0
- package/dist/shared/{vue.CYKT65tB.mjs → vue.CnUlZSe8.mjs} +0 -1
- package/dist/shared/{vue.DFbay4mm.mjs → vue.D7xFeC2m.mjs} +1 -1
- package/dist/shared/{vue.B12Pt1PQ.mjs → vue.DL-yMCNc.mjs} +18 -74
- package/dist/shared/vue.DNxOpDXz.cjs +12 -0
- package/dist/shared/{vue.D0ycWj82.mjs → vue.DP7qY8Rk.mjs} +9 -9
- package/dist/shared/{vue.G9t8pE0J.cjs → vue.DgCmU1RR.cjs} +1 -1
- package/dist/shared/{vue.B2AQR2bE.mjs → vue.PJjEncbP.mjs} +3 -3
- package/dist/shared/{vue.CM_uqVc0.mjs → vue.WugzPOca.mjs} +6 -6
- package/dist/shared/{vue.Bhdhmz8d.cjs → vue.XQFqlMId.cjs} +18 -74
- package/dist/shared/{vue.LNhX07HB.cjs → vue.__r7YYZE.cjs} +2 -2
- package/dist/shared/vue.dPRo2X5y.mjs +80 -0
- package/dist/shared/{vue.COPnX5fq.cjs → vue.k9Q6aN-0.cjs} +1 -1
- package/dist/shared/{vue.DDxhSi72.mjs → vue.stUBDBI9.mjs} +9 -9
- package/dist/shared/{vue.CKTUFwSI.mjs → vue.yQcL1yMv.mjs} +9 -10
- package/dist/useAccountInfo.cjs +6 -5
- package/dist/useAccountInfo.d.cts +12 -8
- package/dist/useAccountInfo.d.mts +12 -8
- package/dist/useAccountInfo.d.ts +12 -8
- package/dist/useAccountInfo.mjs +6 -5
- package/dist/useBalance.cjs +4 -4
- package/dist/useBalance.d.cts +4 -2
- package/dist/useBalance.d.mts +4 -2
- package/dist/useBalance.d.ts +4 -2
- package/dist/useBalance.mjs +4 -4
- package/dist/useConnection.cjs +3 -3
- package/dist/useConnection.d.cts +9 -2
- package/dist/useConnection.d.mts +9 -2
- package/dist/useConnection.d.ts +9 -2
- package/dist/useConnection.mjs +3 -3
- package/dist/useProgramAccounts.cjs +6 -5
- package/dist/useProgramAccounts.d.cts +24 -9
- package/dist/useProgramAccounts.d.mts +24 -9
- package/dist/useProgramAccounts.d.ts +24 -9
- package/dist/useProgramAccounts.mjs +6 -5
- package/dist/useRpc.cjs +2 -2
- package/dist/useRpc.d.cts +5 -2
- package/dist/useRpc.d.mts +5 -2
- package/dist/useRpc.d.ts +5 -2
- package/dist/useRpc.mjs +2 -2
- package/dist/useSignAndSendTransaction.cjs +6 -6
- package/dist/useSignAndSendTransaction.d.cts +18 -24
- package/dist/useSignAndSendTransaction.d.mts +18 -24
- package/dist/useSignAndSendTransaction.d.ts +18 -24
- package/dist/useSignAndSendTransaction.mjs +6 -6
- package/dist/useSignMessage.cjs +3 -3
- package/dist/useSignMessage.mjs +3 -3
- package/dist/useSignatureStatus.cjs +4 -4
- package/dist/useSignatureStatus.d.cts +9 -5
- package/dist/useSignatureStatus.d.mts +9 -5
- package/dist/useSignatureStatus.d.ts +9 -5
- package/dist/useSignatureStatus.mjs +4 -4
- package/dist/useSolana.cjs +1 -1
- package/dist/useSolana.mjs +1 -1
- package/dist/useSolanaClient.cjs +2 -2
- package/dist/useSolanaClient.mjs +2 -2
- package/dist/useTokenAccounts.cjs +6 -6
- package/dist/useTokenAccounts.d.cts +6 -6
- package/dist/useTokenAccounts.d.mts +6 -6
- package/dist/useTokenAccounts.d.ts +6 -6
- package/dist/useTokenAccounts.mjs +6 -6
- package/dist/useTokenBalance.cjs +6 -6
- package/dist/useTokenBalance.d.cts +2 -2
- package/dist/useTokenBalance.d.mts +2 -2
- package/dist/useTokenBalance.d.ts +2 -2
- package/dist/useTokenBalance.mjs +6 -6
- package/dist/useTransaction.d.cts +1 -2
- package/dist/useTransaction.d.mts +1 -2
- package/dist/useTransaction.d.ts +1 -2
- package/dist/useTransactionConfirmation.cjs +4 -4
- package/dist/useTransactionConfirmation.d.cts +18 -24
- package/dist/useTransactionConfirmation.d.mts +18 -24
- package/dist/useTransactionConfirmation.d.ts +18 -24
- package/dist/useTransactionConfirmation.mjs +4 -4
- package/dist/useWallet.cjs +2 -2
- package/dist/useWallet.d.cts +2 -2
- package/dist/useWallet.d.mts +2 -2
- package/dist/useWallet.d.ts +2 -2
- package/dist/useWallet.mjs +2 -2
- package/dist/useWallets.cjs +2 -2
- package/dist/useWallets.mjs +2 -2
- package/package.json +2 -8
- package/dist/shared/vue.CfrVAzEf.mjs +0 -129
- package/dist/shared/vue.DCgByzxg.cjs +0 -9
- package/dist/shared/vue.DiNn3XHm.mjs +0 -7
- package/dist/shared/vue._CAClzAz.cjs +0 -131
- package/dist/web3.cjs +0 -13
- package/dist/web3.d.cts +0 -1
- package/dist/web3.d.mts +0 -1
- package/dist/web3.d.ts +0 -1
- package/dist/web3.mjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { u as useTokenAccounts } from './shared/vue.
|
|
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.
|
|
7
|
-
import './shared/vue.
|
|
8
|
-
import './shared/vue.
|
|
6
|
+
import './shared/vue.ChujsB0B.mjs';
|
|
7
|
+
import './shared/vue.BaFrF2PF.mjs';
|
|
8
|
+
import './shared/vue.CnUlZSe8.mjs';
|
package/dist/useTokenBalance.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const useTokenBalance = require('./shared/vue.
|
|
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.
|
|
9
|
-
require('./shared/vue.
|
|
10
|
-
require('./shared/vue.
|
|
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 {
|
|
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<
|
|
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 {
|
|
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<
|
|
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 {
|
|
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<
|
|
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>;
|
package/dist/useTokenBalance.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { u as useTokenBalance } from './shared/vue.
|
|
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.
|
|
7
|
-
import './shared/vue.
|
|
8
|
-
import './shared/vue.
|
|
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<
|
|
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<
|
|
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>;
|
package/dist/useTransaction.d.ts
CHANGED
|
@@ -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<
|
|
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.
|
|
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.
|
|
8
|
-
require('./shared/vue.
|
|
9
|
-
require('./shared/vue.
|
|
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
|
|
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<
|
|
10
|
+
signature: vue.Ref<Signature | null, Signature | null>;
|
|
11
11
|
confirmation: vue.Ref<{
|
|
12
|
-
signature:
|
|
13
|
-
commitment:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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:
|
|
25
|
-
commitment:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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:
|
|
33
|
+
confirm: (nextSignature: Signature, options?: ConfirmTransactionOptions) => Promise<TransactionConfirmation>;
|
|
40
34
|
reset: () => void;
|
|
41
35
|
};
|
|
42
36
|
|
|
@@ -1,42 +1,36 @@
|
|
|
1
|
-
import * as
|
|
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<
|
|
10
|
+
signature: vue.Ref<Signature | null, Signature | null>;
|
|
11
11
|
confirmation: vue.Ref<{
|
|
12
|
-
signature:
|
|
13
|
-
commitment:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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:
|
|
25
|
-
commitment:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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:
|
|
33
|
+
confirm: (nextSignature: Signature, options?: ConfirmTransactionOptions) => Promise<TransactionConfirmation>;
|
|
40
34
|
reset: () => void;
|
|
41
35
|
};
|
|
42
36
|
|
|
@@ -1,42 +1,36 @@
|
|
|
1
|
-
import * as
|
|
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<
|
|
10
|
+
signature: vue.Ref<Signature | null, Signature | null>;
|
|
11
11
|
confirmation: vue.Ref<{
|
|
12
|
-
signature:
|
|
13
|
-
commitment:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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:
|
|
25
|
-
commitment:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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:
|
|
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.
|
|
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.
|
|
6
|
-
import './shared/vue.
|
|
7
|
-
import './shared/vue.
|
|
5
|
+
import './shared/vue.ChujsB0B.mjs';
|
|
6
|
+
import './shared/vue.BaFrF2PF.mjs';
|
|
7
|
+
import './shared/vue.CnUlZSe8.mjs';
|
package/dist/useWallet.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const useWallet = require('./shared/vue.
|
|
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.
|
|
7
|
+
require('./shared/vue.BaR1VPhl.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
package/dist/useWallet.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
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<
|
|
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>;
|
package/dist/useWallet.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
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<
|
|
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>;
|
package/dist/useWallet.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
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<
|
|
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>;
|
package/dist/useWallet.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { u as useWallet } from './shared/vue.
|
|
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.
|
|
5
|
+
import './shared/vue.CnUlZSe8.mjs';
|
package/dist/useWallets.cjs
CHANGED
package/dist/useWallets.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { u as useWallets } from './shared/vue.
|
|
2
|
-
import './shared/vue.
|
|
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": "
|
|
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": "
|
|
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 };
|