@vue-solana/vue 1.0.0 → 1.2.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/dist/buffer-polyfill.d.cts +1 -0
- package/dist/buffer-polyfill.d.mts +1 -0
- package/dist/buffer-polyfill.d.ts +1 -0
- package/dist/index.cjs +23 -12
- package/dist/index.d.cts +7 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.mjs +18 -13
- package/dist/kit.cjs +9 -0
- package/dist/kit.d.cts +1 -0
- package/dist/kit.d.mts +1 -0
- package/dist/kit.d.ts +1 -0
- package/dist/kit.mjs +1 -0
- package/dist/shared/{vue.DZWyk9E_.mjs → vue.B12Pt1PQ.mjs} +2 -2
- package/dist/shared/{vue.BleajB0B.cjs → vue.B14U1xmP.cjs} +2 -2
- package/dist/shared/{vue.B7w1CC4R.mjs → vue.B2AQR2bE.mjs} +1 -1
- package/dist/shared/{vue.eNXmiI3a.cjs → vue.BE4KHksm.cjs} +3 -2
- package/dist/shared/{vue.o-mWY2Yg.cjs → vue.BEesxsrA.cjs} +1 -1
- package/dist/shared/vue.BbX3ePDY.cjs +73 -0
- package/dist/shared/{vue.CXNFQf3l.cjs → vue.Bhdhmz8d.cjs} +2 -2
- package/dist/shared/{vue.D6U1RFZ0.cjs → vue.BsD6AAmO.cjs} +2 -2
- package/dist/shared/{vue.ChnRkpDR.mjs → vue.BtUKvuQw.mjs} +1 -1
- package/dist/shared/vue.By1CUlOU.mjs +8 -0
- package/dist/shared/{vue.CZohWxBN.cjs → vue.ByUemLSf.cjs} +1 -1
- package/dist/shared/{vue.Dp894nYb.cjs → vue.C0uCLjJ6.cjs} +1 -1
- package/dist/shared/vue.CKTUFwSI.mjs +71 -0
- package/dist/shared/{vue.BBNHeOeb.mjs → vue.CM_uqVc0.mjs} +3 -3
- package/dist/shared/vue.COPnX5fq.cjs +10 -0
- package/dist/shared/{vue.BTN0h5Il.mjs → vue.CPjEwHSg.mjs} +2 -2
- package/dist/shared/{vue.vn--SX8d.mjs → vue.CSzg70vB.mjs} +1 -1
- package/dist/shared/{vue.DCDTsSjf.mjs → vue.CYKT65tB.mjs} +3 -2
- package/dist/shared/{vue.DgPfVZnU.mjs → vue.CfrVAzEf.mjs} +2 -2
- package/dist/shared/vue.D0ycWj82.mjs +74 -0
- package/dist/shared/{vue.Bii4W61L.cjs → vue.DCgByzxg.cjs} +1 -1
- package/dist/shared/{vue.DOpWV4b3.mjs → vue.DDxhSi72.mjs} +2 -2
- package/dist/shared/{vue.Cvg6TEXE.mjs → vue.DFbay4mm.mjs} +1 -1
- package/dist/shared/{vue.CKx4lRew.mjs → vue.DiNn3XHm.mjs} +1 -1
- package/dist/shared/{vue.CMJANJ4a.cjs → vue.DzKfcfpX.cjs} +3 -3
- package/dist/shared/{vue.D5Kmwcx3.cjs → vue.G9t8pE0J.cjs} +1 -1
- package/dist/shared/{vue.C5C3l0RQ.cjs → vue.LNhX07HB.cjs} +1 -1
- package/dist/shared/{vue.DaoqgzJC.mjs → vue.QHAHFnw8.mjs} +1 -1
- package/dist/shared/{vue.CKXhlRu-.cjs → vue._CAClzAz.cjs} +2 -2
- package/dist/shared/vue.j1vB3h1n.cjs +76 -0
- package/dist/useAccountInfo.cjs +4 -4
- package/dist/useAccountInfo.mjs +4 -4
- package/dist/useBalance.cjs +4 -4
- package/dist/useBalance.mjs +4 -4
- package/dist/useConnection.cjs +3 -3
- package/dist/useConnection.mjs +3 -3
- package/dist/useProgramAccounts.cjs +4 -4
- package/dist/useProgramAccounts.mjs +4 -4
- package/dist/useRpc.cjs +2 -2
- package/dist/useRpc.mjs +2 -2
- package/dist/useSignAndSendTransaction.cjs +6 -6
- 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.mjs +4 -4
- package/dist/useSolana.cjs +1 -1
- package/dist/useSolana.mjs +1 -1
- package/dist/useSolanaClient.cjs +9 -0
- package/dist/useSolanaClient.d.cts +11 -0
- package/dist/useSolanaClient.d.mts +11 -0
- package/dist/useSolanaClient.d.ts +11 -0
- package/dist/useSolanaClient.mjs +3 -0
- package/dist/useTokenAccounts.cjs +14 -0
- package/dist/useTokenAccounts.d.cts +19 -0
- package/dist/useTokenAccounts.d.mts +19 -0
- package/dist/useTokenAccounts.d.ts +19 -0
- package/dist/useTokenAccounts.mjs +8 -0
- package/dist/useTokenBalance.cjs +14 -0
- package/dist/useTokenBalance.d.cts +15 -0
- package/dist/useTokenBalance.d.mts +15 -0
- package/dist/useTokenBalance.d.ts +15 -0
- package/dist/useTokenBalance.mjs +8 -0
- package/dist/useTransactionConfirmation.cjs +4 -4
- package/dist/useTransactionConfirmation.mjs +4 -4
- package/dist/useWallet.cjs +2 -2
- package/dist/useWallet.mjs +2 -2
- package/dist/useWallets.cjs +2 -2
- package/dist/useWallets.mjs +2 -2
- package/package.json +22 -2
package/dist/index.cjs
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const useAccountInfo = require('./shared/vue.
|
|
4
|
-
const useBalance = require('./shared/vue.
|
|
5
|
-
const useConnection = require('./shared/vue.
|
|
6
|
-
const useProgramAccounts = require('./shared/vue.
|
|
7
|
-
const useRpc = require('./shared/vue.
|
|
8
|
-
const useSignMessage = require('./shared/vue.
|
|
9
|
-
const useSignAndSendTransaction = require('./shared/vue.
|
|
10
|
-
const useSignatureStatus = require('./shared/vue.
|
|
11
|
-
const useSolana = require('./shared/vue.
|
|
3
|
+
const useAccountInfo = require('./shared/vue._CAClzAz.cjs');
|
|
4
|
+
const useBalance = require('./shared/vue.BsD6AAmO.cjs');
|
|
5
|
+
const useConnection = require('./shared/vue.DCgByzxg.cjs');
|
|
6
|
+
const useProgramAccounts = require('./shared/vue.B14U1xmP.cjs');
|
|
7
|
+
const useRpc = require('./shared/vue.LNhX07HB.cjs');
|
|
8
|
+
const useSignMessage = require('./shared/vue.C0uCLjJ6.cjs');
|
|
9
|
+
const useSignAndSendTransaction = require('./shared/vue.DzKfcfpX.cjs');
|
|
10
|
+
const useSignatureStatus = require('./shared/vue.Bhdhmz8d.cjs');
|
|
11
|
+
const useSolana = require('./shared/vue.BE4KHksm.cjs');
|
|
12
|
+
const useSolanaClient = require('./shared/vue.COPnX5fq.cjs');
|
|
13
|
+
const useTokenAccounts = require('./shared/vue.BbX3ePDY.cjs');
|
|
14
|
+
const useTokenBalance = require('./shared/vue.j1vB3h1n.cjs');
|
|
12
15
|
const useTransaction = require('./shared/vue.CE5i8KZZ.cjs');
|
|
13
|
-
const useTransactionConfirmation = require('./shared/vue.
|
|
14
|
-
const useWallet = require('./shared/vue.
|
|
15
|
-
const useWallets = require('./shared/vue.
|
|
16
|
+
const useTransactionConfirmation = require('./shared/vue.ByUemLSf.cjs');
|
|
17
|
+
const useWallet = require('./shared/vue.BEesxsrA.cjs');
|
|
18
|
+
const useWallets = require('./shared/vue.G9t8pE0J.cjs');
|
|
19
|
+
const kit = require('@vue-solana/core/kit');
|
|
16
20
|
const errors = require('@vue-solana/core/errors');
|
|
17
21
|
const rpc = require('@vue-solana/core/rpc');
|
|
18
22
|
const timeout = require('@vue-solana/core/timeout');
|
|
@@ -23,6 +27,7 @@ require('@vue-solana/core/address');
|
|
|
23
27
|
require('@vue-solana/core/wallet');
|
|
24
28
|
require('@vue-solana/core/transaction');
|
|
25
29
|
require('bs58');
|
|
30
|
+
require('@vue-solana/core/token-accounts');
|
|
26
31
|
|
|
27
32
|
const SELECTED_WALLET_STORAGE_KEY = "vue-solana:selected-wallet";
|
|
28
33
|
function readSelectedWallet() {
|
|
@@ -369,10 +374,16 @@ exports.useSignatureStatus = useSignatureStatus.useSignatureStatus;
|
|
|
369
374
|
exports.solanaInjectionKey = useSolana.solanaInjectionKey;
|
|
370
375
|
exports.tryUseSolana = useSolana.tryUseSolana;
|
|
371
376
|
exports.useSolana = useSolana.useSolana;
|
|
377
|
+
exports.useSolanaClient = useSolanaClient.useSolanaClient;
|
|
378
|
+
exports.useTokenAccounts = useTokenAccounts.useTokenAccounts;
|
|
379
|
+
exports.useTokenBalance = useTokenBalance.useTokenBalance;
|
|
372
380
|
exports.useTransaction = useTransaction.useTransaction;
|
|
373
381
|
exports.getConfirmedTransactionStatus = useTransactionConfirmation.getConfirmedTransactionStatus;
|
|
374
382
|
exports.useTransactionConfirmation = useTransactionConfirmation.useTransactionConfirmation;
|
|
375
383
|
exports.useWallet = useWallet.useWallet;
|
|
376
384
|
exports.useWallets = useWallets.useWallets;
|
|
385
|
+
exports.address = kit.address;
|
|
386
|
+
exports.createSolanaClient = kit.createSolanaClient;
|
|
387
|
+
exports.lamports = kit.lamports;
|
|
377
388
|
exports.VueSolana = VueSolana;
|
|
378
389
|
exports.createSolanaPlugin = createSolanaPlugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -7,11 +7,15 @@ export { SignMessageStatus, useSignMessage } from './useSignMessage.cjs';
|
|
|
7
7
|
export { SignAndSendTransactionOptions, SignAndSendTransactionStatus, useSignAndSendTransaction } from './useSignAndSendTransaction.cjs';
|
|
8
8
|
export { UseSignatureStatusOptions, useSignatureStatus } from './useSignatureStatus.cjs';
|
|
9
9
|
export { tryUseSolana, useSolana } from './useSolana.cjs';
|
|
10
|
+
export { useSolanaClient } from './useSolanaClient.cjs';
|
|
11
|
+
export { UseTokenAccountsOptions, useTokenAccounts } from './useTokenAccounts.cjs';
|
|
12
|
+
export { useTokenBalance } from './useTokenBalance.cjs';
|
|
10
13
|
export { UseTransactionOptions, useTransaction } from './useTransaction.cjs';
|
|
11
14
|
export { TransactionConfirmationStatus, getConfirmedTransactionStatus, useTransactionConfirmation } from './useTransactionConfirmation.cjs';
|
|
12
15
|
export { useWallet } from './useWallet.cjs';
|
|
13
16
|
export { useWallets } from './useWallets.cjs';
|
|
14
17
|
export { S as SolanaConnectionStatus, V as VueSolanaContext, s as solanaInjectionKey } from './shared/vue.DL3z5PxP.cjs';
|
|
18
|
+
export { Address, Lamports, Rpc, SolanaClient, SolanaRpcApi, address, createSolanaClient, lamports } from '@vue-solana/core/kit';
|
|
15
19
|
import { GetSolanaIosWalletsOptions } from '@vue-solana/core/ios-wallet';
|
|
16
20
|
import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-wallet';
|
|
17
21
|
import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
@@ -20,6 +24,9 @@ import '@vue-solana/core/address';
|
|
|
20
24
|
import '@vue-solana/core/errors';
|
|
21
25
|
import '@vue-solana/core/web3';
|
|
22
26
|
import '@solana/web3-compat';
|
|
27
|
+
import '@solana/kit';
|
|
28
|
+
import '@vue-solana/core/spl-token';
|
|
29
|
+
import '@vue-solana/core/token-accounts';
|
|
23
30
|
|
|
24
31
|
interface VueSolanaPluginOptions extends SolanaConfig {
|
|
25
32
|
wallet?: SolanaWallet | null;
|
package/dist/index.d.mts
CHANGED
|
@@ -7,11 +7,15 @@ export { SignMessageStatus, useSignMessage } from './useSignMessage.mjs';
|
|
|
7
7
|
export { SignAndSendTransactionOptions, SignAndSendTransactionStatus, useSignAndSendTransaction } from './useSignAndSendTransaction.mjs';
|
|
8
8
|
export { UseSignatureStatusOptions, useSignatureStatus } from './useSignatureStatus.mjs';
|
|
9
9
|
export { tryUseSolana, useSolana } from './useSolana.mjs';
|
|
10
|
+
export { useSolanaClient } from './useSolanaClient.mjs';
|
|
11
|
+
export { UseTokenAccountsOptions, useTokenAccounts } from './useTokenAccounts.mjs';
|
|
12
|
+
export { useTokenBalance } from './useTokenBalance.mjs';
|
|
10
13
|
export { UseTransactionOptions, useTransaction } from './useTransaction.mjs';
|
|
11
14
|
export { TransactionConfirmationStatus, getConfirmedTransactionStatus, useTransactionConfirmation } from './useTransactionConfirmation.mjs';
|
|
12
15
|
export { useWallet } from './useWallet.mjs';
|
|
13
16
|
export { useWallets } from './useWallets.mjs';
|
|
14
17
|
export { S as SolanaConnectionStatus, V as VueSolanaContext, s as solanaInjectionKey } from './shared/vue.DL3z5PxP.mjs';
|
|
18
|
+
export { Address, Lamports, Rpc, SolanaClient, SolanaRpcApi, address, createSolanaClient, lamports } from '@vue-solana/core/kit';
|
|
15
19
|
import { GetSolanaIosWalletsOptions } from '@vue-solana/core/ios-wallet';
|
|
16
20
|
import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-wallet';
|
|
17
21
|
import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
@@ -20,6 +24,9 @@ import '@vue-solana/core/address';
|
|
|
20
24
|
import '@vue-solana/core/errors';
|
|
21
25
|
import '@vue-solana/core/web3';
|
|
22
26
|
import '@solana/web3-compat';
|
|
27
|
+
import '@solana/kit';
|
|
28
|
+
import '@vue-solana/core/spl-token';
|
|
29
|
+
import '@vue-solana/core/token-accounts';
|
|
23
30
|
|
|
24
31
|
interface VueSolanaPluginOptions extends SolanaConfig {
|
|
25
32
|
wallet?: SolanaWallet | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,11 +7,15 @@ export { SignMessageStatus, useSignMessage } from './useSignMessage.js';
|
|
|
7
7
|
export { SignAndSendTransactionOptions, SignAndSendTransactionStatus, useSignAndSendTransaction } from './useSignAndSendTransaction.js';
|
|
8
8
|
export { UseSignatureStatusOptions, useSignatureStatus } from './useSignatureStatus.js';
|
|
9
9
|
export { tryUseSolana, useSolana } from './useSolana.js';
|
|
10
|
+
export { useSolanaClient } from './useSolanaClient.js';
|
|
11
|
+
export { UseTokenAccountsOptions, useTokenAccounts } from './useTokenAccounts.js';
|
|
12
|
+
export { useTokenBalance } from './useTokenBalance.js';
|
|
10
13
|
export { UseTransactionOptions, useTransaction } from './useTransaction.js';
|
|
11
14
|
export { TransactionConfirmationStatus, getConfirmedTransactionStatus, useTransactionConfirmation } from './useTransactionConfirmation.js';
|
|
12
15
|
export { useWallet } from './useWallet.js';
|
|
13
16
|
export { useWallets } from './useWallets.js';
|
|
14
17
|
export { S as SolanaConnectionStatus, V as VueSolanaContext, s as solanaInjectionKey } from './shared/vue.DL3z5PxP.js';
|
|
18
|
+
export { Address, Lamports, Rpc, SolanaClient, SolanaRpcApi, address, createSolanaClient, lamports } from '@vue-solana/core/kit';
|
|
15
19
|
import { GetSolanaIosWalletsOptions } from '@vue-solana/core/ios-wallet';
|
|
16
20
|
import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-wallet';
|
|
17
21
|
import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
@@ -20,6 +24,9 @@ import '@vue-solana/core/address';
|
|
|
20
24
|
import '@vue-solana/core/errors';
|
|
21
25
|
import '@vue-solana/core/web3';
|
|
22
26
|
import '@solana/web3-compat';
|
|
27
|
+
import '@solana/kit';
|
|
28
|
+
import '@vue-solana/core/spl-token';
|
|
29
|
+
import '@vue-solana/core/token-accounts';
|
|
23
30
|
|
|
24
31
|
interface VueSolanaPluginOptions extends SolanaConfig {
|
|
25
32
|
wallet?: SolanaWallet | null;
|
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
export { u as useAccountInfo } from './shared/vue.
|
|
2
|
-
export { u as useBalance } from './shared/vue.
|
|
3
|
-
export { u as useConnection } from './shared/vue.
|
|
4
|
-
export { u as useProgramAccounts } from './shared/vue.
|
|
5
|
-
export { u as useRpc } from './shared/vue.
|
|
6
|
-
export { u as useSignMessage } from './shared/vue.
|
|
7
|
-
export { u as useSignAndSendTransaction } from './shared/vue.
|
|
8
|
-
export { u as useSignatureStatus } from './shared/vue.
|
|
9
|
-
import { s as solanaInjectionKey } from './shared/vue.
|
|
10
|
-
export { t as tryUseSolana, u as useSolana } from './shared/vue.
|
|
1
|
+
export { u as useAccountInfo } from './shared/vue.CfrVAzEf.mjs';
|
|
2
|
+
export { u as useBalance } from './shared/vue.DDxhSi72.mjs';
|
|
3
|
+
export { u as useConnection } from './shared/vue.DiNn3XHm.mjs';
|
|
4
|
+
export { u as useProgramAccounts } from './shared/vue.CPjEwHSg.mjs';
|
|
5
|
+
export { u as useRpc } from './shared/vue.BtUKvuQw.mjs';
|
|
6
|
+
export { u as useSignMessage } from './shared/vue.CSzg70vB.mjs';
|
|
7
|
+
export { u as useSignAndSendTransaction } from './shared/vue.CM_uqVc0.mjs';
|
|
8
|
+
export { u as useSignatureStatus } from './shared/vue.B12Pt1PQ.mjs';
|
|
9
|
+
import { s as solanaInjectionKey } from './shared/vue.CYKT65tB.mjs';
|
|
10
|
+
export { t as tryUseSolana, u as useSolana } from './shared/vue.CYKT65tB.mjs';
|
|
11
|
+
export { u as useSolanaClient } from './shared/vue.By1CUlOU.mjs';
|
|
12
|
+
export { u as useTokenAccounts } from './shared/vue.CKTUFwSI.mjs';
|
|
13
|
+
export { u as useTokenBalance } from './shared/vue.D0ycWj82.mjs';
|
|
11
14
|
export { u as useTransaction } from './shared/vue.C4d2JA8U.mjs';
|
|
12
|
-
export { g as getConfirmedTransactionStatus, u as useTransactionConfirmation } from './shared/vue.
|
|
13
|
-
export { u as useWallet } from './shared/vue.
|
|
14
|
-
export { u as useWallets } from './shared/vue.
|
|
15
|
+
export { g as getConfirmedTransactionStatus, u as useTransactionConfirmation } from './shared/vue.QHAHFnw8.mjs';
|
|
16
|
+
export { u as useWallet } from './shared/vue.B2AQR2bE.mjs';
|
|
17
|
+
export { u as useWallets } from './shared/vue.DFbay4mm.mjs';
|
|
18
|
+
export { address, createSolanaClient, lamports } from '@vue-solana/core/kit';
|
|
15
19
|
import { createSolanaError, normalizeSolanaError } from '@vue-solana/core/errors';
|
|
16
20
|
import { createSolanaContext } from '@vue-solana/core/rpc';
|
|
17
21
|
import { withTimeout } from '@vue-solana/core/timeout';
|
|
@@ -22,6 +26,7 @@ import '@vue-solana/core/address';
|
|
|
22
26
|
import '@vue-solana/core/wallet';
|
|
23
27
|
import '@vue-solana/core/transaction';
|
|
24
28
|
import 'bs58';
|
|
29
|
+
import '@vue-solana/core/token-accounts';
|
|
25
30
|
|
|
26
31
|
const SELECTED_WALLET_STORAGE_KEY = "vue-solana:selected-wallet";
|
|
27
32
|
function readSelectedWallet() {
|
package/dist/kit.cjs
ADDED
package/dist/kit.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Address, Lamports, Rpc, SolanaClient, SolanaRpcApi, address, createSolanaClient, lamports } from '@vue-solana/core/kit';
|
package/dist/kit.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Address, Lamports, Rpc, SolanaClient, SolanaRpcApi, address, createSolanaClient, lamports } from '@vue-solana/core/kit';
|
package/dist/kit.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Address, Lamports, Rpc, SolanaClient, SolanaRpcApi, address, createSolanaClient, lamports } from '@vue-solana/core/kit';
|
package/dist/kit.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { address, createSolanaClient, lamports } from '@vue-solana/core/kit';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { normalizeSolanaError, createSolanaError } from '@vue-solana/core/errors';
|
|
2
2
|
import bs58 from 'bs58';
|
|
3
3
|
import { shallowRef, onMounted, onUnmounted, 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.DiNn3XHm.mjs';
|
|
5
|
+
import { t as tryUseSolana } from './vue.CYKT65tB.mjs';
|
|
6
6
|
|
|
7
7
|
function useSignatureStatus(signature, options = {}) {
|
|
8
8
|
const solana = tryUseSolana();
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const address = require('@vue-solana/core/address');
|
|
4
4
|
const errors = require('@vue-solana/core/errors');
|
|
5
5
|
const vue = require('vue');
|
|
6
|
-
const useConnection = require('./vue.
|
|
7
|
-
const useSolana = require('./vue.
|
|
6
|
+
const useConnection = require('./vue.DCgByzxg.cjs');
|
|
7
|
+
const useSolana = require('./vue.BE4KHksm.cjs');
|
|
8
8
|
|
|
9
9
|
function useProgramAccounts(programId, options = {}) {
|
|
10
10
|
const solana = useSolana.tryUseSolana();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
2
2
|
import { createNoWalletSelectedError } from '@vue-solana/core/wallet';
|
|
3
3
|
import { ref, computed, triggerRef } from 'vue';
|
|
4
|
-
import { u as useSolana } from './vue.
|
|
4
|
+
import { u as useSolana } from './vue.CYKT65tB.mjs';
|
|
5
5
|
|
|
6
6
|
function useWallet() {
|
|
7
7
|
const solana = useSolana();
|
|
@@ -18,7 +18,8 @@ function getSsrContext() {
|
|
|
18
18
|
cluster: "devnet",
|
|
19
19
|
endpoint: "",
|
|
20
20
|
wsEndpoint: "",
|
|
21
|
-
connection:
|
|
21
|
+
connection: createUnavailableProxy(),
|
|
22
|
+
client: createUnavailableProxy(),
|
|
22
23
|
wallet: vue.shallowRef(null),
|
|
23
24
|
status: vue.ref("idle"),
|
|
24
25
|
error: vue.ref(null),
|
|
@@ -36,7 +37,7 @@ function getSsrContext() {
|
|
|
36
37
|
};
|
|
37
38
|
return ssrContext;
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function createUnavailableProxy() {
|
|
40
41
|
return new Proxy(
|
|
41
42
|
{},
|
|
42
43
|
{
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const errors = require('@vue-solana/core/errors');
|
|
4
4
|
const wallet = require('@vue-solana/core/wallet');
|
|
5
5
|
const vue = require('vue');
|
|
6
|
-
const useSolana = require('./vue.
|
|
6
|
+
const useSolana = require('./vue.BE4KHksm.cjs');
|
|
7
7
|
|
|
8
8
|
function useWallet() {
|
|
9
9
|
const solana = useSolana.useSolana();
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const address = require('@vue-solana/core/address');
|
|
4
|
+
const errors = require('@vue-solana/core/errors');
|
|
5
|
+
const tokenAccounts = require('@vue-solana/core/token-accounts');
|
|
6
|
+
const vue = require('vue');
|
|
7
|
+
const useConnection = require('./vue.DCgByzxg.cjs');
|
|
8
|
+
const useSolana = require('./vue.BE4KHksm.cjs');
|
|
9
|
+
|
|
10
|
+
function useTokenAccounts(owner, options) {
|
|
11
|
+
const solana = useSolana.tryUseSolana();
|
|
12
|
+
const connection = solana?.connection ?? useConnection.useConnection();
|
|
13
|
+
const tokenAccounts$1 = vue.shallowRef([]);
|
|
14
|
+
const loading = vue.shallowRef(false);
|
|
15
|
+
const error = vue.shallowRef(null);
|
|
16
|
+
let refreshId = 0;
|
|
17
|
+
async function refresh() {
|
|
18
|
+
const requestId = ++refreshId;
|
|
19
|
+
const value = vue.toValue(owner);
|
|
20
|
+
if (!value || !solana) {
|
|
21
|
+
tokenAccounts$1.value = [];
|
|
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 = address.parsePublicKey(value);
|
|
30
|
+
if (!publicKey) {
|
|
31
|
+
tokenAccounts$1.value = [];
|
|
32
|
+
loading.value = false;
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
const opts = {
|
|
36
|
+
commitment: options?.commitment,
|
|
37
|
+
programId: options?.programId
|
|
38
|
+
};
|
|
39
|
+
const nextAccounts = await tokenAccounts.getTokenAccountsByOwner(connection, publicKey, opts);
|
|
40
|
+
if (requestId === refreshId) {
|
|
41
|
+
tokenAccounts$1.value = nextAccounts;
|
|
42
|
+
}
|
|
43
|
+
return nextAccounts;
|
|
44
|
+
} catch (cause) {
|
|
45
|
+
const normalizedError = errors.normalizeSolanaError(cause, "RPC_FAILURE");
|
|
46
|
+
if (requestId === refreshId) {
|
|
47
|
+
error.value = normalizedError;
|
|
48
|
+
}
|
|
49
|
+
throw normalizedError;
|
|
50
|
+
} finally {
|
|
51
|
+
if (requestId === refreshId) {
|
|
52
|
+
loading.value = false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
vue.onMounted(() => {
|
|
57
|
+
void refresh().catch(() => void 0);
|
|
58
|
+
});
|
|
59
|
+
vue.watch(
|
|
60
|
+
() => vue.toValue(owner),
|
|
61
|
+
() => {
|
|
62
|
+
void refresh().catch(() => void 0);
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
return {
|
|
66
|
+
tokenAccounts: tokenAccounts$1,
|
|
67
|
+
loading,
|
|
68
|
+
error,
|
|
69
|
+
refresh
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
exports.useTokenAccounts = useTokenAccounts;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const errors = require('@vue-solana/core/errors');
|
|
4
4
|
const bs58 = require('bs58');
|
|
5
5
|
const vue = require('vue');
|
|
6
|
-
const useConnection = require('./vue.
|
|
7
|
-
const useSolana = require('./vue.
|
|
6
|
+
const useConnection = require('./vue.DCgByzxg.cjs');
|
|
7
|
+
const useSolana = require('./vue.BE4KHksm.cjs');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const address = require('@vue-solana/core/address');
|
|
4
4
|
const errors = require('@vue-solana/core/errors');
|
|
5
5
|
const vue = require('vue');
|
|
6
|
-
const useConnection = require('./vue.
|
|
7
|
-
const useSolana = require('./vue.
|
|
6
|
+
const useConnection = require('./vue.DCgByzxg.cjs');
|
|
7
|
+
const useSolana = require('./vue.BE4KHksm.cjs');
|
|
8
8
|
|
|
9
9
|
function useBalance(address$1, commitment) {
|
|
10
10
|
const solana = useSolana.tryUseSolana();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const transaction = require('@vue-solana/core/transaction');
|
|
4
4
|
const errors = require('@vue-solana/core/errors');
|
|
5
5
|
const vue = require('vue');
|
|
6
|
-
const useConnection = require('./vue.
|
|
6
|
+
const useConnection = require('./vue.DCgByzxg.cjs');
|
|
7
7
|
|
|
8
8
|
function getConfirmedTransactionStatus(confirmation) {
|
|
9
9
|
if (confirmation.commitment === "finalized") {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const errors = require('@vue-solana/core/errors');
|
|
4
4
|
const wallet = require('@vue-solana/core/wallet');
|
|
5
5
|
const vue = require('vue');
|
|
6
|
-
const useWallet = require('./vue.
|
|
6
|
+
const useWallet = require('./vue.BEesxsrA.cjs');
|
|
7
7
|
|
|
8
8
|
function useSignMessage() {
|
|
9
9
|
const { wallet: wallet$1 } = useWallet.useWallet();
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { parsePublicKey } from '@vue-solana/core/address';
|
|
2
|
+
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
3
|
+
import { getTokenAccountsByOwner } from '@vue-solana/core/token-accounts';
|
|
4
|
+
import { shallowRef, onMounted, watch, toValue } from 'vue';
|
|
5
|
+
import { u as useConnection } from './vue.DiNn3XHm.mjs';
|
|
6
|
+
import { t as tryUseSolana } from './vue.CYKT65tB.mjs';
|
|
7
|
+
|
|
8
|
+
function useTokenAccounts(owner, options) {
|
|
9
|
+
const solana = tryUseSolana();
|
|
10
|
+
const connection = solana?.connection ?? useConnection();
|
|
11
|
+
const tokenAccounts = shallowRef([]);
|
|
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(owner);
|
|
18
|
+
if (!value || !solana) {
|
|
19
|
+
tokenAccounts.value = [];
|
|
20
|
+
loading.value = false;
|
|
21
|
+
error.value = null;
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
loading.value = true;
|
|
25
|
+
error.value = null;
|
|
26
|
+
try {
|
|
27
|
+
const publicKey = parsePublicKey(value);
|
|
28
|
+
if (!publicKey) {
|
|
29
|
+
tokenAccounts.value = [];
|
|
30
|
+
loading.value = false;
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
const opts = {
|
|
34
|
+
commitment: options?.commitment,
|
|
35
|
+
programId: options?.programId
|
|
36
|
+
};
|
|
37
|
+
const nextAccounts = await getTokenAccountsByOwner(connection, publicKey, opts);
|
|
38
|
+
if (requestId === refreshId) {
|
|
39
|
+
tokenAccounts.value = nextAccounts;
|
|
40
|
+
}
|
|
41
|
+
return nextAccounts;
|
|
42
|
+
} catch (cause) {
|
|
43
|
+
const normalizedError = normalizeSolanaError(cause, "RPC_FAILURE");
|
|
44
|
+
if (requestId === refreshId) {
|
|
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(owner),
|
|
59
|
+
() => {
|
|
60
|
+
void refresh().catch(() => void 0);
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
return {
|
|
64
|
+
tokenAccounts,
|
|
65
|
+
loading,
|
|
66
|
+
error,
|
|
67
|
+
refresh
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { useTokenAccounts as u };
|
|
@@ -3,9 +3,9 @@ import { withSolanaTimeout } from '@vue-solana/core/timeout';
|
|
|
3
3
|
import { signAndSendTransaction, confirmTransactionSignature } from '@vue-solana/core/transaction';
|
|
4
4
|
import { createNoWalletSelectedError } from '@vue-solana/core/wallet';
|
|
5
5
|
import { ref } from 'vue';
|
|
6
|
-
import { u as useConnection } from './vue.
|
|
7
|
-
import { u as useWallet } from './vue.
|
|
8
|
-
import { g as getConfirmedTransactionStatus } from './vue.
|
|
6
|
+
import { u as useConnection } from './vue.DiNn3XHm.mjs';
|
|
7
|
+
import { u as useWallet } from './vue.B2AQR2bE.mjs';
|
|
8
|
+
import { g as getConfirmedTransactionStatus } from './vue.QHAHFnw8.mjs';
|
|
9
9
|
|
|
10
10
|
const SIGN_AND_SEND_TIMEOUT_MS = 12e4;
|
|
11
11
|
function useSignAndSendTransaction() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { parsePublicKey } from '@vue-solana/core/address';
|
|
2
2
|
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
3
3
|
import { shallowRef, onMounted, onUnmounted, 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.DiNn3XHm.mjs';
|
|
5
|
+
import { t as tryUseSolana } from './vue.CYKT65tB.mjs';
|
|
6
6
|
|
|
7
7
|
function useProgramAccounts(programId, options = {}) {
|
|
8
8
|
const solana = tryUseSolana();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
2
2
|
import { createNoWalletSelectedError, assertWalletCanSignMessage } from '@vue-solana/core/wallet';
|
|
3
3
|
import { ref } from 'vue';
|
|
4
|
-
import { u as useWallet } from './vue.
|
|
4
|
+
import { u as useWallet } from './vue.B2AQR2bE.mjs';
|
|
5
5
|
|
|
6
6
|
function useSignMessage() {
|
|
7
7
|
const { wallet } = useWallet();
|
|
@@ -16,7 +16,8 @@ function getSsrContext() {
|
|
|
16
16
|
cluster: "devnet",
|
|
17
17
|
endpoint: "",
|
|
18
18
|
wsEndpoint: "",
|
|
19
|
-
connection:
|
|
19
|
+
connection: createUnavailableProxy(),
|
|
20
|
+
client: createUnavailableProxy(),
|
|
20
21
|
wallet: shallowRef(null),
|
|
21
22
|
status: ref("idle"),
|
|
22
23
|
error: ref(null),
|
|
@@ -34,7 +35,7 @@ function getSsrContext() {
|
|
|
34
35
|
};
|
|
35
36
|
return ssrContext;
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function createUnavailableProxy() {
|
|
38
39
|
return new Proxy(
|
|
39
40
|
{},
|
|
40
41
|
{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { parsePublicKey } from '@vue-solana/core/address';
|
|
2
2
|
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
3
3
|
import { shallowRef, onMounted, onUnmounted, 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.DiNn3XHm.mjs';
|
|
5
|
+
import { t as tryUseSolana } from './vue.CYKT65tB.mjs';
|
|
6
6
|
|
|
7
7
|
function useAccountInfo(address, options = {}) {
|
|
8
8
|
const solana = tryUseSolana();
|