@vue-solana/vue 2.6.1 → 3.0.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 +6 -4
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +35 -55
- package/dist/shared/vue.1Qwco2kv.mjs +33 -0
- package/dist/shared/vue.BFSboXMB.mjs +17 -0
- package/dist/shared/vue.BGGixph-.d.mts +5 -0
- package/dist/shared/vue.BGGixph-.d.ts +5 -0
- package/dist/shared/{vue.CbJFnho-.mjs → vue.BNJTXSnQ.mjs} +17 -70
- package/dist/shared/{vue.BINkrA8h.mjs → vue.BwBqla_n.mjs} +16 -26
- package/dist/shared/vue.BxtOHzY_.mjs +27 -0
- package/dist/shared/vue.C1JbUTpJ.mjs +66 -0
- package/dist/shared/vue.C9OOmvkD.mjs +36 -0
- package/dist/shared/vue.CGv0ip3w.mjs +52 -0
- package/dist/shared/vue.CaAgH2Xt.mjs +51 -0
- package/dist/shared/{vue.Dyi1OCI1.mjs → vue.CjSw0Hh1.mjs} +3 -9
- package/dist/shared/vue.CsFY1mfz.mjs +29 -0
- package/dist/shared/vue.CvenSbZZ.mjs +27 -0
- package/dist/shared/{vue.BDNOyiGZ.mjs → vue.D5pqR5Fa.mjs} +9 -12
- package/dist/shared/vue.DNKD6jqM.mjs +22 -0
- package/dist/shared/vue.DlihC5GG.mjs +38 -0
- package/dist/shared/vue.XlfH_nkc.mjs +32 -0
- package/dist/shared/vue.hG_FieA3.mjs +37 -0
- package/dist/shared/vue.o98pAmDg.mjs +40 -0
- package/dist/swr.mjs +22 -79
- package/dist/useAccountInfo.d.mts +4 -4
- package/dist/useAccountInfo.d.ts +4 -4
- package/dist/useAccountInfo.mjs +1 -9
- package/dist/useAction.mjs +0 -2
- package/dist/useAirdrop.mjs +0 -7
- package/dist/useBalance.d.mts +4 -4
- package/dist/useBalance.d.ts +4 -4
- package/dist/useBalance.mjs +1 -8
- package/dist/useClientCapability.mjs +0 -4
- package/dist/useConnection.d.mts +6 -6
- package/dist/useConnection.d.ts +6 -6
- package/dist/useConnection.mjs +0 -4
- package/dist/useIdentity.mjs +0 -5
- package/dist/usePayer.mjs +0 -5
- package/dist/usePlanTransaction.d.mts +12 -13
- package/dist/usePlanTransaction.d.ts +12 -13
- package/dist/usePlanTransaction.mjs +1 -7
- package/dist/usePlanTransactions.d.mts +2 -1
- package/dist/usePlanTransactions.d.ts +2 -1
- package/dist/usePlanTransactions.mjs +1 -7
- package/dist/useProgramAccounts.d.mts +5 -15
- package/dist/useProgramAccounts.d.ts +5 -15
- package/dist/useProgramAccounts.mjs +1 -9
- package/dist/useRequest.mjs +0 -4
- package/dist/useRpc.d.mts +6 -6
- package/dist/useRpc.d.ts +6 -6
- package/dist/useRpc.mjs +0 -3
- package/dist/useSelectedWalletAccount.mjs +0 -2
- package/dist/useSendTransaction.d.mts +11 -12
- package/dist/useSendTransaction.d.ts +11 -12
- package/dist/useSendTransaction.mjs +1 -7
- package/dist/useSendTransactions.d.mts +2 -1
- package/dist/useSendTransactions.d.ts +2 -1
- package/dist/useSendTransactions.mjs +1 -7
- package/dist/useSignAndSendTransaction.d.mts +1 -1
- package/dist/useSignAndSendTransaction.d.ts +1 -1
- package/dist/useSignAndSendTransaction.mjs +1 -12
- package/dist/useSignAndSendTransactions.d.mts +2 -2
- package/dist/useSignAndSendTransactions.d.ts +2 -2
- package/dist/useSignAndSendTransactions.mjs +1 -8
- package/dist/useSignIn.d.mts +4 -4
- package/dist/useSignIn.d.ts +4 -4
- package/dist/useSignIn.mjs +1 -7
- package/dist/useSignMessage.d.mts +4 -4
- package/dist/useSignMessage.d.ts +4 -4
- package/dist/useSignMessage.mjs +1 -7
- package/dist/useSignTransactions.d.mts +4 -4
- package/dist/useSignTransactions.d.ts +4 -4
- package/dist/useSignTransactions.mjs +1 -7
- package/dist/useSignatureStatus.mjs +0 -7
- package/dist/useSolana.mjs +0 -2
- package/dist/useSolanaClient.d.mts +6 -6
- package/dist/useSolanaClient.d.ts +6 -6
- package/dist/useSolanaClient.mjs +0 -3
- package/dist/useSubscription.mjs +1 -3
- package/dist/useTokenAccounts.d.mts +4 -4
- package/dist/useTokenAccounts.d.ts +4 -4
- package/dist/useTokenAccounts.mjs +1 -9
- package/dist/useTokenBalance.d.mts +9 -7
- package/dist/useTokenBalance.d.ts +9 -7
- package/dist/useTokenBalance.mjs +1 -9
- package/dist/useTrackedData.mjs +1 -4
- package/dist/useTransaction.mjs +0 -4
- package/dist/useTransactionConfirmation.d.mts +4 -4
- package/dist/useTransactionConfirmation.d.ts +4 -4
- package/dist/useTransactionConfirmation.mjs +1 -8
- package/dist/useWallet.mjs +0 -5
- package/dist/useWallets.mjs +0 -3
- package/package.json +38 -75
- package/dist/buffer-polyfill.cjs +0 -8
- package/dist/buffer-polyfill.d.cts +0 -2
- package/dist/index.cjs +0 -452
- package/dist/index.d.cts +0 -62
- package/dist/kit.cjs +0 -16
- package/dist/kit.d.cts +0 -1
- package/dist/shared/vue.4C5kX4fE.cjs +0 -36
- package/dist/shared/vue.9TPxZPMf.cjs +0 -59
- package/dist/shared/vue.B4eMoJT2.cjs +0 -36
- package/dist/shared/vue.B6ainw2G.cjs +0 -63
- package/dist/shared/vue.BD6Gm1nl.mjs +0 -74
- package/dist/shared/vue.BGxz4dru.cjs +0 -98
- package/dist/shared/vue.BIxphCAq.cjs +0 -10
- package/dist/shared/vue.BOpgWr43.mjs +0 -70
- package/dist/shared/vue.BQRpjwKl.mjs +0 -80
- package/dist/shared/vue.BVaMoz9y.cjs +0 -9
- package/dist/shared/vue.Bk5xjlUx.cjs +0 -61
- package/dist/shared/vue.Bwd1sGAM.cjs +0 -72
- package/dist/shared/vue.ByxbBC3y.mjs +0 -57
- package/dist/shared/vue.C13umiQi.mjs +0 -85
- package/dist/shared/vue.CIs8QhCw.cjs +0 -132
- package/dist/shared/vue.CMohL_Cz.mjs +0 -58
- package/dist/shared/vue.CWZSMVnB.cjs +0 -84
- package/dist/shared/vue.Co5rj-I6.mjs +0 -118
- package/dist/shared/vue.CoaIWGPT.cjs +0 -38
- package/dist/shared/vue.CrkK_T15.cjs +0 -86
- package/dist/shared/vue.D-qi8PSL.cjs +0 -82
- package/dist/shared/vue.D3Y0PWbF.mjs +0 -71
- package/dist/shared/vue.D5U1yLG3.mjs +0 -83
- package/dist/shared/vue.DAg5wC1G.cjs +0 -76
- package/dist/shared/vue.DAthhH4D.mjs +0 -118
- package/dist/shared/vue.DDbVk0Zh.cjs +0 -180
- package/dist/shared/vue.DE3emjSF.cjs +0 -48
- package/dist/shared/vue.DEHxNvUX.cjs +0 -7
- package/dist/shared/vue.DFaMJLAQ.cjs +0 -60
- package/dist/shared/vue.DKoM8jIV.cjs +0 -121
- package/dist/shared/vue.DKyQ7J67.cjs +0 -15
- package/dist/shared/vue.DL3z5PxP.d.cts +0 -21
- package/dist/shared/vue.DNxOpDXz.cjs +0 -12
- package/dist/shared/vue.Di7yjJ-R.cjs +0 -87
- package/dist/shared/vue.Dn3KLJZH.cjs +0 -121
- package/dist/shared/vue.DxM45azl.cjs +0 -173
- package/dist/shared/vue.E_npPFoV.cjs +0 -67
- package/dist/shared/vue.FiMmnMHr.cjs +0 -20
- package/dist/shared/vue.JUWqu6kD.mjs +0 -61
- package/dist/shared/vue.Sbbm9JSu.cjs +0 -74
- package/dist/shared/vue.ZuUCEEab.cjs +0 -103
- package/dist/shared/vue.l3UCdN7z.cjs +0 -111
- package/dist/shared/vue.ldvmk9NM.cjs +0 -45
- package/dist/swr.cjs +0 -136
- package/dist/swr.d.cts +0 -41
- package/dist/useAccountInfo.cjs +0 -15
- package/dist/useAccountInfo.d.cts +0 -24
- package/dist/useAction.cjs +0 -9
- package/dist/useAction.d.cts +0 -45
- package/dist/useAirdrop.cjs +0 -14
- package/dist/useAirdrop.d.cts +0 -27
- package/dist/useBalance.cjs +0 -14
- package/dist/useBalance.d.cts +0 -15
- package/dist/useClientCapability.cjs +0 -12
- package/dist/useClientCapability.d.cts +0 -39
- package/dist/useConnection.cjs +0 -11
- package/dist/useConnection.d.cts +0 -46
- package/dist/useIdentity.cjs +0 -12
- package/dist/useIdentity.d.cts +0 -3
- package/dist/usePayer.cjs +0 -13
- package/dist/usePayer.d.cts +0 -18
- package/dist/usePlanTransaction.cjs +0 -14
- package/dist/usePlanTransaction.d.cts +0 -45
- package/dist/usePlanTransactions.cjs +0 -13
- package/dist/usePlanTransactions.d.cts +0 -4
- package/dist/useProgramAccounts.cjs +0 -15
- package/dist/useProgramAccounts.d.cts +0 -55
- package/dist/useRequest.cjs +0 -11
- package/dist/useRequest.d.cts +0 -73
- package/dist/useRpc.cjs +0 -10
- package/dist/useRpc.d.cts +0 -55
- package/dist/useSelectedWalletAccount.cjs +0 -13
- package/dist/useSelectedWalletAccount.d.cts +0 -117
- package/dist/useSendTransaction.cjs +0 -14
- package/dist/useSendTransaction.d.cts +0 -51
- package/dist/useSendTransactions.cjs +0 -13
- package/dist/useSendTransactions.d.cts +0 -4
- package/dist/useSignAndSendTransaction.cjs +0 -18
- package/dist/useSignAndSendTransaction.d.cts +0 -40
- package/dist/useSignAndSendTransactions.cjs +0 -15
- package/dist/useSignAndSendTransactions.d.cts +0 -35
- package/dist/useSignIn.cjs +0 -13
- package/dist/useSignIn.d.cts +0 -23
- package/dist/useSignMessage.cjs +0 -13
- package/dist/useSignMessage.d.cts +0 -236
- package/dist/useSignTransactions.cjs +0 -13
- package/dist/useSignTransactions.d.cts +0 -24
- package/dist/useSignatureStatus.cjs +0 -14
- package/dist/useSignatureStatus.d.cts +0 -26
- package/dist/useSolana.cjs +0 -10
- package/dist/useSolana.d.cts +0 -9
- package/dist/useSolanaClient.cjs +0 -10
- package/dist/useSolanaClient.d.cts +0 -45
- package/dist/useSubscription.cjs +0 -9
- package/dist/useSubscription.d.cts +0 -70
- package/dist/useTokenAccounts.cjs +0 -15
- package/dist/useTokenAccounts.d.cts +0 -19
- package/dist/useTokenBalance.cjs +0 -15
- package/dist/useTokenBalance.d.cts +0 -15
- package/dist/useTrackedData.cjs +0 -10
- package/dist/useTrackedData.d.cts +0 -98
- package/dist/useTransaction.cjs +0 -11
- package/dist/useTransaction.d.cts +0 -27
- package/dist/useTransactionConfirmation.cjs +0 -15
- package/dist/useTransactionConfirmation.d.cts +0 -38
- package/dist/useWallet.cjs +0 -12
- package/dist/useWallet.d.cts +0 -31
- package/dist/useWallets.cjs +0 -10
- package/dist/useWallets.d.cts +0 -11
package/dist/useConnection.d.cts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as _solana_kit_plugin_rpc from '@solana/kit-plugin-rpc';
|
|
2
|
-
import * as _solana_kit from '@solana/kit';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Use `useSolanaClient()` which returns the Kit client instead of
|
|
6
|
-
* the legacy web3-compat Connection.
|
|
7
|
-
*/
|
|
8
|
-
declare function useConnection(): Omit<_solana_kit.Client<{
|
|
9
|
-
signTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
10
|
-
abortSignal?: AbortSignal;
|
|
11
|
-
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
12
|
-
payer: _solana_kit.TransactionSigner;
|
|
13
|
-
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>;
|
|
14
|
-
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
15
|
-
getMinimumBalance: (space: number, config?: _solana_kit.GetMinimumBalanceConfig) => Promise<_solana_kit.Lamports>;
|
|
16
|
-
transactionPlanner: _solana_kit.TransactionPlanner;
|
|
17
|
-
planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
18
|
-
abortSignal?: AbortSignal;
|
|
19
|
-
}) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
|
|
20
|
-
planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
21
|
-
abortSignal?: AbortSignal;
|
|
22
|
-
}) => Promise<_solana_kit.TransactionPlan>;
|
|
23
|
-
signTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
24
|
-
kind: "single";
|
|
25
|
-
message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
|
|
26
|
-
planType: "transactionPlan";
|
|
27
|
-
}>, config?: {
|
|
28
|
-
abortSignal?: AbortSignal;
|
|
29
|
-
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
30
|
-
transactionPlanExecutor: _solana_kit.TransactionPlanExecutor<_solana_kit_plugin_rpc.RpcSendContext>;
|
|
31
|
-
sendTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
32
|
-
kind: "single";
|
|
33
|
-
message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
|
|
34
|
-
planType: "transactionPlan";
|
|
35
|
-
}>, config?: {
|
|
36
|
-
abortSignal?: AbortSignal;
|
|
37
|
-
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
38
|
-
sendTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
39
|
-
abortSignal?: AbortSignal;
|
|
40
|
-
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
41
|
-
airdrop: (address: _solana_kit.Address, amount: _solana_kit.Lamports, abortSignal?: AbortSignal) => Promise<_solana_kit.Signature | undefined>;
|
|
42
|
-
}>, "payer"> & {
|
|
43
|
-
payer?: _solana_kit.TransactionSigner;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export { useConnection };
|
package/dist/useIdentity.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const usePayer = require('./shared/vue.ldvmk9NM.cjs');
|
|
4
|
-
require('vue');
|
|
5
|
-
require('./shared/vue.4C5kX4fE.cjs');
|
|
6
|
-
require('./shared/vue.BIxphCAq.cjs');
|
|
7
|
-
require('./shared/vue.DE3emjSF.cjs');
|
|
8
|
-
require('./shared/vue.DEHxNvUX.cjs');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.useIdentity = usePayer.useIdentity;
|
package/dist/useIdentity.d.cts
DELETED
package/dist/usePayer.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const usePayer = require('./shared/vue.ldvmk9NM.cjs');
|
|
4
|
-
require('vue');
|
|
5
|
-
require('./shared/vue.4C5kX4fE.cjs');
|
|
6
|
-
require('./shared/vue.BIxphCAq.cjs');
|
|
7
|
-
require('./shared/vue.DE3emjSF.cjs');
|
|
8
|
-
require('./shared/vue.DEHxNvUX.cjs');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.useIdentity = usePayer.useIdentity;
|
|
13
|
-
exports.usePayer = usePayer.usePayer;
|
package/dist/usePayer.d.cts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TransactionSigner } from '@vue-solana/core/kit';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The acting identity signer — the wallet whose assets the application is
|
|
6
|
-
* acting upon. Requires the client to expose `identity` (e.g. via a Kit
|
|
7
|
-
* signer plugin). Re-reads on change when the client advertises
|
|
8
|
-
* `subscribeToIdentity`.
|
|
9
|
-
*/
|
|
10
|
-
declare function useIdentity(): Ref<TransactionSigner>;
|
|
11
|
-
/**
|
|
12
|
-
* The signer that pays transaction fees and storage costs. Requires the
|
|
13
|
-
* client to expose `payer` (e.g. via a Kit signer plugin). Re-reads on change
|
|
14
|
-
* when the client advertises `subscribeToPayer`.
|
|
15
|
-
*/
|
|
16
|
-
declare function usePayer(): Ref<TransactionSigner>;
|
|
17
|
-
|
|
18
|
-
export { useIdentity, usePayer };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const usePlanTransaction = require('./shared/vue.Dn3KLJZH.cjs');
|
|
4
|
-
require('@vue-solana/core/errors');
|
|
5
|
-
require('vue');
|
|
6
|
-
require('./shared/vue.4C5kX4fE.cjs');
|
|
7
|
-
require('./shared/vue.BIxphCAq.cjs');
|
|
8
|
-
require('./shared/vue.DE3emjSF.cjs');
|
|
9
|
-
require('./shared/vue.DEHxNvUX.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.usePlanTransaction = usePlanTransaction.usePlanTransaction;
|
|
14
|
-
exports.usePlanTransactions = usePlanTransaction.usePlanTransactions;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as vue from 'vue';
|
|
2
|
-
import { TransactionMessage, InstructionPlanInput, TransactionPlan } from '@vue-solana/core/kit';
|
|
3
|
-
import { SolanaError } from '@vue-solana/core/errors';
|
|
4
|
-
|
|
5
|
-
type PlanTransactionStatus = "idle" | "planning" | "planned" | "error";
|
|
6
|
-
interface PlanTransactionConfig {
|
|
7
|
-
abortSignal?: AbortSignal;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Plan a single transaction message from instruction inputs — without
|
|
11
|
-
* signing or sending — using the client's transaction planning capability
|
|
12
|
-
* (e.g. `rpcTransactionPlanner` from `@solana/kit-plugin-rpc`).
|
|
13
|
-
*
|
|
14
|
-
* Throws with a clear capability error when the client does not plan, which
|
|
15
|
-
* includes a client without a `payer` signer.
|
|
16
|
-
*
|
|
17
|
-
* Calling `execute` while a prior execution is in flight aborts the prior call;
|
|
18
|
-
* the superseded attempt rejects, so check its `error.cause` to tell it apart
|
|
19
|
-
* from a real failure.
|
|
20
|
-
*/
|
|
21
|
-
declare function usePlanTransaction(): {
|
|
22
|
-
transactionMessage: vue.ShallowRef<TransactionMessage | null, TransactionMessage | null>;
|
|
23
|
-
status: vue.Ref<PlanTransactionStatus, PlanTransactionStatus>;
|
|
24
|
-
loading: vue.Ref<boolean, boolean>;
|
|
25
|
-
error: vue.Ref<SolanaError | null, SolanaError | null>;
|
|
26
|
-
execute: (input: InstructionPlanInput, config?: PlanTransactionConfig) => Promise<TransactionMessage>;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Plan a full transaction plan — possibly multiple transaction messages —
|
|
30
|
-
* from instruction inputs, using the client's transaction planning
|
|
31
|
-
* capability.
|
|
32
|
-
*
|
|
33
|
-
* Throws with a clear capability error when the client does not plan, which
|
|
34
|
-
* includes a client without a `payer` signer.
|
|
35
|
-
*/
|
|
36
|
-
declare function usePlanTransactions(): {
|
|
37
|
-
transactionPlan: vue.ShallowRef<TransactionPlan | null, TransactionPlan | null>;
|
|
38
|
-
status: vue.Ref<PlanTransactionStatus, PlanTransactionStatus>;
|
|
39
|
-
loading: vue.Ref<boolean, boolean>;
|
|
40
|
-
error: vue.Ref<SolanaError | null, SolanaError | null>;
|
|
41
|
-
execute: (input: InstructionPlanInput, config?: PlanTransactionConfig) => Promise<TransactionPlan>;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export { usePlanTransaction, usePlanTransactions };
|
|
45
|
-
export type { PlanTransactionConfig, PlanTransactionStatus };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const usePlanTransaction = require('./shared/vue.Dn3KLJZH.cjs');
|
|
4
|
-
require('@vue-solana/core/errors');
|
|
5
|
-
require('vue');
|
|
6
|
-
require('./shared/vue.4C5kX4fE.cjs');
|
|
7
|
-
require('./shared/vue.BIxphCAq.cjs');
|
|
8
|
-
require('./shared/vue.DE3emjSF.cjs');
|
|
9
|
-
require('./shared/vue.DEHxNvUX.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.usePlanTransactions = usePlanTransaction.usePlanTransactions;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const useProgramAccounts = require('./shared/vue.Di7yjJ-R.cjs');
|
|
4
|
-
require('@vue-solana/core/errors');
|
|
5
|
-
require('vue');
|
|
6
|
-
require('@vue-solana/core/address');
|
|
7
|
-
require('./shared/vue.BVaMoz9y.cjs');
|
|
8
|
-
require('./shared/vue.BIxphCAq.cjs');
|
|
9
|
-
require('./shared/vue.DE3emjSF.cjs');
|
|
10
|
-
require('./shared/vue.DEHxNvUX.cjs');
|
|
11
|
-
require('./shared/vue.DNxOpDXz.cjs');
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exports.useProgramAccounts = useProgramAccounts.useProgramAccounts;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import * as _solana_kit from '@solana/kit';
|
|
2
|
-
import * as vue from 'vue';
|
|
3
|
-
import { MaybeRefOrGetter } from 'vue';
|
|
4
|
-
import { Commitment } from '@vue-solana/core/kit';
|
|
5
|
-
import { SolanaError } from '@vue-solana/core/errors';
|
|
6
|
-
|
|
7
|
-
type ProgramAccountMemcmpEncoding = "base58" | "base64";
|
|
8
|
-
type ProgramAccountMemcmpFilter = {
|
|
9
|
-
memcmp: {
|
|
10
|
-
offset: number;
|
|
11
|
-
bytes: string;
|
|
12
|
-
encoding?: ProgramAccountMemcmpEncoding;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
type ProgramAccountDataSizeFilter = {
|
|
16
|
-
dataSize: number;
|
|
17
|
-
};
|
|
18
|
-
type ProgramAccountFilter = ProgramAccountMemcmpFilter | ProgramAccountDataSizeFilter;
|
|
19
|
-
interface ProgramAccountDataSlice {
|
|
20
|
-
offset: number;
|
|
21
|
-
length: number;
|
|
22
|
-
}
|
|
23
|
-
interface UseProgramAccountsOptions {
|
|
24
|
-
commitment?: Commitment;
|
|
25
|
-
dataSlice?: ProgramAccountDataSlice;
|
|
26
|
-
filters?: ProgramAccountFilter[];
|
|
27
|
-
}
|
|
28
|
-
interface ProgramAccount {
|
|
29
|
-
pubkey: string;
|
|
30
|
-
account: {
|
|
31
|
-
executable: boolean;
|
|
32
|
-
lamports: number;
|
|
33
|
-
owner: string;
|
|
34
|
-
space: number;
|
|
35
|
-
data: Uint8Array;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
declare function useProgramAccounts(programId: MaybeRefOrGetter<string | null | undefined>, options?: UseProgramAccountsOptions): {
|
|
39
|
-
accounts: vue.ShallowRef<ProgramAccount[], ProgramAccount[]>;
|
|
40
|
-
loading: vue.ShallowRef<boolean, boolean>;
|
|
41
|
-
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
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
|
-
}[]>;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export { useProgramAccounts };
|
|
55
|
-
export type { ProgramAccount, ProgramAccountDataSizeFilter, ProgramAccountDataSlice, ProgramAccountFilter, ProgramAccountMemcmpEncoding, ProgramAccountMemcmpFilter, UseProgramAccountsOptions };
|
package/dist/useRequest.cjs
DELETED
package/dist/useRequest.d.cts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { SolanaError } from '@vue-solana/core/errors';
|
|
2
|
-
import { ComputedRef, Ref } from 'vue';
|
|
3
|
-
|
|
4
|
-
type UseRequestStatus = "fetching" | "success" | "error" | "disabled";
|
|
5
|
-
type SendFn<TResult> = (options?: {
|
|
6
|
-
abortSignal?: AbortSignal;
|
|
7
|
-
}) => Promise<TResult>;
|
|
8
|
-
type ResolvedSource<TResult> = ((signal: AbortSignal) => Promise<TResult> | {
|
|
9
|
-
send: SendFn<TResult>;
|
|
10
|
-
}) | {
|
|
11
|
-
send: SendFn<TResult>;
|
|
12
|
-
} | null | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* A request source accepted by `useRequest`:
|
|
15
|
-
*
|
|
16
|
-
* - a request function `(signal) => Promise<T>`, called with a fresh composed
|
|
17
|
-
* `AbortSignal` per attempt (it may return a Kit request object, which is
|
|
18
|
-
* sent with the signal automatically),
|
|
19
|
-
* - a Kit reactive store source such as `PendingRpcRequest` (for example
|
|
20
|
-
* `rpc.getBalance(address)`),
|
|
21
|
-
* - a `ref`/`computed` of any of the above, or of `null` to disable, or
|
|
22
|
-
* - `null` to disable outright.
|
|
23
|
-
*/
|
|
24
|
-
type UseRequestSource<TResult> = ResolvedSource<TResult> | Ref<ResolvedSource<TResult>>;
|
|
25
|
-
interface UseRequestOptions {
|
|
26
|
-
/**
|
|
27
|
-
* Returns a caller-provided `AbortSignal` per attempt (for example
|
|
28
|
-
* `AbortSignal.timeout(5_000)`), composed with the internal per-attempt
|
|
29
|
-
* signal. Aborting it fails the attempt without touching other state. Read
|
|
30
|
-
* fresh from the latest render, so inline closures need no `useCallback`.
|
|
31
|
-
*/
|
|
32
|
-
getAbortSignal?: (attempt: number) => AbortSignal | null | undefined;
|
|
33
|
-
}
|
|
34
|
-
/** Per-call abort overrides for `refresh()`. */
|
|
35
|
-
type UseRequestRefresherOptions = {
|
|
36
|
-
/**
|
|
37
|
-
* Applies only this signal to the attempt, bypassing `getAbortSignal`.
|
|
38
|
-
* Passing `undefined` (or an empty options object) applies no caller signal
|
|
39
|
-
* for that attempt; call `refresh()` with no argument to keep the
|
|
40
|
-
* `getAbortSignal` factory behavior.
|
|
41
|
-
*/
|
|
42
|
-
abortSignal?: AbortSignal;
|
|
43
|
-
};
|
|
44
|
-
interface UseRequestReturn<TResult> {
|
|
45
|
-
data: ComputedRef<TResult | undefined>;
|
|
46
|
-
error: ComputedRef<SolanaError | null>;
|
|
47
|
-
/** Re-fires manually. `refresh({ abortSignal })` overrides `getAbortSignal` for that attempt. */
|
|
48
|
-
refresh: (options?: UseRequestRefresherOptions) => Promise<TResult | undefined>;
|
|
49
|
-
status: ComputedRef<UseRequestStatus>;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* One-shot async request that re-fires when its source changes identity, with
|
|
53
|
-
* stale-while-revalidate: while a new attempt runs, the previous `data` and
|
|
54
|
-
* `error` stay populated so the UI keeps rendering.
|
|
55
|
-
*
|
|
56
|
-
* Status set: `fetching` | `success` | `error` | `disabled`.
|
|
57
|
-
*
|
|
58
|
-
* - The first attempt fires on mount inside a component (or immediately when
|
|
59
|
-
* called outside one).
|
|
60
|
-
* - Passing a ref/computed source re-fires whenever the source identity
|
|
61
|
-
* changes; a `null` source clears state and reports `disabled`.
|
|
62
|
-
* - `refresh()` re-fires manually and resolves with the attempt result;
|
|
63
|
-
* `refresh({ abortSignal })` overrides the caller signal for that attempt.
|
|
64
|
-
* - `getAbortSignal` (read fresh per render, so inline closures are fine)
|
|
65
|
-
* attaches per-attempt cancellation on top of the internal per-attempt
|
|
66
|
-
* signal.
|
|
67
|
-
* - Passing `null` as the source, or unmounting, cancels in-flight work and
|
|
68
|
-
* reports `disabled`.
|
|
69
|
-
*/
|
|
70
|
-
declare function useRequest<TResult>(source: UseRequestSource<TResult>, options?: UseRequestOptions): UseRequestReturn<TResult>;
|
|
71
|
-
|
|
72
|
-
export { useRequest };
|
|
73
|
-
export type { UseRequestOptions, UseRequestRefresherOptions, UseRequestReturn, UseRequestSource, UseRequestStatus };
|
package/dist/useRpc.cjs
DELETED
package/dist/useRpc.d.cts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import * as _solana_kit_plugin_rpc from '@solana/kit-plugin-rpc';
|
|
2
|
-
import * as _solana_kit from '@solana/kit';
|
|
3
|
-
import * as _vue_solana_core_errors from '@vue-solana/core/errors';
|
|
4
|
-
import * as vue from 'vue';
|
|
5
|
-
import * as _vue_solana_core_types from '@vue-solana/core/types';
|
|
6
|
-
import { S as SolanaConnectionStatus } from './shared/vue.DL3z5PxP.cjs';
|
|
7
|
-
|
|
8
|
-
declare function useRpc(): {
|
|
9
|
-
cluster: vue.ComputedRef<_vue_solana_core_types.SolanaCluster>;
|
|
10
|
-
endpoint: vue.ComputedRef<string>;
|
|
11
|
-
wsEndpoint: vue.ComputedRef<string>;
|
|
12
|
-
status: vue.Ref<SolanaConnectionStatus, SolanaConnectionStatus>;
|
|
13
|
-
error: vue.Ref<_vue_solana_core_errors.SolanaError | null, _vue_solana_core_errors.SolanaError | null>;
|
|
14
|
-
latestBlockhash: vue.Ref<string | null, string | null>;
|
|
15
|
-
checkConnection: () => Promise<void>;
|
|
16
|
-
client: Omit<_solana_kit.Client<{
|
|
17
|
-
signTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
18
|
-
abortSignal?: AbortSignal;
|
|
19
|
-
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
20
|
-
payer: _solana_kit.TransactionSigner;
|
|
21
|
-
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>;
|
|
22
|
-
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
23
|
-
getMinimumBalance: (space: number, config?: _solana_kit.GetMinimumBalanceConfig) => Promise<_solana_kit.Lamports>;
|
|
24
|
-
transactionPlanner: _solana_kit.TransactionPlanner;
|
|
25
|
-
planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
26
|
-
abortSignal?: AbortSignal;
|
|
27
|
-
}) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
|
|
28
|
-
planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
29
|
-
abortSignal?: AbortSignal;
|
|
30
|
-
}) => Promise<_solana_kit.TransactionPlan>;
|
|
31
|
-
signTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
32
|
-
kind: "single";
|
|
33
|
-
message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
|
|
34
|
-
planType: "transactionPlan";
|
|
35
|
-
}>, config?: {
|
|
36
|
-
abortSignal?: AbortSignal;
|
|
37
|
-
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
38
|
-
transactionPlanExecutor: _solana_kit.TransactionPlanExecutor<_solana_kit_plugin_rpc.RpcSendContext>;
|
|
39
|
-
sendTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
40
|
-
kind: "single";
|
|
41
|
-
message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
|
|
42
|
-
planType: "transactionPlan";
|
|
43
|
-
}>, config?: {
|
|
44
|
-
abortSignal?: AbortSignal;
|
|
45
|
-
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
46
|
-
sendTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
47
|
-
abortSignal?: AbortSignal;
|
|
48
|
-
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
49
|
-
airdrop: (address: _solana_kit.Address, amount: _solana_kit.Lamports, abortSignal?: AbortSignal) => Promise<_solana_kit.Signature | undefined>;
|
|
50
|
-
}>, "payer"> & {
|
|
51
|
-
payer?: _solana_kit.TransactionSigner;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export { useRpc };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const SelectedWalletAccountProvider = require('./shared/vue.DDbVk0Zh.cjs');
|
|
4
|
-
require('vue');
|
|
5
|
-
require('./shared/vue.DEHxNvUX.cjs');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.SelectedWalletAccountProvider = SelectedWalletAccountProvider.SelectedWalletAccountProvider;
|
|
10
|
-
exports.createSelectedWalletAccountContext = SelectedWalletAccountProvider.createSelectedWalletAccountContext;
|
|
11
|
-
exports.provideSelectedWalletAccount = SelectedWalletAccountProvider.provideSelectedWalletAccount;
|
|
12
|
-
exports.selectedWalletAccountInjectionKey = SelectedWalletAccountProvider.selectedWalletAccountInjectionKey;
|
|
13
|
-
exports.useSelectedWalletAccount = SelectedWalletAccountProvider.useSelectedWalletAccount;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { SolanaWalletInfo } from '@vue-solana/core/types';
|
|
2
|
-
import * as vue from 'vue';
|
|
3
|
-
import { Ref, ComputedRef, InjectionKey, PropType } from 'vue';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Storage adapter used by `SelectedWalletAccountProvider`'s `stateSync`
|
|
7
|
-
* option. The persisted value is the selected wallet's
|
|
8
|
-
* `${walletName}:${accountAddress}` key.
|
|
9
|
-
*/
|
|
10
|
-
interface SelectedWalletAccountStorage {
|
|
11
|
-
storeSelectedWallet(key: string): void | Promise<void>;
|
|
12
|
-
getSelectedWallet(): string | null | Promise<string | null>;
|
|
13
|
-
deleteSelectedWallet(): void | Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type SelectedWalletAccount = SolanaWalletInfo["accounts"][number] & {
|
|
17
|
-
/** The wallet that owns this account. */
|
|
18
|
-
walletName: string;
|
|
19
|
-
};
|
|
20
|
-
type WalletAccountFilter = (walletName: string, account: SolanaWalletInfo["accounts"][number]) => boolean;
|
|
21
|
-
interface SelectedWalletAccountContext {
|
|
22
|
-
selectedWalletAccount: Ref<SelectedWalletAccount | null>;
|
|
23
|
-
setSelectedWalletAccount: (account: SelectedWalletAccount | null) => void;
|
|
24
|
-
filteredWallets: ComputedRef<SolanaWalletInfo[]>;
|
|
25
|
-
}
|
|
26
|
-
declare const selectedWalletAccountInjectionKey: InjectionKey<SelectedWalletAccountContext>;
|
|
27
|
-
interface SelectedWalletAccountOptions {
|
|
28
|
-
/**
|
|
29
|
-
* Restricts the wallets exposed through `filteredWallets` and the accounts
|
|
30
|
-
* that can be selected. Receives the wallet name and each of its accounts;
|
|
31
|
-
* return `false` to hide the account (a wallet with no remaining accounts
|
|
32
|
-
* is hidden entirely).
|
|
33
|
-
*/
|
|
34
|
-
filterWallet?: WalletAccountFilter;
|
|
35
|
-
/**
|
|
36
|
-
* Persists the selection as `${walletName}:${accountAddress}`. Defaults to
|
|
37
|
-
* `localStorage`; pass `null` to disable persistence.
|
|
38
|
-
*/
|
|
39
|
-
stateSync?: SelectedWalletAccountStorage | null;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* App-wide selected wallet account state, mirroring `@solana/react`'s
|
|
43
|
-
* `SelectedWalletAccountContextProvider`.
|
|
44
|
-
*
|
|
45
|
-
* Call once near the root of your app, then read state anywhere with
|
|
46
|
-
* {@link useSelectedWalletAccount}. The selection persists as
|
|
47
|
-
* `${walletName}:${accountAddress}` through `stateSync` and is restored on
|
|
48
|
-
* the next mount when the wallet and account are available again.
|
|
49
|
-
*/
|
|
50
|
-
declare function provideSelectedWalletAccount(options?: SelectedWalletAccountOptions): SelectedWalletAccountContext;
|
|
51
|
-
/**
|
|
52
|
-
* Build the selected wallet account context without providing it. Used by
|
|
53
|
-
* the Nuxt runtime plugin, which installs the context app-wide via
|
|
54
|
-
* `app.provide` rather than inside a component setup.
|
|
55
|
-
*
|
|
56
|
-
* When called outside a component setup (as the Nuxt plugin does), `inject`
|
|
57
|
-
* cannot resolve the Solana context, so pass it explicitly through
|
|
58
|
-
* {@link solanaContextOverride}.
|
|
59
|
-
*/
|
|
60
|
-
declare function createSelectedWalletAccountContext(options?: SelectedWalletAccountOptions, solanaContextOverride?: SolanaContextLike | null): SelectedWalletAccountContext;
|
|
61
|
-
/**
|
|
62
|
-
* Read the app-wide selected wallet account provided by
|
|
63
|
-
* {@link provideSelectedWalletAccount}.
|
|
64
|
-
*
|
|
65
|
-
* Returns `[selectedAccount, setSelectedAccount, filteredWallets]`. The
|
|
66
|
-
* setter accepts `null` to clear the selection. Throws when called outside a
|
|
67
|
-
* provider — mount `SelectedWalletAccountProvider` (or call
|
|
68
|
-
* `provideSelectedWalletAccount`) first.
|
|
69
|
-
*/
|
|
70
|
-
declare function useSelectedWalletAccount(): [
|
|
71
|
-
Ref<SelectedWalletAccount | null>,
|
|
72
|
-
(account: SelectedWalletAccount | null) => void,
|
|
73
|
-
ComputedRef<SolanaWalletInfo[]>
|
|
74
|
-
];
|
|
75
|
-
/**
|
|
76
|
-
* The minimal Solana context surface this composable reads. Structural so the
|
|
77
|
-
* full `VueSolanaContext` (or the raw RPC context) satisfies it without an
|
|
78
|
-
* import cycle from the plugin to its composables.
|
|
79
|
-
*/
|
|
80
|
-
interface SolanaContextLike {
|
|
81
|
-
wallets: Ref<SolanaWalletInfo[]>;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* App-wide selected wallet account provider, mirroring `@solana/react`'s
|
|
86
|
-
* `SelectedWalletAccountContextProvider`.
|
|
87
|
-
*
|
|
88
|
-
* Wraps `provideSelectedWalletAccount`; children read state via
|
|
89
|
-
* `useSelectedWalletAccount()`.
|
|
90
|
-
*/
|
|
91
|
-
declare const SelectedWalletAccountProvider: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
92
|
-
filterWallet: {
|
|
93
|
-
type: PropType<SelectedWalletAccountOptions["filterWallet"]>;
|
|
94
|
-
default: undefined;
|
|
95
|
-
};
|
|
96
|
-
stateSync: {
|
|
97
|
-
type: PropType<SelectedWalletAccountOptions["stateSync"]>;
|
|
98
|
-
default: undefined;
|
|
99
|
-
};
|
|
100
|
-
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
101
|
-
[key: string]: any;
|
|
102
|
-
}>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
103
|
-
filterWallet: {
|
|
104
|
-
type: PropType<SelectedWalletAccountOptions["filterWallet"]>;
|
|
105
|
-
default: undefined;
|
|
106
|
-
};
|
|
107
|
-
stateSync: {
|
|
108
|
-
type: PropType<SelectedWalletAccountOptions["stateSync"]>;
|
|
109
|
-
default: undefined;
|
|
110
|
-
};
|
|
111
|
-
}>> & Readonly<{}>, {
|
|
112
|
-
filterWallet: WalletAccountFilter | undefined;
|
|
113
|
-
stateSync: SelectedWalletAccountStorage | null | undefined;
|
|
114
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
115
|
-
|
|
116
|
-
export { SelectedWalletAccountProvider, createSelectedWalletAccountContext, provideSelectedWalletAccount, selectedWalletAccountInjectionKey, useSelectedWalletAccount };
|
|
117
|
-
export type { SelectedWalletAccount, SelectedWalletAccountContext, SelectedWalletAccountOptions, WalletAccountFilter };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const useSendTransaction = require('./shared/vue.DKoM8jIV.cjs');
|
|
4
|
-
require('@vue-solana/core/errors');
|
|
5
|
-
require('vue');
|
|
6
|
-
require('./shared/vue.4C5kX4fE.cjs');
|
|
7
|
-
require('./shared/vue.BIxphCAq.cjs');
|
|
8
|
-
require('./shared/vue.DE3emjSF.cjs');
|
|
9
|
-
require('./shared/vue.DEHxNvUX.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.useSendTransaction = useSendTransaction.useSendTransaction;
|
|
14
|
-
exports.useSendTransactions = useSendTransaction.useSendTransactions;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import * as vue from 'vue';
|
|
2
|
-
import { InstructionPlanInput, SingleTransactionPlan, TransactionPlanInput, SuccessfulSingleTransactionPlanResult, TransactionPlanResult } from '@vue-solana/core/kit';
|
|
3
|
-
import { SolanaError } from '@vue-solana/core/errors';
|
|
4
|
-
|
|
5
|
-
type SendTransactionStatus = "idle" | "sending" | "sent" | "error";
|
|
6
|
-
interface SendTransactionConfig {
|
|
7
|
-
abortSignal?: AbortSignal;
|
|
8
|
-
}
|
|
9
|
-
type SendTransactionInput = InstructionPlanInput | SingleTransactionPlan | SingleTransactionPlan["message"];
|
|
10
|
-
type SendTransactionsInput = InstructionPlanInput | TransactionPlanInput;
|
|
11
|
-
/**
|
|
12
|
-
* Plan, sign with the client's signers (payer/identity), submit, and confirm
|
|
13
|
-
* a single transaction — all through the client's transaction-sending
|
|
14
|
-
* capability (`ClientWithTransactionSending`), with no wallet popup.
|
|
15
|
-
*
|
|
16
|
-
* Accepts flexible input: instructions, an instruction plan, a transaction
|
|
17
|
-
* message, or a single transaction plan.
|
|
18
|
-
*
|
|
19
|
-
* Throws with a clear capability error when the client cannot send, which
|
|
20
|
-
* includes a client without a `payer` signer — Kit reads `client.payer` when it
|
|
21
|
-
* plans a transaction, so one is always required.
|
|
22
|
-
*
|
|
23
|
-
* Calling `execute` while a prior execution is in flight aborts the prior call;
|
|
24
|
-
* the superseded attempt rejects, so check its `error.cause` to tell it apart
|
|
25
|
-
* from a real failure.
|
|
26
|
-
*/
|
|
27
|
-
declare function useSendTransaction(): {
|
|
28
|
-
data: vue.ShallowRef<SuccessfulSingleTransactionPlanResult | null, SuccessfulSingleTransactionPlanResult | null>;
|
|
29
|
-
status: vue.Ref<SendTransactionStatus, SendTransactionStatus>;
|
|
30
|
-
loading: vue.Ref<boolean, boolean>;
|
|
31
|
-
error: vue.Ref<SolanaError | null, SolanaError | null>;
|
|
32
|
-
execute: (input: SendTransactionInput, config?: SendTransactionConfig) => Promise<SuccessfulSingleTransactionPlanResult>;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Plan, sign, submit, and confirm one or more transactions — possibly a batch
|
|
36
|
-
* of messages, executed in parallel or sequentially as the plan dictates —
|
|
37
|
-
* through the client's transaction-sending capability.
|
|
38
|
-
*
|
|
39
|
-
* Throws with a clear capability error when the client cannot send, which
|
|
40
|
-
* includes a client without a `payer` signer.
|
|
41
|
-
*/
|
|
42
|
-
declare function useSendTransactions(): {
|
|
43
|
-
data: vue.ShallowRef<TransactionPlanResult | null, TransactionPlanResult | null>;
|
|
44
|
-
status: vue.Ref<SendTransactionStatus, SendTransactionStatus>;
|
|
45
|
-
loading: vue.Ref<boolean, boolean>;
|
|
46
|
-
error: vue.Ref<SolanaError | null, SolanaError | null>;
|
|
47
|
-
execute: (input: SendTransactionsInput, config?: SendTransactionConfig) => Promise<TransactionPlanResult>;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export { useSendTransaction, useSendTransactions };
|
|
51
|
-
export type { SendTransactionConfig, SendTransactionInput, SendTransactionStatus, SendTransactionsInput };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const useSendTransaction = require('./shared/vue.DKoM8jIV.cjs');
|
|
4
|
-
require('@vue-solana/core/errors');
|
|
5
|
-
require('vue');
|
|
6
|
-
require('./shared/vue.4C5kX4fE.cjs');
|
|
7
|
-
require('./shared/vue.BIxphCAq.cjs');
|
|
8
|
-
require('./shared/vue.DE3emjSF.cjs');
|
|
9
|
-
require('./shared/vue.DEHxNvUX.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.useSendTransactions = useSendTransaction.useSendTransactions;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const useSignAndSendTransaction = require('./shared/vue.CWZSMVnB.cjs');
|
|
4
|
-
require('@vue-solana/core/errors');
|
|
5
|
-
require('@vue-solana/core/timeout');
|
|
6
|
-
require('@vue-solana/core/transaction');
|
|
7
|
-
require('@vue-solana/core/wallet');
|
|
8
|
-
require('vue');
|
|
9
|
-
require('./shared/vue.BVaMoz9y.cjs');
|
|
10
|
-
require('./shared/vue.BIxphCAq.cjs');
|
|
11
|
-
require('./shared/vue.DE3emjSF.cjs');
|
|
12
|
-
require('./shared/vue.DEHxNvUX.cjs');
|
|
13
|
-
require('./shared/vue.BGxz4dru.cjs');
|
|
14
|
-
require('./shared/vue.Sbbm9JSu.cjs');
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
exports.useSignAndSendTransaction = useSignAndSendTransaction.useSignAndSendTransaction;
|