@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
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
2
|
+
import { shallowRef, onMounted, watch, toValue } from 'vue';
|
|
3
|
+
import { parseAddress } from '@vue-solana/core/address';
|
|
4
|
+
import { u as useConnection } from './vue.ChujsB0B.mjs';
|
|
5
|
+
import { t as tryUseSolana } from './vue.CnUlZSe8.mjs';
|
|
6
|
+
import { d as decodeBase64 } from './vue.Bfu1dCKe.mjs';
|
|
7
|
+
|
|
8
|
+
function useAccountInfo(address, options = {}) {
|
|
9
|
+
const solana = tryUseSolana();
|
|
10
|
+
const client = solana?.client ?? useConnection();
|
|
11
|
+
const accountInfo = shallowRef(null);
|
|
12
|
+
const loading = shallowRef(false);
|
|
13
|
+
const error = shallowRef(null);
|
|
14
|
+
let refreshId = 0;
|
|
15
|
+
async function refresh() {
|
|
16
|
+
const requestId = ++refreshId;
|
|
17
|
+
const value = toValue(address);
|
|
18
|
+
if (!value || !solana) {
|
|
19
|
+
accountInfo.value = null;
|
|
20
|
+
loading.value = false;
|
|
21
|
+
error.value = null;
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
loading.value = true;
|
|
25
|
+
error.value = null;
|
|
26
|
+
try {
|
|
27
|
+
const parsedAddress = parseAddress(value);
|
|
28
|
+
if (!parsedAddress) {
|
|
29
|
+
accountInfo.value = null;
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const { value: account } = await client.rpc.getAccountInfo(parsedAddress, {
|
|
33
|
+
encoding: "base64",
|
|
34
|
+
commitment: options.commitment
|
|
35
|
+
}).send();
|
|
36
|
+
const nextAccountInfo = account ? normalizeAccountInfo(account) : null;
|
|
37
|
+
if (requestId === refreshId) {
|
|
38
|
+
accountInfo.value = nextAccountInfo;
|
|
39
|
+
}
|
|
40
|
+
return nextAccountInfo;
|
|
41
|
+
} catch (cause) {
|
|
42
|
+
const normalizedError = normalizeSolanaError(cause, "RPC_FAILURE");
|
|
43
|
+
if (requestId === refreshId) {
|
|
44
|
+
accountInfo.value = null;
|
|
45
|
+
error.value = normalizedError;
|
|
46
|
+
}
|
|
47
|
+
throw normalizedError;
|
|
48
|
+
} finally {
|
|
49
|
+
if (requestId === refreshId) {
|
|
50
|
+
loading.value = false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
onMounted(() => {
|
|
55
|
+
void refresh().catch(() => void 0);
|
|
56
|
+
});
|
|
57
|
+
watch(
|
|
58
|
+
() => toValue(address),
|
|
59
|
+
() => {
|
|
60
|
+
void refresh().catch(() => void 0);
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
return {
|
|
64
|
+
accountInfo,
|
|
65
|
+
loading,
|
|
66
|
+
error,
|
|
67
|
+
refresh
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function normalizeAccountInfo(account) {
|
|
71
|
+
return {
|
|
72
|
+
executable: account.executable,
|
|
73
|
+
lamports: Number(account.lamports),
|
|
74
|
+
owner: account.owner,
|
|
75
|
+
space: Number(account.space),
|
|
76
|
+
data: decodeBase64(account.data[0])
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { useAccountInfo as u };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { parseAddress } from '@vue-solana/core/address';
|
|
2
2
|
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
3
3
|
import { shallowRef, onMounted, watch, toValue } from 'vue';
|
|
4
|
-
import { u as useConnection } from './vue.
|
|
5
|
-
import { t as tryUseSolana } from './vue.
|
|
4
|
+
import { u as useConnection } from './vue.ChujsB0B.mjs';
|
|
5
|
+
import { t as tryUseSolana } from './vue.CnUlZSe8.mjs';
|
|
6
6
|
|
|
7
7
|
function useBalance(address, commitment) {
|
|
8
8
|
const solana = tryUseSolana();
|
|
9
|
-
const
|
|
9
|
+
const client = solana?.client ?? useConnection();
|
|
10
10
|
const balance = shallowRef(null);
|
|
11
11
|
const loading = shallowRef(false);
|
|
12
12
|
const error = shallowRef(null);
|
|
@@ -23,16 +23,16 @@ function useBalance(address, commitment) {
|
|
|
23
23
|
loading.value = true;
|
|
24
24
|
error.value = null;
|
|
25
25
|
try {
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
26
|
+
const parsedAddress = parseAddress(value);
|
|
27
|
+
if (!parsedAddress) {
|
|
28
28
|
balance.value = null;
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const { value: lamports } = await client.rpc.getBalance(parsedAddress, commitment ? { commitment } : void 0).send();
|
|
32
32
|
if (requestId === refreshId) {
|
|
33
|
-
balance.value =
|
|
33
|
+
balance.value = Number(lamports);
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return Number(lamports);
|
|
36
36
|
} catch (cause) {
|
|
37
37
|
const normalizedError = normalizeSolanaError(cause, "RPC_FAILURE");
|
|
38
38
|
if (requestId === refreshId) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { parsePublicKey } from '@vue-solana/core/address';
|
|
2
|
-
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
3
1
|
import { getTokenAccountsByOwner } from '@vue-solana/core/token-accounts';
|
|
2
|
+
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
3
|
+
import { parseAddress } from '@vue-solana/core/address';
|
|
4
4
|
import { shallowRef, onMounted, watch, toValue } from 'vue';
|
|
5
|
-
import { u as useConnection } from './vue.
|
|
6
|
-
import { t as tryUseSolana } from './vue.
|
|
5
|
+
import { u as useConnection } from './vue.ChujsB0B.mjs';
|
|
6
|
+
import { t as tryUseSolana } from './vue.CnUlZSe8.mjs';
|
|
7
7
|
|
|
8
8
|
function useTokenAccounts(owner, options) {
|
|
9
9
|
const solana = tryUseSolana();
|
|
10
|
-
const
|
|
10
|
+
const client = solana?.client ?? useConnection();
|
|
11
11
|
const tokenAccounts = shallowRef([]);
|
|
12
12
|
const loading = shallowRef(false);
|
|
13
13
|
const error = shallowRef(null);
|
|
@@ -24,17 +24,16 @@ function useTokenAccounts(owner, options) {
|
|
|
24
24
|
loading.value = true;
|
|
25
25
|
error.value = null;
|
|
26
26
|
try {
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
27
|
+
const parsedAddress = parseAddress(value);
|
|
28
|
+
if (!parsedAddress) {
|
|
29
29
|
tokenAccounts.value = [];
|
|
30
30
|
loading.value = false;
|
|
31
31
|
return [];
|
|
32
32
|
}
|
|
33
|
-
const
|
|
33
|
+
const nextAccounts = await getTokenAccountsByOwner(client, parsedAddress, {
|
|
34
34
|
commitment: options?.commitment,
|
|
35
35
|
programId: options?.programId
|
|
36
|
-
};
|
|
37
|
-
const nextAccounts = await getTokenAccountsByOwner(connection, publicKey, opts);
|
|
36
|
+
});
|
|
38
37
|
if (requestId === refreshId) {
|
|
39
38
|
tokenAccounts.value = nextAccounts;
|
|
40
39
|
}
|
package/dist/useAccountInfo.cjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const useAccountInfo = require('./shared/vue.
|
|
4
|
-
require('@vue-solana/core/address');
|
|
3
|
+
const useAccountInfo = require('./shared/vue.BMencBpI.cjs');
|
|
5
4
|
require('@vue-solana/core/errors');
|
|
6
5
|
require('vue');
|
|
7
|
-
require('
|
|
8
|
-
require('./shared/vue.
|
|
9
|
-
require('./shared/vue.
|
|
6
|
+
require('@vue-solana/core/address');
|
|
7
|
+
require('./shared/vue.CZwftA0L.cjs');
|
|
8
|
+
require('./shared/vue.k9Q6aN-0.cjs');
|
|
9
|
+
require('./shared/vue.BaR1VPhl.cjs');
|
|
10
|
+
require('./shared/vue.DNxOpDXz.cjs');
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { Commitment } from '@vue-solana/core/kit';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { Commitment, AccountInfo } from '@vue-solana/core/web3';
|
|
6
5
|
|
|
7
6
|
interface UseAccountInfoOptions {
|
|
8
7
|
commitment?: Commitment;
|
|
9
|
-
watch?: boolean;
|
|
10
8
|
}
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
interface AccountInfo {
|
|
10
|
+
executable: boolean;
|
|
11
|
+
lamports: number;
|
|
12
|
+
owner: string;
|
|
13
|
+
space: number;
|
|
14
|
+
data: Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
declare function useAccountInfo(address: MaybeRefOrGetter<string | null | undefined>, options?: UseAccountInfoOptions): {
|
|
17
|
+
accountInfo: vue.ShallowRef<AccountInfo | null, AccountInfo | null>;
|
|
13
18
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
14
19
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
15
|
-
refresh: () => Promise<AccountInfo
|
|
16
|
-
stopWatching: () => Promise<void>;
|
|
20
|
+
refresh: () => Promise<AccountInfo | null>;
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
export { useAccountInfo };
|
|
20
|
-
export type { UseAccountInfoOptions };
|
|
24
|
+
export type { AccountInfo, UseAccountInfoOptions };
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { Commitment } from '@vue-solana/core/kit';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { Commitment, AccountInfo } from '@vue-solana/core/web3';
|
|
6
5
|
|
|
7
6
|
interface UseAccountInfoOptions {
|
|
8
7
|
commitment?: Commitment;
|
|
9
|
-
watch?: boolean;
|
|
10
8
|
}
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
interface AccountInfo {
|
|
10
|
+
executable: boolean;
|
|
11
|
+
lamports: number;
|
|
12
|
+
owner: string;
|
|
13
|
+
space: number;
|
|
14
|
+
data: Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
declare function useAccountInfo(address: MaybeRefOrGetter<string | null | undefined>, options?: UseAccountInfoOptions): {
|
|
17
|
+
accountInfo: vue.ShallowRef<AccountInfo | null, AccountInfo | null>;
|
|
13
18
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
14
19
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
15
|
-
refresh: () => Promise<AccountInfo
|
|
16
|
-
stopWatching: () => Promise<void>;
|
|
20
|
+
refresh: () => Promise<AccountInfo | null>;
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
export { useAccountInfo };
|
|
20
|
-
export type { UseAccountInfoOptions };
|
|
24
|
+
export type { AccountInfo, UseAccountInfoOptions };
|
package/dist/useAccountInfo.d.ts
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { Commitment } from '@vue-solana/core/kit';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { Commitment, AccountInfo } from '@vue-solana/core/web3';
|
|
6
5
|
|
|
7
6
|
interface UseAccountInfoOptions {
|
|
8
7
|
commitment?: Commitment;
|
|
9
|
-
watch?: boolean;
|
|
10
8
|
}
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
interface AccountInfo {
|
|
10
|
+
executable: boolean;
|
|
11
|
+
lamports: number;
|
|
12
|
+
owner: string;
|
|
13
|
+
space: number;
|
|
14
|
+
data: Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
declare function useAccountInfo(address: MaybeRefOrGetter<string | null | undefined>, options?: UseAccountInfoOptions): {
|
|
17
|
+
accountInfo: vue.ShallowRef<AccountInfo | null, AccountInfo | null>;
|
|
13
18
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
14
19
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
15
|
-
refresh: () => Promise<AccountInfo
|
|
16
|
-
stopWatching: () => Promise<void>;
|
|
20
|
+
refresh: () => Promise<AccountInfo | null>;
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
export { useAccountInfo };
|
|
20
|
-
export type { UseAccountInfoOptions };
|
|
24
|
+
export type { AccountInfo, UseAccountInfoOptions };
|
package/dist/useAccountInfo.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { u as useAccountInfo } from './shared/vue.
|
|
2
|
-
import '@vue-solana/core/address';
|
|
1
|
+
export { u as useAccountInfo } from './shared/vue.dPRo2X5y.mjs';
|
|
3
2
|
import '@vue-solana/core/errors';
|
|
4
3
|
import 'vue';
|
|
5
|
-
import '
|
|
6
|
-
import './shared/vue.
|
|
7
|
-
import './shared/vue.
|
|
4
|
+
import '@vue-solana/core/address';
|
|
5
|
+
import './shared/vue.ChujsB0B.mjs';
|
|
6
|
+
import './shared/vue.BaFrF2PF.mjs';
|
|
7
|
+
import './shared/vue.CnUlZSe8.mjs';
|
|
8
|
+
import './shared/vue.Bfu1dCKe.mjs';
|
package/dist/useBalance.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const useBalance = require('./shared/vue.
|
|
3
|
+
const useBalance = require('./shared/vue.CEn2purG.cjs');
|
|
4
4
|
require('@vue-solana/core/address');
|
|
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
|
|
package/dist/useBalance.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { Commitment } from '@vue-solana/core/kit';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type BalanceInput = string | null | undefined;
|
|
7
|
+
declare function useBalance(address: MaybeRefOrGetter<BalanceInput>, commitment?: Commitment): {
|
|
7
8
|
balance: vue.ShallowRef<number | null, number | null>;
|
|
8
9
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
9
10
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
@@ -11,3 +12,4 @@ declare function useBalance(address: MaybeRefOrGetter<PublicKey | string | null
|
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export { useBalance };
|
|
15
|
+
export type { BalanceInput };
|
package/dist/useBalance.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { Commitment } from '@vue-solana/core/kit';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type BalanceInput = string | null | undefined;
|
|
7
|
+
declare function useBalance(address: MaybeRefOrGetter<BalanceInput>, commitment?: Commitment): {
|
|
7
8
|
balance: vue.ShallowRef<number | null, number | null>;
|
|
8
9
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
9
10
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
@@ -11,3 +12,4 @@ declare function useBalance(address: MaybeRefOrGetter<PublicKey | string | null
|
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export { useBalance };
|
|
15
|
+
export type { BalanceInput };
|
package/dist/useBalance.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { Commitment } from '@vue-solana/core/kit';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type BalanceInput = string | null | undefined;
|
|
7
|
+
declare function useBalance(address: MaybeRefOrGetter<BalanceInput>, commitment?: Commitment): {
|
|
7
8
|
balance: vue.ShallowRef<number | null, number | null>;
|
|
8
9
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
9
10
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
@@ -11,3 +12,4 @@ declare function useBalance(address: MaybeRefOrGetter<PublicKey | string | null
|
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export { useBalance };
|
|
15
|
+
export type { BalanceInput };
|
package/dist/useBalance.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { u as useBalance } from './shared/vue.
|
|
1
|
+
export { u as useBalance } from './shared/vue.stUBDBI9.mjs';
|
|
2
2
|
import '@vue-solana/core/address';
|
|
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/useConnection.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const useConnection = require('./shared/vue.
|
|
4
|
-
require('./shared/vue.
|
|
3
|
+
const useConnection = require('./shared/vue.CZwftA0L.cjs');
|
|
4
|
+
require('./shared/vue.k9Q6aN-0.cjs');
|
|
5
|
+
require('./shared/vue.BaR1VPhl.cjs');
|
|
5
6
|
require('vue');
|
|
6
|
-
require('./shared/vue.BE4KHksm.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
package/dist/useConnection.d.cts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _solana_kit from '@solana/kit';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `useSolanaClient()` which returns the Kit client instead of
|
|
5
|
+
* the legacy web3-compat Connection.
|
|
6
|
+
*/
|
|
7
|
+
declare function useConnection(): _solana_kit.Client<_solana_kit.ExtendedClient<object, {
|
|
8
|
+
rpc: _solana_kit.Rpc<_solana_kit.RequestAirdropApi & _solana_kit.GetAccountInfoApi & _solana_kit.GetAgGenesisCertApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetTransactionsForAddressApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi>;
|
|
9
|
+
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
10
|
+
}>>;
|
|
4
11
|
|
|
5
12
|
export { useConnection };
|
package/dist/useConnection.d.mts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _solana_kit from '@solana/kit';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `useSolanaClient()` which returns the Kit client instead of
|
|
5
|
+
* the legacy web3-compat Connection.
|
|
6
|
+
*/
|
|
7
|
+
declare function useConnection(): _solana_kit.Client<_solana_kit.ExtendedClient<object, {
|
|
8
|
+
rpc: _solana_kit.Rpc<_solana_kit.RequestAirdropApi & _solana_kit.GetAccountInfoApi & _solana_kit.GetAgGenesisCertApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetTransactionsForAddressApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi>;
|
|
9
|
+
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
10
|
+
}>>;
|
|
4
11
|
|
|
5
12
|
export { useConnection };
|
package/dist/useConnection.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _solana_kit from '@solana/kit';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `useSolanaClient()` which returns the Kit client instead of
|
|
5
|
+
* the legacy web3-compat Connection.
|
|
6
|
+
*/
|
|
7
|
+
declare function useConnection(): _solana_kit.Client<_solana_kit.ExtendedClient<object, {
|
|
8
|
+
rpc: _solana_kit.Rpc<_solana_kit.RequestAirdropApi & _solana_kit.GetAccountInfoApi & _solana_kit.GetAgGenesisCertApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetTransactionsForAddressApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi>;
|
|
9
|
+
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
10
|
+
}>>;
|
|
4
11
|
|
|
5
12
|
export { useConnection };
|
package/dist/useConnection.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { u as useConnection } from './shared/vue.
|
|
2
|
-
import './shared/vue.
|
|
1
|
+
export { u as useConnection } from './shared/vue.ChujsB0B.mjs';
|
|
2
|
+
import './shared/vue.BaFrF2PF.mjs';
|
|
3
|
+
import './shared/vue.CnUlZSe8.mjs';
|
|
3
4
|
import 'vue';
|
|
4
|
-
import './shared/vue.CYKT65tB.mjs';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const useProgramAccounts = require('./shared/vue.
|
|
4
|
-
require('@vue-solana/core/address');
|
|
3
|
+
const useProgramAccounts = require('./shared/vue.C7yR7Cs0.cjs');
|
|
5
4
|
require('@vue-solana/core/errors');
|
|
6
5
|
require('vue');
|
|
7
|
-
require('
|
|
8
|
-
require('./shared/vue.
|
|
9
|
-
require('./shared/vue.
|
|
6
|
+
require('@vue-solana/core/address');
|
|
7
|
+
require('./shared/vue.CZwftA0L.cjs');
|
|
8
|
+
require('./shared/vue.k9Q6aN-0.cjs');
|
|
9
|
+
require('./shared/vue.BaR1VPhl.cjs');
|
|
10
|
+
require('./shared/vue.DNxOpDXz.cjs');
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import * as _solana_kit from '@solana/kit';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import {
|
|
4
|
+
import { Commitment } from '@vue-solana/core/kit';
|
|
4
5
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { PublicKey, AccountInfo, Commitment } from '@vue-solana/core/web3';
|
|
6
6
|
|
|
7
|
-
type ProgramAccountMemcmpEncoding = "base58" | "base64"
|
|
7
|
+
type ProgramAccountMemcmpEncoding = "base58" | "base64";
|
|
8
8
|
type ProgramAccountMemcmpFilter = {
|
|
9
9
|
memcmp: {
|
|
10
10
|
offset: number;
|
|
@@ -25,15 +25,30 @@ interface UseProgramAccountsOptions {
|
|
|
25
25
|
dataSlice?: ProgramAccountDataSlice;
|
|
26
26
|
filters?: ProgramAccountFilter[];
|
|
27
27
|
}
|
|
28
|
-
interface ProgramAccount
|
|
29
|
-
pubkey:
|
|
30
|
-
account:
|
|
28
|
+
interface ProgramAccount {
|
|
29
|
+
pubkey: string;
|
|
30
|
+
account: {
|
|
31
|
+
executable: boolean;
|
|
32
|
+
lamports: number;
|
|
33
|
+
owner: string;
|
|
34
|
+
space: number;
|
|
35
|
+
data: Uint8Array;
|
|
36
|
+
};
|
|
31
37
|
}
|
|
32
|
-
declare function useProgramAccounts(programId: MaybeRefOrGetter<
|
|
33
|
-
accounts: vue.ShallowRef<ProgramAccount
|
|
38
|
+
declare function useProgramAccounts(programId: MaybeRefOrGetter<string | null | undefined>, options?: UseProgramAccountsOptions): {
|
|
39
|
+
accounts: vue.ShallowRef<ProgramAccount[], ProgramAccount[]>;
|
|
34
40
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
35
41
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
36
|
-
refresh: () => Promise<
|
|
42
|
+
refresh: () => Promise<{
|
|
43
|
+
pubkey: _solana_kit.Address;
|
|
44
|
+
account: {
|
|
45
|
+
executable: boolean;
|
|
46
|
+
lamports: number;
|
|
47
|
+
owner: _solana_kit.Address;
|
|
48
|
+
space: number;
|
|
49
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
50
|
+
};
|
|
51
|
+
}[]>;
|
|
37
52
|
};
|
|
38
53
|
|
|
39
54
|
export { useProgramAccounts };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import * as _solana_kit from '@solana/kit';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import {
|
|
4
|
+
import { Commitment } from '@vue-solana/core/kit';
|
|
4
5
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { PublicKey, AccountInfo, Commitment } from '@vue-solana/core/web3';
|
|
6
6
|
|
|
7
|
-
type ProgramAccountMemcmpEncoding = "base58" | "base64"
|
|
7
|
+
type ProgramAccountMemcmpEncoding = "base58" | "base64";
|
|
8
8
|
type ProgramAccountMemcmpFilter = {
|
|
9
9
|
memcmp: {
|
|
10
10
|
offset: number;
|
|
@@ -25,15 +25,30 @@ interface UseProgramAccountsOptions {
|
|
|
25
25
|
dataSlice?: ProgramAccountDataSlice;
|
|
26
26
|
filters?: ProgramAccountFilter[];
|
|
27
27
|
}
|
|
28
|
-
interface ProgramAccount
|
|
29
|
-
pubkey:
|
|
30
|
-
account:
|
|
28
|
+
interface ProgramAccount {
|
|
29
|
+
pubkey: string;
|
|
30
|
+
account: {
|
|
31
|
+
executable: boolean;
|
|
32
|
+
lamports: number;
|
|
33
|
+
owner: string;
|
|
34
|
+
space: number;
|
|
35
|
+
data: Uint8Array;
|
|
36
|
+
};
|
|
31
37
|
}
|
|
32
|
-
declare function useProgramAccounts(programId: MaybeRefOrGetter<
|
|
33
|
-
accounts: vue.ShallowRef<ProgramAccount
|
|
38
|
+
declare function useProgramAccounts(programId: MaybeRefOrGetter<string | null | undefined>, options?: UseProgramAccountsOptions): {
|
|
39
|
+
accounts: vue.ShallowRef<ProgramAccount[], ProgramAccount[]>;
|
|
34
40
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
35
41
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
36
|
-
refresh: () => Promise<
|
|
42
|
+
refresh: () => Promise<{
|
|
43
|
+
pubkey: _solana_kit.Address;
|
|
44
|
+
account: {
|
|
45
|
+
executable: boolean;
|
|
46
|
+
lamports: number;
|
|
47
|
+
owner: _solana_kit.Address;
|
|
48
|
+
space: number;
|
|
49
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
50
|
+
};
|
|
51
|
+
}[]>;
|
|
37
52
|
};
|
|
38
53
|
|
|
39
54
|
export { useProgramAccounts };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import * as _solana_kit from '@solana/kit';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import {
|
|
4
|
+
import { Commitment } from '@vue-solana/core/kit';
|
|
4
5
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { PublicKey, AccountInfo, Commitment } from '@vue-solana/core/web3';
|
|
6
6
|
|
|
7
|
-
type ProgramAccountMemcmpEncoding = "base58" | "base64"
|
|
7
|
+
type ProgramAccountMemcmpEncoding = "base58" | "base64";
|
|
8
8
|
type ProgramAccountMemcmpFilter = {
|
|
9
9
|
memcmp: {
|
|
10
10
|
offset: number;
|
|
@@ -25,15 +25,30 @@ interface UseProgramAccountsOptions {
|
|
|
25
25
|
dataSlice?: ProgramAccountDataSlice;
|
|
26
26
|
filters?: ProgramAccountFilter[];
|
|
27
27
|
}
|
|
28
|
-
interface ProgramAccount
|
|
29
|
-
pubkey:
|
|
30
|
-
account:
|
|
28
|
+
interface ProgramAccount {
|
|
29
|
+
pubkey: string;
|
|
30
|
+
account: {
|
|
31
|
+
executable: boolean;
|
|
32
|
+
lamports: number;
|
|
33
|
+
owner: string;
|
|
34
|
+
space: number;
|
|
35
|
+
data: Uint8Array;
|
|
36
|
+
};
|
|
31
37
|
}
|
|
32
|
-
declare function useProgramAccounts(programId: MaybeRefOrGetter<
|
|
33
|
-
accounts: vue.ShallowRef<ProgramAccount
|
|
38
|
+
declare function useProgramAccounts(programId: MaybeRefOrGetter<string | null | undefined>, options?: UseProgramAccountsOptions): {
|
|
39
|
+
accounts: vue.ShallowRef<ProgramAccount[], ProgramAccount[]>;
|
|
34
40
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
35
41
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
36
|
-
refresh: () => Promise<
|
|
42
|
+
refresh: () => Promise<{
|
|
43
|
+
pubkey: _solana_kit.Address;
|
|
44
|
+
account: {
|
|
45
|
+
executable: boolean;
|
|
46
|
+
lamports: number;
|
|
47
|
+
owner: _solana_kit.Address;
|
|
48
|
+
space: number;
|
|
49
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
50
|
+
};
|
|
51
|
+
}[]>;
|
|
37
52
|
};
|
|
38
53
|
|
|
39
54
|
export { useProgramAccounts };
|