@vue-solana/vue 0.6.0 → 0.6.1
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 +28 -0
- package/dist/index.cjs +8 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +5 -0
- package/dist/shared/vue.7TzeDJZX.mjs +127 -0
- package/dist/shared/vue.BPnK_lsh.cjs +129 -0
- package/dist/shared/vue.CUTLu1Gf.mjs +71 -0
- package/dist/shared/vue.DUufwq8y.cjs +186 -0
- package/dist/shared/vue.JC5FdU2O.mjs +180 -0
- package/dist/shared/vue.dmuispJ3.cjs +73 -0
- package/dist/useAccountInfo.cjs +12 -0
- package/dist/useAccountInfo.d.cts +19 -0
- package/dist/useAccountInfo.d.mts +19 -0
- package/dist/useAccountInfo.d.ts +19 -0
- package/dist/useAccountInfo.mjs +6 -0
- package/dist/useProgramAccounts.cjs +12 -0
- package/dist/useProgramAccounts.d.cts +39 -0
- package/dist/useProgramAccounts.d.mts +39 -0
- package/dist/useProgramAccounts.d.ts +39 -0
- package/dist/useProgramAccounts.mjs +6 -0
- package/dist/useSignatureStatus.cjs +12 -0
- package/dist/useSignatureStatus.d.cts +21 -0
- package/dist/useSignatureStatus.d.mts +21 -0
- package/dist/useSignatureStatus.d.ts +21 -0
- package/dist/useSignatureStatus.mjs +6 -0
- package/package.json +18 -2
package/README.md
CHANGED
|
@@ -118,6 +118,26 @@ const { balance, loading, error, refresh } = useBalance(address);
|
|
|
118
118
|
</template>
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
+
## Read Account Data
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
import { useAccountInfo } from "@vue-solana/vue/useAccountInfo";
|
|
125
|
+
import { useProgramAccounts } from "@vue-solana/vue/useProgramAccounts";
|
|
126
|
+
import { useSignatureStatus } from "@vue-solana/vue/useSignatureStatus";
|
|
127
|
+
|
|
128
|
+
const account = useAccountInfo(address, { watch: true });
|
|
129
|
+
const programAccounts = useProgramAccounts(programId, {
|
|
130
|
+
dataSlice: { offset: 0, length: 32 },
|
|
131
|
+
filters: [{ dataSize: 165 }],
|
|
132
|
+
});
|
|
133
|
+
const signatureStatus = useSignatureStatus(signature, {
|
|
134
|
+
pollIntervalMs: 2_000,
|
|
135
|
+
searchTransactionHistory: true,
|
|
136
|
+
});
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
`useProgramAccounts()` can be expensive on public RPC nodes. Prefer narrow `filters`, use `dataSlice` when you only need part of account data, and avoid polling broad program scans.
|
|
140
|
+
|
|
121
141
|
## Wallet State
|
|
122
142
|
|
|
123
143
|
```vue
|
|
@@ -222,8 +242,11 @@ Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
|
|
|
222
242
|
- `useWallet()`: returns wallet refs, computed connection state, and wallet actions.
|
|
223
243
|
- `useWallets()`: returns discovered browser extension wallets, Android Mobile Wallet Adapter wallets, iOS browser wallet links, and wallet selection actions.
|
|
224
244
|
- `useBalance(address, commitment?)`: loads lamport balance for a `PublicKey` or address string.
|
|
245
|
+
- `useAccountInfo(address, options?)`: loads account info and can subscribe to account changes with `watch: true`.
|
|
246
|
+
- `useProgramAccounts(programId, config?)`: loads accounts owned by a program with optional filters, commitment, and `dataSlice`.
|
|
225
247
|
- `useTransaction(handler, options?)`: generic async transaction state helper with optional timeout settings.
|
|
226
248
|
- `useTransactionConfirmation(options?)`: confirms a submitted signature with reactive status and timeout/error state.
|
|
249
|
+
- `useSignatureStatus(signature, options?)`: reads a transaction signature status with optional polling or websocket subscription.
|
|
227
250
|
- `useSignAndSendTransaction()`: signs and sends a transaction through the configured wallet, with optional confirmation waiting.
|
|
228
251
|
|
|
229
252
|
Direct composable subpaths:
|
|
@@ -231,11 +254,14 @@ Direct composable subpaths:
|
|
|
231
254
|
- `@vue-solana/vue/useSolana`
|
|
232
255
|
- `@vue-solana/vue/useRpc`
|
|
233
256
|
- `@vue-solana/vue/useConnection`
|
|
257
|
+
- `@vue-solana/vue/useAccountInfo`
|
|
234
258
|
- `@vue-solana/vue/useBalance`
|
|
259
|
+
- `@vue-solana/vue/useProgramAccounts`
|
|
235
260
|
- `@vue-solana/vue/useWallet`
|
|
236
261
|
- `@vue-solana/vue/useWallets`
|
|
237
262
|
- `@vue-solana/vue/useTransaction`
|
|
238
263
|
- `@vue-solana/vue/useTransactionConfirmation`
|
|
264
|
+
- `@vue-solana/vue/useSignatureStatus`
|
|
239
265
|
- `@vue-solana/vue/useSignAndSendTransaction`
|
|
240
266
|
|
|
241
267
|
## Known TypeScript Issue
|
|
@@ -247,10 +273,12 @@ If TypeScript cannot resolve `@solana/web3-compat`, add `types/web3-compat.d.ts`
|
|
|
247
273
|
```ts
|
|
248
274
|
declare module "@solana/web3-compat" {
|
|
249
275
|
export type {
|
|
276
|
+
AccountInfo,
|
|
250
277
|
Commitment,
|
|
251
278
|
RpcResponseAndContext,
|
|
252
279
|
SendOptions,
|
|
253
280
|
SignatureResult,
|
|
281
|
+
SignatureStatus,
|
|
254
282
|
TransactionSignature,
|
|
255
283
|
} from "@solana/web3.js";
|
|
256
284
|
export {
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const useAccountInfo = require('./shared/vue.BPnK_lsh.cjs');
|
|
3
4
|
const useBalance = require('./shared/vue.D_AM1Nl8.cjs');
|
|
4
5
|
const useConnection = require('./shared/vue.CwhEmATP.cjs');
|
|
6
|
+
const useProgramAccounts = require('./shared/vue.dmuispJ3.cjs');
|
|
5
7
|
const useRpc = require('./shared/vue.COyyrsQU.cjs');
|
|
6
8
|
const useSignAndSendTransaction = require('./shared/vue.DEQJ23UM.cjs');
|
|
9
|
+
const useSignatureStatus = require('./shared/vue.DUufwq8y.cjs');
|
|
7
10
|
const useSolana = require('./shared/vue.C4tLiG3R.cjs');
|
|
8
11
|
const useTransaction = require('./shared/vue.DQi38JeF.cjs');
|
|
9
12
|
const useTransactionConfirmation = require('./shared/vue.DHVYJk8P.cjs');
|
|
@@ -13,8 +16,10 @@ const rpc = require('@vue-solana/core/rpc');
|
|
|
13
16
|
const walletStandard = require('@vue-solana/core/wallet-standard');
|
|
14
17
|
const vue = require('vue');
|
|
15
18
|
const iosWallet = require('@vue-solana/core/ios-wallet');
|
|
19
|
+
require('@vue-solana/core/address');
|
|
16
20
|
require('@solana/web3-compat');
|
|
17
21
|
require('@vue-solana/core/transaction');
|
|
22
|
+
require('bs58');
|
|
18
23
|
|
|
19
24
|
const SELECTED_WALLET_STORAGE_KEY = "vue-solana:selected-wallet";
|
|
20
25
|
function readSelectedWallet() {
|
|
@@ -316,10 +321,13 @@ function isSameWallet(wallet, selectedWallet) {
|
|
|
316
321
|
}
|
|
317
322
|
const VueSolana = createSolanaPlugin;
|
|
318
323
|
|
|
324
|
+
exports.useAccountInfo = useAccountInfo.useAccountInfo;
|
|
319
325
|
exports.useBalance = useBalance.useBalance;
|
|
320
326
|
exports.useConnection = useConnection.useConnection;
|
|
327
|
+
exports.useProgramAccounts = useProgramAccounts.useProgramAccounts;
|
|
321
328
|
exports.useRpc = useRpc.useRpc;
|
|
322
329
|
exports.useSignAndSendTransaction = useSignAndSendTransaction.useSignAndSendTransaction;
|
|
330
|
+
exports.useSignatureStatus = useSignatureStatus.useSignatureStatus;
|
|
323
331
|
exports.solanaInjectionKey = useSolana.solanaInjectionKey;
|
|
324
332
|
exports.tryUseSolana = useSolana.tryUseSolana;
|
|
325
333
|
exports.useSolana = useSolana.useSolana;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
export { UseAccountInfoOptions, useAccountInfo } from './useAccountInfo.cjs';
|
|
1
2
|
export { useBalance } from './useBalance.cjs';
|
|
2
3
|
export { useConnection } from './useConnection.cjs';
|
|
4
|
+
export { ProgramAccount, ProgramAccountDataSizeFilter, ProgramAccountDataSlice, ProgramAccountFilter, ProgramAccountMemcmpEncoding, ProgramAccountMemcmpFilter, UseProgramAccountsOptions, useProgramAccounts } from './useProgramAccounts.cjs';
|
|
3
5
|
export { useRpc } from './useRpc.cjs';
|
|
4
6
|
export { SignAndSendTransactionOptions, SignAndSendTransactionStatus, useSignAndSendTransaction } from './useSignAndSendTransaction.cjs';
|
|
7
|
+
export { UseSignatureStatusOptions, useSignatureStatus } from './useSignatureStatus.cjs';
|
|
5
8
|
export { tryUseSolana, useSolana } from './useSolana.cjs';
|
|
6
9
|
export { UseTransactionOptions, useTransaction } from './useTransaction.cjs';
|
|
7
10
|
export { TransactionConfirmationStatus, getConfirmedTransactionStatus, useTransactionConfirmation } from './useTransactionConfirmation.cjs';
|
|
@@ -12,6 +15,7 @@ import { GetSolanaIosWalletsOptions } from '@vue-solana/core/ios-wallet';
|
|
|
12
15
|
import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-wallet';
|
|
13
16
|
import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
14
17
|
import { App } from 'vue';
|
|
18
|
+
import '@vue-solana/core/address';
|
|
15
19
|
import '@solana/web3-compat';
|
|
16
20
|
|
|
17
21
|
interface VueSolanaPluginOptions extends SolanaConfig {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
export { UseAccountInfoOptions, useAccountInfo } from './useAccountInfo.mjs';
|
|
1
2
|
export { useBalance } from './useBalance.mjs';
|
|
2
3
|
export { useConnection } from './useConnection.mjs';
|
|
4
|
+
export { ProgramAccount, ProgramAccountDataSizeFilter, ProgramAccountDataSlice, ProgramAccountFilter, ProgramAccountMemcmpEncoding, ProgramAccountMemcmpFilter, UseProgramAccountsOptions, useProgramAccounts } from './useProgramAccounts.mjs';
|
|
3
5
|
export { useRpc } from './useRpc.mjs';
|
|
4
6
|
export { SignAndSendTransactionOptions, SignAndSendTransactionStatus, useSignAndSendTransaction } from './useSignAndSendTransaction.mjs';
|
|
7
|
+
export { UseSignatureStatusOptions, useSignatureStatus } from './useSignatureStatus.mjs';
|
|
5
8
|
export { tryUseSolana, useSolana } from './useSolana.mjs';
|
|
6
9
|
export { UseTransactionOptions, useTransaction } from './useTransaction.mjs';
|
|
7
10
|
export { TransactionConfirmationStatus, getConfirmedTransactionStatus, useTransactionConfirmation } from './useTransactionConfirmation.mjs';
|
|
@@ -12,6 +15,7 @@ import { GetSolanaIosWalletsOptions } from '@vue-solana/core/ios-wallet';
|
|
|
12
15
|
import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-wallet';
|
|
13
16
|
import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
14
17
|
import { App } from 'vue';
|
|
18
|
+
import '@vue-solana/core/address';
|
|
15
19
|
import '@solana/web3-compat';
|
|
16
20
|
|
|
17
21
|
interface VueSolanaPluginOptions extends SolanaConfig {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
export { UseAccountInfoOptions, useAccountInfo } from './useAccountInfo.js';
|
|
1
2
|
export { useBalance } from './useBalance.js';
|
|
2
3
|
export { useConnection } from './useConnection.js';
|
|
4
|
+
export { ProgramAccount, ProgramAccountDataSizeFilter, ProgramAccountDataSlice, ProgramAccountFilter, ProgramAccountMemcmpEncoding, ProgramAccountMemcmpFilter, UseProgramAccountsOptions, useProgramAccounts } from './useProgramAccounts.js';
|
|
3
5
|
export { useRpc } from './useRpc.js';
|
|
4
6
|
export { SignAndSendTransactionOptions, SignAndSendTransactionStatus, useSignAndSendTransaction } from './useSignAndSendTransaction.js';
|
|
7
|
+
export { UseSignatureStatusOptions, useSignatureStatus } from './useSignatureStatus.js';
|
|
5
8
|
export { tryUseSolana, useSolana } from './useSolana.js';
|
|
6
9
|
export { UseTransactionOptions, useTransaction } from './useTransaction.js';
|
|
7
10
|
export { TransactionConfirmationStatus, getConfirmedTransactionStatus, useTransactionConfirmation } from './useTransactionConfirmation.js';
|
|
@@ -12,6 +15,7 @@ import { GetSolanaIosWalletsOptions } from '@vue-solana/core/ios-wallet';
|
|
|
12
15
|
import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-wallet';
|
|
13
16
|
import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
14
17
|
import { App } from 'vue';
|
|
18
|
+
import '@vue-solana/core/address';
|
|
15
19
|
import '@solana/web3-compat';
|
|
16
20
|
|
|
17
21
|
interface VueSolanaPluginOptions extends SolanaConfig {
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
export { u as useAccountInfo } from './shared/vue.7TzeDJZX.mjs';
|
|
1
2
|
export { u as useBalance } from './shared/vue.DQhHHVu6.mjs';
|
|
2
3
|
export { u as useConnection } from './shared/vue.DlEAL2G8.mjs';
|
|
4
|
+
export { u as useProgramAccounts } from './shared/vue.CUTLu1Gf.mjs';
|
|
3
5
|
export { u as useRpc } from './shared/vue.BqDzSepb.mjs';
|
|
4
6
|
export { u as useSignAndSendTransaction } from './shared/vue.RQ9fETnm.mjs';
|
|
7
|
+
export { u as useSignatureStatus } from './shared/vue.JC5FdU2O.mjs';
|
|
5
8
|
import { s as solanaInjectionKey } from './shared/vue.1M_c5FWA.mjs';
|
|
6
9
|
export { t as tryUseSolana, u as useSolana } from './shared/vue.1M_c5FWA.mjs';
|
|
7
10
|
import { w as withTimeout } from './shared/vue.gLqkzJY4.mjs';
|
|
@@ -13,8 +16,10 @@ import { createSolanaContext } from '@vue-solana/core/rpc';
|
|
|
13
16
|
import { getRegisteredSolanaWallets, getSolanaChain, adaptSolanaStandardWallet, subscribeSolanaWallets } from '@vue-solana/core/wallet-standard';
|
|
14
17
|
import { shallowRef, ref, triggerRef } from 'vue';
|
|
15
18
|
import { handleSolanaIosWalletCallback, getSolanaIosWallets, isSolanaIosWalletInfo, adaptSolanaIosWallet } from '@vue-solana/core/ios-wallet';
|
|
19
|
+
import '@vue-solana/core/address';
|
|
16
20
|
import '@solana/web3-compat';
|
|
17
21
|
import '@vue-solana/core/transaction';
|
|
22
|
+
import 'bs58';
|
|
18
23
|
|
|
19
24
|
const SELECTED_WALLET_STORAGE_KEY = "vue-solana:selected-wallet";
|
|
20
25
|
function readSelectedWallet() {
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { parsePublicKey } from '@vue-solana/core/address';
|
|
2
|
+
import { shallowRef, onMounted, onUnmounted, watch, toValue } from 'vue';
|
|
3
|
+
import { u as useConnection } from './vue.DlEAL2G8.mjs';
|
|
4
|
+
import { t as tryUseSolana } from './vue.1M_c5FWA.mjs';
|
|
5
|
+
|
|
6
|
+
function useAccountInfo(address, options = {}) {
|
|
7
|
+
const solana = tryUseSolana();
|
|
8
|
+
const connection = solana?.connection ?? useConnection();
|
|
9
|
+
const accountInfo = shallowRef(null);
|
|
10
|
+
const loading = shallowRef(false);
|
|
11
|
+
const error = shallowRef(null);
|
|
12
|
+
let refreshId = 0;
|
|
13
|
+
let watchId = 0;
|
|
14
|
+
let subscriptionId = null;
|
|
15
|
+
let manuallyStopped = false;
|
|
16
|
+
async function refresh() {
|
|
17
|
+
const requestId = ++refreshId;
|
|
18
|
+
const value = toValue(address);
|
|
19
|
+
if (!value || !solana) {
|
|
20
|
+
accountInfo.value = null;
|
|
21
|
+
loading.value = false;
|
|
22
|
+
error.value = null;
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
loading.value = true;
|
|
26
|
+
error.value = null;
|
|
27
|
+
try {
|
|
28
|
+
const publicKey = parsePublicKey(value);
|
|
29
|
+
if (!publicKey) {
|
|
30
|
+
accountInfo.value = null;
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
const nextAccountInfo = await connection.getAccountInfo(publicKey, options.commitment);
|
|
34
|
+
if (requestId === refreshId) {
|
|
35
|
+
accountInfo.value = nextAccountInfo;
|
|
36
|
+
}
|
|
37
|
+
return nextAccountInfo;
|
|
38
|
+
} catch (cause) {
|
|
39
|
+
if (requestId === refreshId) {
|
|
40
|
+
accountInfo.value = null;
|
|
41
|
+
error.value = cause;
|
|
42
|
+
}
|
|
43
|
+
throw cause;
|
|
44
|
+
} finally {
|
|
45
|
+
if (requestId === refreshId) {
|
|
46
|
+
loading.value = false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async function stopWatching() {
|
|
51
|
+
manuallyStopped = true;
|
|
52
|
+
watchId += 1;
|
|
53
|
+
await stopCurrentWatcher();
|
|
54
|
+
}
|
|
55
|
+
async function stopCurrentWatcher() {
|
|
56
|
+
if (subscriptionId === null) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const currentSubscriptionId = subscriptionId;
|
|
60
|
+
subscriptionId = null;
|
|
61
|
+
try {
|
|
62
|
+
await connection.removeAccountChangeListener(currentSubscriptionId);
|
|
63
|
+
} catch (cause) {
|
|
64
|
+
error.value = cause;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async function startWatching() {
|
|
68
|
+
const requestId = ++watchId;
|
|
69
|
+
await stopCurrentWatcher();
|
|
70
|
+
if (requestId !== watchId) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (manuallyStopped || !options.watch || !solana) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
const publicKey = parsePublicKey(toValue(address));
|
|
78
|
+
if (!publicKey) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const nextSubscriptionId = connection.onAccountChange(
|
|
82
|
+
publicKey,
|
|
83
|
+
(nextAccountInfo) => {
|
|
84
|
+
if (requestId !== watchId) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
accountInfo.value = nextAccountInfo;
|
|
88
|
+
error.value = null;
|
|
89
|
+
},
|
|
90
|
+
options.commitment
|
|
91
|
+
);
|
|
92
|
+
if (requestId !== watchId) {
|
|
93
|
+
await connection.removeAccountChangeListener(nextSubscriptionId);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
subscriptionId = nextSubscriptionId;
|
|
97
|
+
} catch (cause) {
|
|
98
|
+
if (requestId === watchId) {
|
|
99
|
+
error.value = cause;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
onMounted(() => {
|
|
104
|
+
void refresh().catch(() => void 0);
|
|
105
|
+
void startWatching();
|
|
106
|
+
});
|
|
107
|
+
onUnmounted(() => {
|
|
108
|
+
refreshId += 1;
|
|
109
|
+
void stopWatching();
|
|
110
|
+
});
|
|
111
|
+
watch(
|
|
112
|
+
() => toValue(address),
|
|
113
|
+
() => {
|
|
114
|
+
void refresh().catch(() => void 0);
|
|
115
|
+
void startWatching();
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
return {
|
|
119
|
+
accountInfo,
|
|
120
|
+
loading,
|
|
121
|
+
error,
|
|
122
|
+
refresh,
|
|
123
|
+
stopWatching
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { useAccountInfo as u };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const address = require('@vue-solana/core/address');
|
|
4
|
+
const vue = require('vue');
|
|
5
|
+
const useConnection = require('./vue.CwhEmATP.cjs');
|
|
6
|
+
const useSolana = require('./vue.C4tLiG3R.cjs');
|
|
7
|
+
|
|
8
|
+
function useAccountInfo(address$1, options = {}) {
|
|
9
|
+
const solana = useSolana.tryUseSolana();
|
|
10
|
+
const connection = solana?.connection ?? useConnection.useConnection();
|
|
11
|
+
const accountInfo = vue.shallowRef(null);
|
|
12
|
+
const loading = vue.shallowRef(false);
|
|
13
|
+
const error = vue.shallowRef(null);
|
|
14
|
+
let refreshId = 0;
|
|
15
|
+
let watchId = 0;
|
|
16
|
+
let subscriptionId = null;
|
|
17
|
+
let manuallyStopped = false;
|
|
18
|
+
async function refresh() {
|
|
19
|
+
const requestId = ++refreshId;
|
|
20
|
+
const value = vue.toValue(address$1);
|
|
21
|
+
if (!value || !solana) {
|
|
22
|
+
accountInfo.value = null;
|
|
23
|
+
loading.value = false;
|
|
24
|
+
error.value = null;
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
loading.value = true;
|
|
28
|
+
error.value = null;
|
|
29
|
+
try {
|
|
30
|
+
const publicKey = address.parsePublicKey(value);
|
|
31
|
+
if (!publicKey) {
|
|
32
|
+
accountInfo.value = null;
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const nextAccountInfo = await connection.getAccountInfo(publicKey, options.commitment);
|
|
36
|
+
if (requestId === refreshId) {
|
|
37
|
+
accountInfo.value = nextAccountInfo;
|
|
38
|
+
}
|
|
39
|
+
return nextAccountInfo;
|
|
40
|
+
} catch (cause) {
|
|
41
|
+
if (requestId === refreshId) {
|
|
42
|
+
accountInfo.value = null;
|
|
43
|
+
error.value = cause;
|
|
44
|
+
}
|
|
45
|
+
throw cause;
|
|
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 = cause;
|
|
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 = address.parsePublicKey(vue.toValue(address$1));
|
|
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 = cause;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
vue.onMounted(() => {
|
|
106
|
+
void refresh().catch(() => void 0);
|
|
107
|
+
void startWatching();
|
|
108
|
+
});
|
|
109
|
+
vue.onUnmounted(() => {
|
|
110
|
+
refreshId += 1;
|
|
111
|
+
void stopWatching();
|
|
112
|
+
});
|
|
113
|
+
vue.watch(
|
|
114
|
+
() => vue.toValue(address$1),
|
|
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
|
+
exports.useAccountInfo = useAccountInfo;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { parsePublicKey } from '@vue-solana/core/address';
|
|
2
|
+
import { shallowRef, onMounted, onUnmounted, watch, toValue } from 'vue';
|
|
3
|
+
import { u as useConnection } from './vue.DlEAL2G8.mjs';
|
|
4
|
+
import { t as tryUseSolana } from './vue.1M_c5FWA.mjs';
|
|
5
|
+
|
|
6
|
+
function useProgramAccounts(programId, options = {}) {
|
|
7
|
+
const solana = tryUseSolana();
|
|
8
|
+
const connection = solana?.connection ?? useConnection();
|
|
9
|
+
const accounts = shallowRef([]);
|
|
10
|
+
const loading = shallowRef(false);
|
|
11
|
+
const error = shallowRef(null);
|
|
12
|
+
let refreshId = 0;
|
|
13
|
+
async function refresh() {
|
|
14
|
+
const requestId = ++refreshId;
|
|
15
|
+
const value = toValue(programId);
|
|
16
|
+
if (!value || !solana) {
|
|
17
|
+
accounts.value = [];
|
|
18
|
+
loading.value = false;
|
|
19
|
+
error.value = null;
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
loading.value = true;
|
|
23
|
+
error.value = null;
|
|
24
|
+
try {
|
|
25
|
+
const publicKey = parsePublicKey(value);
|
|
26
|
+
if (!publicKey) {
|
|
27
|
+
accounts.value = [];
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
const nextAccounts = await connection.getProgramAccounts(publicKey, {
|
|
31
|
+
commitment: options.commitment,
|
|
32
|
+
dataSlice: options.dataSlice,
|
|
33
|
+
filters: options.filters
|
|
34
|
+
});
|
|
35
|
+
if (requestId === refreshId) {
|
|
36
|
+
accounts.value = nextAccounts;
|
|
37
|
+
}
|
|
38
|
+
return nextAccounts;
|
|
39
|
+
} catch (cause) {
|
|
40
|
+
if (requestId === refreshId) {
|
|
41
|
+
accounts.value = [];
|
|
42
|
+
error.value = cause;
|
|
43
|
+
}
|
|
44
|
+
throw cause;
|
|
45
|
+
} finally {
|
|
46
|
+
if (requestId === refreshId) {
|
|
47
|
+
loading.value = false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
onMounted(() => {
|
|
52
|
+
void refresh().catch(() => void 0);
|
|
53
|
+
});
|
|
54
|
+
onUnmounted(() => {
|
|
55
|
+
refreshId += 1;
|
|
56
|
+
});
|
|
57
|
+
watch(
|
|
58
|
+
() => toValue(programId),
|
|
59
|
+
() => {
|
|
60
|
+
void refresh().catch(() => void 0);
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
return {
|
|
64
|
+
accounts,
|
|
65
|
+
loading,
|
|
66
|
+
error,
|
|
67
|
+
refresh
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { useProgramAccounts as u };
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const bs58 = require('bs58');
|
|
4
|
+
const vue = require('vue');
|
|
5
|
+
const useConnection = require('./vue.CwhEmATP.cjs');
|
|
6
|
+
const useSolana = require('./vue.C4tLiG3R.cjs');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
9
|
+
|
|
10
|
+
const bs58__default = /*#__PURE__*/_interopDefaultCompat(bs58);
|
|
11
|
+
|
|
12
|
+
function useSignatureStatus(signature, options = {}) {
|
|
13
|
+
const solana = useSolana.tryUseSolana();
|
|
14
|
+
const connection = solana?.connection ?? useConnection.useConnection();
|
|
15
|
+
const status = vue.shallowRef(null);
|
|
16
|
+
const loading = vue.shallowRef(false);
|
|
17
|
+
const error = vue.shallowRef(null);
|
|
18
|
+
let refreshId = 0;
|
|
19
|
+
let subscriptionStartId = 0;
|
|
20
|
+
let pollId = null;
|
|
21
|
+
let subscriptionId = null;
|
|
22
|
+
let manuallyStoppedPolling = false;
|
|
23
|
+
let manuallyStoppedSubscription = false;
|
|
24
|
+
async function refresh() {
|
|
25
|
+
const requestId = ++refreshId;
|
|
26
|
+
const value = vue.toValue(signature);
|
|
27
|
+
if (!value || !solana) {
|
|
28
|
+
status.value = null;
|
|
29
|
+
loading.value = false;
|
|
30
|
+
error.value = null;
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
loading.value = true;
|
|
34
|
+
error.value = null;
|
|
35
|
+
try {
|
|
36
|
+
const validSignature = parseTransactionSignature(value);
|
|
37
|
+
const response = await connection.getSignatureStatuses([validSignature], {
|
|
38
|
+
searchTransactionHistory: options.searchTransactionHistory
|
|
39
|
+
});
|
|
40
|
+
const nextStatus = response.value[0] ?? null;
|
|
41
|
+
if (requestId === refreshId) {
|
|
42
|
+
status.value = nextStatus;
|
|
43
|
+
}
|
|
44
|
+
return nextStatus;
|
|
45
|
+
} catch (cause) {
|
|
46
|
+
if (requestId === refreshId) {
|
|
47
|
+
status.value = null;
|
|
48
|
+
error.value = cause;
|
|
49
|
+
}
|
|
50
|
+
throw cause;
|
|
51
|
+
} finally {
|
|
52
|
+
if (requestId === refreshId) {
|
|
53
|
+
loading.value = false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function stopPolling() {
|
|
58
|
+
manuallyStoppedPolling = true;
|
|
59
|
+
stopCurrentPolling();
|
|
60
|
+
}
|
|
61
|
+
function stopCurrentPolling() {
|
|
62
|
+
if (pollId === null) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
clearInterval(pollId);
|
|
66
|
+
pollId = null;
|
|
67
|
+
}
|
|
68
|
+
function startPolling() {
|
|
69
|
+
stopCurrentPolling();
|
|
70
|
+
const value = vue.toValue(signature);
|
|
71
|
+
if (manuallyStoppedPolling || !options.pollIntervalMs || !value || !solana) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (options.pollIntervalMs <= 0) {
|
|
75
|
+
error.value = new RangeError("pollIntervalMs must be greater than 0");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
parseTransactionSignature(value);
|
|
80
|
+
} catch (cause) {
|
|
81
|
+
error.value = cause;
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
pollId = setInterval(() => {
|
|
85
|
+
void refresh().catch(() => void 0);
|
|
86
|
+
}, options.pollIntervalMs);
|
|
87
|
+
}
|
|
88
|
+
async function stopSubscription() {
|
|
89
|
+
manuallyStoppedSubscription = true;
|
|
90
|
+
subscriptionStartId += 1;
|
|
91
|
+
await stopCurrentSubscription();
|
|
92
|
+
}
|
|
93
|
+
async function stopCurrentSubscription() {
|
|
94
|
+
if (subscriptionId === null) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const currentSubscriptionId = subscriptionId;
|
|
98
|
+
subscriptionId = null;
|
|
99
|
+
try {
|
|
100
|
+
await connection.removeSignatureListener(currentSubscriptionId);
|
|
101
|
+
} catch (cause) {
|
|
102
|
+
error.value = cause;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
async function startSubscription() {
|
|
106
|
+
const requestId = ++subscriptionStartId;
|
|
107
|
+
await stopCurrentSubscription();
|
|
108
|
+
if (requestId !== subscriptionStartId) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const value = vue.toValue(signature);
|
|
112
|
+
if (manuallyStoppedSubscription || !options.subscribe || !value || !solana) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
try {
|
|
116
|
+
const validSignature = parseTransactionSignature(value);
|
|
117
|
+
const nextSubscriptionId = connection.onSignature(
|
|
118
|
+
validSignature,
|
|
119
|
+
(notification, context) => {
|
|
120
|
+
if (requestId !== subscriptionStartId) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
status.value = {
|
|
124
|
+
slot: context.slot,
|
|
125
|
+
confirmations: null,
|
|
126
|
+
err: notification.err,
|
|
127
|
+
confirmationStatus: options.commitment ?? "confirmed"
|
|
128
|
+
};
|
|
129
|
+
error.value = null;
|
|
130
|
+
},
|
|
131
|
+
options.commitment
|
|
132
|
+
);
|
|
133
|
+
if (requestId !== subscriptionStartId) {
|
|
134
|
+
await connection.removeSignatureListener(nextSubscriptionId);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
subscriptionId = nextSubscriptionId;
|
|
138
|
+
} catch (cause) {
|
|
139
|
+
if (requestId === subscriptionStartId) {
|
|
140
|
+
error.value = cause;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function resetIntervals() {
|
|
145
|
+
startPolling();
|
|
146
|
+
void startSubscription();
|
|
147
|
+
}
|
|
148
|
+
vue.onMounted(() => {
|
|
149
|
+
void refresh().catch(() => void 0);
|
|
150
|
+
resetIntervals();
|
|
151
|
+
});
|
|
152
|
+
vue.onUnmounted(() => {
|
|
153
|
+
refreshId += 1;
|
|
154
|
+
stopPolling();
|
|
155
|
+
void stopSubscription();
|
|
156
|
+
});
|
|
157
|
+
vue.watch(
|
|
158
|
+
() => vue.toValue(signature),
|
|
159
|
+
() => {
|
|
160
|
+
void refresh().catch(() => void 0);
|
|
161
|
+
resetIntervals();
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
return {
|
|
165
|
+
status,
|
|
166
|
+
loading,
|
|
167
|
+
error,
|
|
168
|
+
refresh,
|
|
169
|
+
stopPolling,
|
|
170
|
+
stopSubscription
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function parseTransactionSignature(signature) {
|
|
174
|
+
let decodedSignature;
|
|
175
|
+
try {
|
|
176
|
+
decodedSignature = bs58__default.decode(signature);
|
|
177
|
+
} catch (cause) {
|
|
178
|
+
throw new TypeError("Invalid Solana transaction signature", { cause });
|
|
179
|
+
}
|
|
180
|
+
if (decodedSignature.length !== 64) {
|
|
181
|
+
throw new TypeError("Invalid Solana transaction signature");
|
|
182
|
+
}
|
|
183
|
+
return signature;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
exports.useSignatureStatus = useSignatureStatus;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import bs58 from 'bs58';
|
|
2
|
+
import { shallowRef, onMounted, onUnmounted, watch, toValue } from 'vue';
|
|
3
|
+
import { u as useConnection } from './vue.DlEAL2G8.mjs';
|
|
4
|
+
import { t as tryUseSolana } from './vue.1M_c5FWA.mjs';
|
|
5
|
+
|
|
6
|
+
function useSignatureStatus(signature, options = {}) {
|
|
7
|
+
const solana = tryUseSolana();
|
|
8
|
+
const connection = solana?.connection ?? useConnection();
|
|
9
|
+
const status = shallowRef(null);
|
|
10
|
+
const loading = shallowRef(false);
|
|
11
|
+
const error = shallowRef(null);
|
|
12
|
+
let refreshId = 0;
|
|
13
|
+
let subscriptionStartId = 0;
|
|
14
|
+
let pollId = null;
|
|
15
|
+
let subscriptionId = null;
|
|
16
|
+
let manuallyStoppedPolling = false;
|
|
17
|
+
let manuallyStoppedSubscription = false;
|
|
18
|
+
async function refresh() {
|
|
19
|
+
const requestId = ++refreshId;
|
|
20
|
+
const value = toValue(signature);
|
|
21
|
+
if (!value || !solana) {
|
|
22
|
+
status.value = null;
|
|
23
|
+
loading.value = false;
|
|
24
|
+
error.value = null;
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
loading.value = true;
|
|
28
|
+
error.value = null;
|
|
29
|
+
try {
|
|
30
|
+
const validSignature = parseTransactionSignature(value);
|
|
31
|
+
const response = await connection.getSignatureStatuses([validSignature], {
|
|
32
|
+
searchTransactionHistory: options.searchTransactionHistory
|
|
33
|
+
});
|
|
34
|
+
const nextStatus = response.value[0] ?? null;
|
|
35
|
+
if (requestId === refreshId) {
|
|
36
|
+
status.value = nextStatus;
|
|
37
|
+
}
|
|
38
|
+
return nextStatus;
|
|
39
|
+
} catch (cause) {
|
|
40
|
+
if (requestId === refreshId) {
|
|
41
|
+
status.value = null;
|
|
42
|
+
error.value = cause;
|
|
43
|
+
}
|
|
44
|
+
throw cause;
|
|
45
|
+
} finally {
|
|
46
|
+
if (requestId === refreshId) {
|
|
47
|
+
loading.value = false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function stopPolling() {
|
|
52
|
+
manuallyStoppedPolling = true;
|
|
53
|
+
stopCurrentPolling();
|
|
54
|
+
}
|
|
55
|
+
function stopCurrentPolling() {
|
|
56
|
+
if (pollId === null) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
clearInterval(pollId);
|
|
60
|
+
pollId = null;
|
|
61
|
+
}
|
|
62
|
+
function startPolling() {
|
|
63
|
+
stopCurrentPolling();
|
|
64
|
+
const value = toValue(signature);
|
|
65
|
+
if (manuallyStoppedPolling || !options.pollIntervalMs || !value || !solana) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (options.pollIntervalMs <= 0) {
|
|
69
|
+
error.value = new RangeError("pollIntervalMs must be greater than 0");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
parseTransactionSignature(value);
|
|
74
|
+
} catch (cause) {
|
|
75
|
+
error.value = cause;
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
pollId = setInterval(() => {
|
|
79
|
+
void refresh().catch(() => void 0);
|
|
80
|
+
}, options.pollIntervalMs);
|
|
81
|
+
}
|
|
82
|
+
async function stopSubscription() {
|
|
83
|
+
manuallyStoppedSubscription = true;
|
|
84
|
+
subscriptionStartId += 1;
|
|
85
|
+
await stopCurrentSubscription();
|
|
86
|
+
}
|
|
87
|
+
async function stopCurrentSubscription() {
|
|
88
|
+
if (subscriptionId === null) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const currentSubscriptionId = subscriptionId;
|
|
92
|
+
subscriptionId = null;
|
|
93
|
+
try {
|
|
94
|
+
await connection.removeSignatureListener(currentSubscriptionId);
|
|
95
|
+
} catch (cause) {
|
|
96
|
+
error.value = cause;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async function startSubscription() {
|
|
100
|
+
const requestId = ++subscriptionStartId;
|
|
101
|
+
await stopCurrentSubscription();
|
|
102
|
+
if (requestId !== subscriptionStartId) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const value = toValue(signature);
|
|
106
|
+
if (manuallyStoppedSubscription || !options.subscribe || !value || !solana) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
try {
|
|
110
|
+
const validSignature = parseTransactionSignature(value);
|
|
111
|
+
const nextSubscriptionId = connection.onSignature(
|
|
112
|
+
validSignature,
|
|
113
|
+
(notification, context) => {
|
|
114
|
+
if (requestId !== subscriptionStartId) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
status.value = {
|
|
118
|
+
slot: context.slot,
|
|
119
|
+
confirmations: null,
|
|
120
|
+
err: notification.err,
|
|
121
|
+
confirmationStatus: options.commitment ?? "confirmed"
|
|
122
|
+
};
|
|
123
|
+
error.value = null;
|
|
124
|
+
},
|
|
125
|
+
options.commitment
|
|
126
|
+
);
|
|
127
|
+
if (requestId !== subscriptionStartId) {
|
|
128
|
+
await connection.removeSignatureListener(nextSubscriptionId);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
subscriptionId = nextSubscriptionId;
|
|
132
|
+
} catch (cause) {
|
|
133
|
+
if (requestId === subscriptionStartId) {
|
|
134
|
+
error.value = cause;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function resetIntervals() {
|
|
139
|
+
startPolling();
|
|
140
|
+
void startSubscription();
|
|
141
|
+
}
|
|
142
|
+
onMounted(() => {
|
|
143
|
+
void refresh().catch(() => void 0);
|
|
144
|
+
resetIntervals();
|
|
145
|
+
});
|
|
146
|
+
onUnmounted(() => {
|
|
147
|
+
refreshId += 1;
|
|
148
|
+
stopPolling();
|
|
149
|
+
void stopSubscription();
|
|
150
|
+
});
|
|
151
|
+
watch(
|
|
152
|
+
() => toValue(signature),
|
|
153
|
+
() => {
|
|
154
|
+
void refresh().catch(() => void 0);
|
|
155
|
+
resetIntervals();
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
return {
|
|
159
|
+
status,
|
|
160
|
+
loading,
|
|
161
|
+
error,
|
|
162
|
+
refresh,
|
|
163
|
+
stopPolling,
|
|
164
|
+
stopSubscription
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function parseTransactionSignature(signature) {
|
|
168
|
+
let decodedSignature;
|
|
169
|
+
try {
|
|
170
|
+
decodedSignature = bs58.decode(signature);
|
|
171
|
+
} catch (cause) {
|
|
172
|
+
throw new TypeError("Invalid Solana transaction signature", { cause });
|
|
173
|
+
}
|
|
174
|
+
if (decodedSignature.length !== 64) {
|
|
175
|
+
throw new TypeError("Invalid Solana transaction signature");
|
|
176
|
+
}
|
|
177
|
+
return signature;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export { useSignatureStatus as u };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const address = require('@vue-solana/core/address');
|
|
4
|
+
const vue = require('vue');
|
|
5
|
+
const useConnection = require('./vue.CwhEmATP.cjs');
|
|
6
|
+
const useSolana = require('./vue.C4tLiG3R.cjs');
|
|
7
|
+
|
|
8
|
+
function useProgramAccounts(programId, options = {}) {
|
|
9
|
+
const solana = useSolana.tryUseSolana();
|
|
10
|
+
const connection = solana?.connection ?? useConnection.useConnection();
|
|
11
|
+
const accounts = vue.shallowRef([]);
|
|
12
|
+
const loading = vue.shallowRef(false);
|
|
13
|
+
const error = vue.shallowRef(null);
|
|
14
|
+
let refreshId = 0;
|
|
15
|
+
async function refresh() {
|
|
16
|
+
const requestId = ++refreshId;
|
|
17
|
+
const value = vue.toValue(programId);
|
|
18
|
+
if (!value || !solana) {
|
|
19
|
+
accounts.value = [];
|
|
20
|
+
loading.value = false;
|
|
21
|
+
error.value = null;
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
loading.value = true;
|
|
25
|
+
error.value = null;
|
|
26
|
+
try {
|
|
27
|
+
const publicKey = address.parsePublicKey(value);
|
|
28
|
+
if (!publicKey) {
|
|
29
|
+
accounts.value = [];
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
const nextAccounts = await connection.getProgramAccounts(publicKey, {
|
|
33
|
+
commitment: options.commitment,
|
|
34
|
+
dataSlice: options.dataSlice,
|
|
35
|
+
filters: options.filters
|
|
36
|
+
});
|
|
37
|
+
if (requestId === refreshId) {
|
|
38
|
+
accounts.value = nextAccounts;
|
|
39
|
+
}
|
|
40
|
+
return nextAccounts;
|
|
41
|
+
} catch (cause) {
|
|
42
|
+
if (requestId === refreshId) {
|
|
43
|
+
accounts.value = [];
|
|
44
|
+
error.value = cause;
|
|
45
|
+
}
|
|
46
|
+
throw cause;
|
|
47
|
+
} finally {
|
|
48
|
+
if (requestId === refreshId) {
|
|
49
|
+
loading.value = false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
vue.onMounted(() => {
|
|
54
|
+
void refresh().catch(() => void 0);
|
|
55
|
+
});
|
|
56
|
+
vue.onUnmounted(() => {
|
|
57
|
+
refreshId += 1;
|
|
58
|
+
});
|
|
59
|
+
vue.watch(
|
|
60
|
+
() => vue.toValue(programId),
|
|
61
|
+
() => {
|
|
62
|
+
void refresh().catch(() => void 0);
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
return {
|
|
66
|
+
accounts,
|
|
67
|
+
loading,
|
|
68
|
+
error,
|
|
69
|
+
refresh
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
exports.useProgramAccounts = useProgramAccounts;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const useAccountInfo = require('./shared/vue.BPnK_lsh.cjs');
|
|
4
|
+
require('@vue-solana/core/address');
|
|
5
|
+
require('vue');
|
|
6
|
+
require('./shared/vue.CwhEmATP.cjs');
|
|
7
|
+
require('./shared/vue.COyyrsQU.cjs');
|
|
8
|
+
require('./shared/vue.C4tLiG3R.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.useAccountInfo = useAccountInfo.useAccountInfo;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
|
+
import { Commitment } from '@solana/web3-compat';
|
|
5
|
+
|
|
6
|
+
interface UseAccountInfoOptions {
|
|
7
|
+
commitment?: Commitment;
|
|
8
|
+
watch?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function useAccountInfo(address: MaybeRefOrGetter<PublicKeyInput>, options?: UseAccountInfoOptions): {
|
|
11
|
+
accountInfo: any;
|
|
12
|
+
loading: vue.ShallowRef<boolean, boolean>;
|
|
13
|
+
error: vue.ShallowRef<unknown, unknown>;
|
|
14
|
+
refresh: () => Promise<any>;
|
|
15
|
+
stopWatching: () => Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { useAccountInfo };
|
|
19
|
+
export type { UseAccountInfoOptions };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
|
+
import { Commitment } from '@solana/web3-compat';
|
|
5
|
+
|
|
6
|
+
interface UseAccountInfoOptions {
|
|
7
|
+
commitment?: Commitment;
|
|
8
|
+
watch?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function useAccountInfo(address: MaybeRefOrGetter<PublicKeyInput>, options?: UseAccountInfoOptions): {
|
|
11
|
+
accountInfo: any;
|
|
12
|
+
loading: vue.ShallowRef<boolean, boolean>;
|
|
13
|
+
error: vue.ShallowRef<unknown, unknown>;
|
|
14
|
+
refresh: () => Promise<any>;
|
|
15
|
+
stopWatching: () => Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { useAccountInfo };
|
|
19
|
+
export type { UseAccountInfoOptions };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
|
+
import { Commitment } from '@solana/web3-compat';
|
|
5
|
+
|
|
6
|
+
interface UseAccountInfoOptions {
|
|
7
|
+
commitment?: Commitment;
|
|
8
|
+
watch?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function useAccountInfo(address: MaybeRefOrGetter<PublicKeyInput>, options?: UseAccountInfoOptions): {
|
|
11
|
+
accountInfo: any;
|
|
12
|
+
loading: vue.ShallowRef<boolean, boolean>;
|
|
13
|
+
error: vue.ShallowRef<unknown, unknown>;
|
|
14
|
+
refresh: () => Promise<any>;
|
|
15
|
+
stopWatching: () => Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { useAccountInfo };
|
|
19
|
+
export type { UseAccountInfoOptions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const useProgramAccounts = require('./shared/vue.dmuispJ3.cjs');
|
|
4
|
+
require('@vue-solana/core/address');
|
|
5
|
+
require('vue');
|
|
6
|
+
require('./shared/vue.CwhEmATP.cjs');
|
|
7
|
+
require('./shared/vue.COyyrsQU.cjs');
|
|
8
|
+
require('./shared/vue.C4tLiG3R.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.useProgramAccounts = useProgramAccounts.useProgramAccounts;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
|
+
import { PublicKey, AccountInfo, Commitment } from '@solana/web3-compat';
|
|
5
|
+
|
|
6
|
+
type ProgramAccountMemcmpEncoding = "base58" | "base64" | "base64+zstd" | "bytes";
|
|
7
|
+
type ProgramAccountMemcmpFilter = {
|
|
8
|
+
memcmp: {
|
|
9
|
+
offset: number;
|
|
10
|
+
bytes: string;
|
|
11
|
+
encoding?: ProgramAccountMemcmpEncoding;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type ProgramAccountDataSizeFilter = {
|
|
15
|
+
dataSize: number;
|
|
16
|
+
};
|
|
17
|
+
type ProgramAccountFilter = ProgramAccountMemcmpFilter | ProgramAccountDataSizeFilter;
|
|
18
|
+
interface ProgramAccountDataSlice {
|
|
19
|
+
offset: number;
|
|
20
|
+
length: number;
|
|
21
|
+
}
|
|
22
|
+
interface UseProgramAccountsOptions {
|
|
23
|
+
commitment?: Commitment;
|
|
24
|
+
dataSlice?: ProgramAccountDataSlice;
|
|
25
|
+
filters?: ProgramAccountFilter[];
|
|
26
|
+
}
|
|
27
|
+
interface ProgramAccount<TData extends Buffer = Buffer> {
|
|
28
|
+
pubkey: PublicKey;
|
|
29
|
+
account: AccountInfo<TData>;
|
|
30
|
+
}
|
|
31
|
+
declare function useProgramAccounts(programId: MaybeRefOrGetter<PublicKeyInput>, options?: UseProgramAccountsOptions): {
|
|
32
|
+
accounts: vue.ShallowRef<ProgramAccount<Buffer<ArrayBufferLike>>[], ProgramAccount<Buffer<ArrayBufferLike>>[]>;
|
|
33
|
+
loading: vue.ShallowRef<boolean, boolean>;
|
|
34
|
+
error: vue.ShallowRef<unknown, unknown>;
|
|
35
|
+
refresh: () => Promise<ProgramAccount<Buffer<ArrayBufferLike>>[]>;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { useProgramAccounts };
|
|
39
|
+
export type { ProgramAccount, ProgramAccountDataSizeFilter, ProgramAccountDataSlice, ProgramAccountFilter, ProgramAccountMemcmpEncoding, ProgramAccountMemcmpFilter, UseProgramAccountsOptions };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
|
+
import { PublicKey, AccountInfo, Commitment } from '@solana/web3-compat';
|
|
5
|
+
|
|
6
|
+
type ProgramAccountMemcmpEncoding = "base58" | "base64" | "base64+zstd" | "bytes";
|
|
7
|
+
type ProgramAccountMemcmpFilter = {
|
|
8
|
+
memcmp: {
|
|
9
|
+
offset: number;
|
|
10
|
+
bytes: string;
|
|
11
|
+
encoding?: ProgramAccountMemcmpEncoding;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type ProgramAccountDataSizeFilter = {
|
|
15
|
+
dataSize: number;
|
|
16
|
+
};
|
|
17
|
+
type ProgramAccountFilter = ProgramAccountMemcmpFilter | ProgramAccountDataSizeFilter;
|
|
18
|
+
interface ProgramAccountDataSlice {
|
|
19
|
+
offset: number;
|
|
20
|
+
length: number;
|
|
21
|
+
}
|
|
22
|
+
interface UseProgramAccountsOptions {
|
|
23
|
+
commitment?: Commitment;
|
|
24
|
+
dataSlice?: ProgramAccountDataSlice;
|
|
25
|
+
filters?: ProgramAccountFilter[];
|
|
26
|
+
}
|
|
27
|
+
interface ProgramAccount<TData extends Buffer = Buffer> {
|
|
28
|
+
pubkey: PublicKey;
|
|
29
|
+
account: AccountInfo<TData>;
|
|
30
|
+
}
|
|
31
|
+
declare function useProgramAccounts(programId: MaybeRefOrGetter<PublicKeyInput>, options?: UseProgramAccountsOptions): {
|
|
32
|
+
accounts: vue.ShallowRef<ProgramAccount<Buffer<ArrayBufferLike>>[], ProgramAccount<Buffer<ArrayBufferLike>>[]>;
|
|
33
|
+
loading: vue.ShallowRef<boolean, boolean>;
|
|
34
|
+
error: vue.ShallowRef<unknown, unknown>;
|
|
35
|
+
refresh: () => Promise<ProgramAccount<Buffer<ArrayBufferLike>>[]>;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { useProgramAccounts };
|
|
39
|
+
export type { ProgramAccount, ProgramAccountDataSizeFilter, ProgramAccountDataSlice, ProgramAccountFilter, ProgramAccountMemcmpEncoding, ProgramAccountMemcmpFilter, UseProgramAccountsOptions };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
|
+
import { PublicKey, AccountInfo, Commitment } from '@solana/web3-compat';
|
|
5
|
+
|
|
6
|
+
type ProgramAccountMemcmpEncoding = "base58" | "base64" | "base64+zstd" | "bytes";
|
|
7
|
+
type ProgramAccountMemcmpFilter = {
|
|
8
|
+
memcmp: {
|
|
9
|
+
offset: number;
|
|
10
|
+
bytes: string;
|
|
11
|
+
encoding?: ProgramAccountMemcmpEncoding;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type ProgramAccountDataSizeFilter = {
|
|
15
|
+
dataSize: number;
|
|
16
|
+
};
|
|
17
|
+
type ProgramAccountFilter = ProgramAccountMemcmpFilter | ProgramAccountDataSizeFilter;
|
|
18
|
+
interface ProgramAccountDataSlice {
|
|
19
|
+
offset: number;
|
|
20
|
+
length: number;
|
|
21
|
+
}
|
|
22
|
+
interface UseProgramAccountsOptions {
|
|
23
|
+
commitment?: Commitment;
|
|
24
|
+
dataSlice?: ProgramAccountDataSlice;
|
|
25
|
+
filters?: ProgramAccountFilter[];
|
|
26
|
+
}
|
|
27
|
+
interface ProgramAccount<TData extends Buffer = Buffer> {
|
|
28
|
+
pubkey: PublicKey;
|
|
29
|
+
account: AccountInfo<TData>;
|
|
30
|
+
}
|
|
31
|
+
declare function useProgramAccounts(programId: MaybeRefOrGetter<PublicKeyInput>, options?: UseProgramAccountsOptions): {
|
|
32
|
+
accounts: vue.ShallowRef<ProgramAccount<Buffer<ArrayBufferLike>>[], ProgramAccount<Buffer<ArrayBufferLike>>[]>;
|
|
33
|
+
loading: vue.ShallowRef<boolean, boolean>;
|
|
34
|
+
error: vue.ShallowRef<unknown, unknown>;
|
|
35
|
+
refresh: () => Promise<ProgramAccount<Buffer<ArrayBufferLike>>[]>;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { useProgramAccounts };
|
|
39
|
+
export type { ProgramAccount, ProgramAccountDataSizeFilter, ProgramAccountDataSlice, ProgramAccountFilter, ProgramAccountMemcmpEncoding, ProgramAccountMemcmpFilter, UseProgramAccountsOptions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const useSignatureStatus = require('./shared/vue.DUufwq8y.cjs');
|
|
4
|
+
require('bs58');
|
|
5
|
+
require('vue');
|
|
6
|
+
require('./shared/vue.CwhEmATP.cjs');
|
|
7
|
+
require('./shared/vue.COyyrsQU.cjs');
|
|
8
|
+
require('./shared/vue.C4tLiG3R.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.useSignatureStatus = useSignatureStatus.useSignatureStatus;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import { Commitment, TransactionSignature } from '@solana/web3-compat';
|
|
4
|
+
|
|
5
|
+
interface UseSignatureStatusOptions {
|
|
6
|
+
commitment?: Commitment;
|
|
7
|
+
pollIntervalMs?: number;
|
|
8
|
+
searchTransactionHistory?: boolean;
|
|
9
|
+
subscribe?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function useSignatureStatus(signature: MaybeRefOrGetter<TransactionSignature | null | undefined>, options?: UseSignatureStatusOptions): {
|
|
12
|
+
status: any;
|
|
13
|
+
loading: vue.ShallowRef<boolean, boolean>;
|
|
14
|
+
error: vue.ShallowRef<unknown, unknown>;
|
|
15
|
+
refresh: () => Promise<any>;
|
|
16
|
+
stopPolling: () => void;
|
|
17
|
+
stopSubscription: () => Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { useSignatureStatus };
|
|
21
|
+
export type { UseSignatureStatusOptions };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import { Commitment, TransactionSignature } from '@solana/web3-compat';
|
|
4
|
+
|
|
5
|
+
interface UseSignatureStatusOptions {
|
|
6
|
+
commitment?: Commitment;
|
|
7
|
+
pollIntervalMs?: number;
|
|
8
|
+
searchTransactionHistory?: boolean;
|
|
9
|
+
subscribe?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function useSignatureStatus(signature: MaybeRefOrGetter<TransactionSignature | null | undefined>, options?: UseSignatureStatusOptions): {
|
|
12
|
+
status: any;
|
|
13
|
+
loading: vue.ShallowRef<boolean, boolean>;
|
|
14
|
+
error: vue.ShallowRef<unknown, unknown>;
|
|
15
|
+
refresh: () => Promise<any>;
|
|
16
|
+
stopPolling: () => void;
|
|
17
|
+
stopSubscription: () => Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { useSignatureStatus };
|
|
21
|
+
export type { UseSignatureStatusOptions };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import { Commitment, TransactionSignature } from '@solana/web3-compat';
|
|
4
|
+
|
|
5
|
+
interface UseSignatureStatusOptions {
|
|
6
|
+
commitment?: Commitment;
|
|
7
|
+
pollIntervalMs?: number;
|
|
8
|
+
searchTransactionHistory?: boolean;
|
|
9
|
+
subscribe?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function useSignatureStatus(signature: MaybeRefOrGetter<TransactionSignature | null | undefined>, options?: UseSignatureStatusOptions): {
|
|
12
|
+
status: any;
|
|
13
|
+
loading: vue.ShallowRef<boolean, boolean>;
|
|
14
|
+
error: vue.ShallowRef<unknown, unknown>;
|
|
15
|
+
refresh: () => Promise<any>;
|
|
16
|
+
stopPolling: () => void;
|
|
17
|
+
stopSubscription: () => Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { useSignatureStatus };
|
|
21
|
+
export type { UseSignatureStatusOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-solana/vue",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Vue plugin and composables for Solana applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -45,11 +45,21 @@
|
|
|
45
45
|
"import": "./dist/useConnection.mjs",
|
|
46
46
|
"require": "./dist/useConnection.cjs"
|
|
47
47
|
},
|
|
48
|
+
"./useAccountInfo": {
|
|
49
|
+
"types": "./dist/useAccountInfo.d.ts",
|
|
50
|
+
"import": "./dist/useAccountInfo.mjs",
|
|
51
|
+
"require": "./dist/useAccountInfo.cjs"
|
|
52
|
+
},
|
|
48
53
|
"./useBalance": {
|
|
49
54
|
"types": "./dist/useBalance.d.ts",
|
|
50
55
|
"import": "./dist/useBalance.mjs",
|
|
51
56
|
"require": "./dist/useBalance.cjs"
|
|
52
57
|
},
|
|
58
|
+
"./useProgramAccounts": {
|
|
59
|
+
"types": "./dist/useProgramAccounts.d.ts",
|
|
60
|
+
"import": "./dist/useProgramAccounts.mjs",
|
|
61
|
+
"require": "./dist/useProgramAccounts.cjs"
|
|
62
|
+
},
|
|
53
63
|
"./useWallet": {
|
|
54
64
|
"types": "./dist/useWallet.d.ts",
|
|
55
65
|
"import": "./dist/useWallet.mjs",
|
|
@@ -70,6 +80,11 @@
|
|
|
70
80
|
"import": "./dist/useTransactionConfirmation.mjs",
|
|
71
81
|
"require": "./dist/useTransactionConfirmation.cjs"
|
|
72
82
|
},
|
|
83
|
+
"./useSignatureStatus": {
|
|
84
|
+
"types": "./dist/useSignatureStatus.d.ts",
|
|
85
|
+
"import": "./dist/useSignatureStatus.mjs",
|
|
86
|
+
"require": "./dist/useSignatureStatus.cjs"
|
|
87
|
+
},
|
|
73
88
|
"./useSignAndSendTransaction": {
|
|
74
89
|
"types": "./dist/useSignAndSendTransaction.d.ts",
|
|
75
90
|
"import": "./dist/useSignAndSendTransaction.mjs",
|
|
@@ -83,7 +98,8 @@
|
|
|
83
98
|
"access": "public"
|
|
84
99
|
},
|
|
85
100
|
"dependencies": {
|
|
86
|
-
"
|
|
101
|
+
"bs58": "^6.0.0",
|
|
102
|
+
"@vue-solana/core": "0.5.1"
|
|
87
103
|
},
|
|
88
104
|
"peerDependencies": {
|
|
89
105
|
"@solana/web3-compat": "^0.0.21",
|