@vue-solana/vue 3.0.0 → 4.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -4
- package/dist/index.d.ts +12 -0
- package/dist/index.mjs +81 -58
- package/dist/shared/{vue.CjSw0Hh1.mjs → vue.4ne5EBD9.mjs} +4 -4
- package/dist/shared/{vue.C9OOmvkD.mjs → vue.BBN9aU6D.mjs} +2 -2
- package/dist/shared/{vue.CsFY1mfz.mjs → vue.BXNjyJ2c.mjs} +1 -1
- package/dist/shared/{vue.DlihC5GG.mjs → vue.BiKE9Xuv.mjs} +6 -4
- package/dist/shared/{vue.CXB4NEMA.mjs → vue.Bu2cQ690.mjs} +47 -17
- package/dist/shared/{vue.CpkwC8Th.mjs → vue.C6OkOK2W.mjs} +1 -1
- package/dist/shared/{vue.B9uRpSDJ.mjs → vue.CAltY57B.mjs} +6 -3
- package/dist/shared/{vue.DDQxNX5q.mjs → vue.CELGI7de.mjs} +9 -9
- package/dist/shared/{vue.BxtOHzY_.mjs → vue.CLAqNcLp.mjs} +1 -1
- package/dist/shared/{vue.hG_FieA3.mjs → vue.CW-1AuSO.mjs} +2 -2
- package/dist/shared/{vue.Mxc8w6Qk.mjs → vue.CZApWQAY.mjs} +1 -1
- package/dist/shared/vue.CbmzveKF.mjs +44 -0
- package/dist/shared/{vue.CQh3AUE8.mjs → vue.CcOZ9858.mjs} +3 -5
- package/dist/shared/{vue.B-xtuLtD.mjs → vue.D2J7_NpQ.mjs} +2 -2
- package/dist/shared/{vue.BsGwt78R.mjs → vue.D8zNWw2t.mjs} +1 -1
- package/dist/shared/{vue.CaAgH2Xt.mjs → vue.DPwdqRO_.mjs} +3 -3
- package/dist/shared/{vue.DNKD6jqM.mjs → vue.DTpvqDyY.mjs} +3 -3
- package/dist/shared/{vue.D218Ow7t.mjs → vue.DY9VadLH.mjs} +1 -8
- package/dist/shared/vue.DZVdVfy1.mjs +7 -0
- package/dist/shared/{vue.CvenSbZZ.mjs → vue.DZhPXLZz.mjs} +4 -4
- package/dist/shared/{vue.o98pAmDg.mjs → vue.DbJG4-ku.mjs} +2 -2
- package/dist/shared/{vue.BFSboXMB.mjs → vue.DbJKnSrl.mjs} +3 -3
- package/dist/shared/{vue.1Qwco2kv.mjs → vue.DcZ_R_RH.mjs} +4 -4
- package/dist/shared/{vue.C_4qJDiF.mjs → vue.DyLgoSbX.mjs} +1 -1
- package/dist/shared/{vue.XlfH_nkc.mjs → vue.FehFeE3w.mjs} +3 -3
- package/dist/shared/{vue.C1JbUTpJ.mjs → vue.UrCjmf0T.mjs} +2 -2
- package/dist/swr.d.ts +7 -1
- package/dist/swr.mjs +16 -4
- package/dist/useAccountInfo.mjs +1 -10
- package/dist/useAction.mjs +0 -2
- package/dist/useAirdrop.mjs +1 -8
- package/dist/useBalance.mjs +1 -9
- package/dist/useClientCapability.d.ts +6 -1
- package/dist/useClientCapability.mjs +1 -5
- package/dist/useConnection.d.ts +8 -1
- package/dist/useConnection.mjs +1 -5
- package/dist/useIdentity.mjs +1 -6
- package/dist/usePayer.mjs +1 -6
- package/dist/usePlanTransaction.mjs +1 -8
- package/dist/usePlanTransactions.mjs +1 -8
- package/dist/useProgramAccounts.mjs +1 -10
- package/dist/useRequest.mjs +0 -4
- package/dist/useRpc.d.ts +6 -0
- package/dist/useRpc.mjs +1 -4
- package/dist/useSelectedWalletAccount.d.ts +3 -0
- package/dist/useSelectedWalletAccount.mjs +0 -2
- package/dist/useSendTransaction.mjs +1 -8
- package/dist/useSendTransactions.mjs +1 -8
- package/dist/useSignAndSendTransaction.mjs +1 -13
- package/dist/useSignAndSendTransactions.mjs +1 -9
- package/dist/useSignIn.mjs +1 -8
- package/dist/useSignMessage.mjs +1 -8
- package/dist/useSignTransactions.mjs +1 -8
- package/dist/useSignatureStatus.d.ts +0 -1
- package/dist/useSignatureStatus.mjs +1 -8
- package/dist/useSolana.mjs +1 -3
- package/dist/useSolanaClient.d.ts +6 -0
- package/dist/useSolanaClient.mjs +1 -4
- package/dist/useSubscription.mjs +0 -2
- package/dist/useTokenAccounts.mjs +1 -10
- package/dist/useTokenBalance.mjs +1 -10
- package/dist/useTrackedData.mjs +0 -3
- package/dist/useTransaction.mjs +0 -4
- package/dist/useTransactionConfirmation.mjs +1 -9
- package/dist/useWallet.mjs +1 -6
- package/dist/useWallets.mjs +1 -4
- package/package.json +8 -5
- package/dist/buffer-polyfill.d.mts +0 -2
- package/dist/index.d.mts +0 -64
- package/dist/kit.d.mts +0 -1
- package/dist/shared/vue.BGGixph-.d.mts +0 -5
- package/dist/shared/vue.Bfu1dCKe.mjs +0 -10
- package/dist/shared/vue.CGv0ip3w.mjs +0 -52
- package/dist/shared/vue.DL3z5PxP.d.mts +0 -21
- package/dist/swr.d.mts +0 -41
- package/dist/useAccountInfo.d.mts +0 -24
- package/dist/useAction.d.mts +0 -45
- package/dist/useAirdrop.d.mts +0 -27
- package/dist/useBalance.d.mts +0 -15
- package/dist/useClientCapability.d.mts +0 -39
- package/dist/useConnection.d.mts +0 -46
- package/dist/useIdentity.d.mts +0 -3
- package/dist/usePayer.d.mts +0 -18
- package/dist/usePlanTransaction.d.mts +0 -44
- package/dist/usePlanTransactions.d.mts +0 -5
- package/dist/useProgramAccounts.d.mts +0 -45
- package/dist/useRequest.d.mts +0 -73
- package/dist/useRpc.d.mts +0 -55
- package/dist/useSelectedWalletAccount.d.mts +0 -117
- package/dist/useSendTransaction.d.mts +0 -50
- package/dist/useSendTransactions.d.mts +0 -5
- package/dist/useSignAndSendTransaction.d.mts +0 -40
- package/dist/useSignAndSendTransactions.d.mts +0 -35
- package/dist/useSignIn.d.mts +0 -23
- package/dist/useSignMessage.d.mts +0 -236
- package/dist/useSignTransactions.d.mts +0 -24
- package/dist/useSignatureStatus.d.mts +0 -26
- package/dist/useSolana.d.mts +0 -9
- package/dist/useSolanaClient.d.mts +0 -45
- package/dist/useSubscription.d.mts +0 -70
- package/dist/useTokenAccounts.d.mts +0 -19
- package/dist/useTokenBalance.d.mts +0 -17
- package/dist/useTrackedData.d.mts +0 -98
- package/dist/useTransaction.d.mts +0 -27
- package/dist/useTransactionConfirmation.d.mts +0 -38
- package/dist/useWallet.d.mts +0 -31
- package/dist/useWallets.d.mts +0 -11
|
@@ -1,13 +1 @@
|
|
|
1
|
-
export { u as useSignAndSendTransaction } from './shared/vue.
|
|
2
|
-
import '@vue-solana/core/errors';
|
|
3
|
-
import '@vue-solana/core/timeout';
|
|
4
|
-
import '@vue-solana/core/transaction';
|
|
5
|
-
import '@vue-solana/core/wallet';
|
|
6
|
-
import 'vue';
|
|
7
|
-
import './shared/vue.CpkwC8Th.mjs';
|
|
8
|
-
import './shared/vue.Mxc8w6Qk.mjs';
|
|
9
|
-
import './shared/vue.CQh3AUE8.mjs';
|
|
10
|
-
import './shared/vue.D_P5SqqD.mjs';
|
|
11
|
-
import './shared/vue.D218Ow7t.mjs';
|
|
12
|
-
import './shared/vue.CaAgH2Xt.mjs';
|
|
13
|
-
import './shared/vue.DlihC5GG.mjs';
|
|
1
|
+
export { u as useSignAndSendTransaction } from './shared/vue.4ne5EBD9.mjs';
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
export { P as PartialSignAndSendError, u as useSignAndSendTransactions } from './shared/vue.
|
|
2
|
-
import '@vue-solana/core/errors';
|
|
3
|
-
import '@vue-solana/core/timeout';
|
|
4
|
-
import '@vue-solana/core/wallet';
|
|
5
|
-
import 'vue';
|
|
6
|
-
import './shared/vue.DlihC5GG.mjs';
|
|
7
|
-
import './shared/vue.D218Ow7t.mjs';
|
|
8
|
-
import './shared/vue.CQh3AUE8.mjs';
|
|
9
|
-
import './shared/vue.D_P5SqqD.mjs';
|
|
1
|
+
export { P as PartialSignAndSendError, u as useSignAndSendTransactions } from './shared/vue.UrCjmf0T.mjs';
|
package/dist/useSignIn.mjs
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export { u as useSignIn } from './shared/vue.
|
|
2
|
-
import '@vue-solana/core/wallet';
|
|
3
|
-
import 'vue';
|
|
4
|
-
import './shared/vue.DlihC5GG.mjs';
|
|
5
|
-
import '@vue-solana/core/errors';
|
|
6
|
-
import './shared/vue.D218Ow7t.mjs';
|
|
7
|
-
import './shared/vue.CQh3AUE8.mjs';
|
|
8
|
-
import './shared/vue.D_P5SqqD.mjs';
|
|
1
|
+
export { u as useSignIn } from './shared/vue.BBN9aU6D.mjs';
|
package/dist/useSignMessage.mjs
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export { u as useSignMessage } from './shared/vue.
|
|
2
|
-
import '@vue-solana/core/wallet';
|
|
3
|
-
import 'vue';
|
|
4
|
-
import './shared/vue.DlihC5GG.mjs';
|
|
5
|
-
import '@vue-solana/core/errors';
|
|
6
|
-
import './shared/vue.D218Ow7t.mjs';
|
|
7
|
-
import './shared/vue.CQh3AUE8.mjs';
|
|
8
|
-
import './shared/vue.D_P5SqqD.mjs';
|
|
1
|
+
export { u as useSignMessage } from './shared/vue.DbJG4-ku.mjs';
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export { u as useSignTransactions } from './shared/vue.
|
|
2
|
-
import '@vue-solana/core/wallet';
|
|
3
|
-
import 'vue';
|
|
4
|
-
import './shared/vue.DlihC5GG.mjs';
|
|
5
|
-
import '@vue-solana/core/errors';
|
|
6
|
-
import './shared/vue.D218Ow7t.mjs';
|
|
7
|
-
import './shared/vue.CQh3AUE8.mjs';
|
|
8
|
-
import './shared/vue.D_P5SqqD.mjs';
|
|
1
|
+
export { u as useSignTransactions } from './shared/vue.CW-1AuSO.mjs';
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export { u as useSignatureStatus } from './shared/vue.
|
|
2
|
-
import '@vue-solana/core/errors';
|
|
3
|
-
import 'bs58';
|
|
4
|
-
import 'vue';
|
|
5
|
-
import './shared/vue.CpkwC8Th.mjs';
|
|
6
|
-
import './shared/vue.Mxc8w6Qk.mjs';
|
|
7
|
-
import './shared/vue.CQh3AUE8.mjs';
|
|
8
|
-
import './shared/vue.D_P5SqqD.mjs';
|
|
1
|
+
export { u as useSignatureStatus } from './shared/vue.Bu2cQ690.mjs';
|
package/dist/useSolana.mjs
CHANGED
|
@@ -5,6 +5,7 @@ declare function useSolanaClient(): {
|
|
|
5
5
|
client: Omit<_solana_kit.Client<{
|
|
6
6
|
signTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
7
7
|
abortSignal?: AbortSignal;
|
|
8
|
+
maxInstructionsPerTransaction?: number;
|
|
8
9
|
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
9
10
|
payer: _solana_kit.TransactionSigner;
|
|
10
11
|
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>;
|
|
@@ -13,9 +14,11 @@ declare function useSolanaClient(): {
|
|
|
13
14
|
transactionPlanner: _solana_kit.TransactionPlanner;
|
|
14
15
|
planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
15
16
|
abortSignal?: AbortSignal;
|
|
17
|
+
maxInstructionsPerTransaction?: number;
|
|
16
18
|
}) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
|
|
17
19
|
planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
18
20
|
abortSignal?: AbortSignal;
|
|
21
|
+
maxInstructionsPerTransaction?: number;
|
|
19
22
|
}) => Promise<_solana_kit.TransactionPlan>;
|
|
20
23
|
signTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
21
24
|
kind: "single";
|
|
@@ -23,6 +26,7 @@ declare function useSolanaClient(): {
|
|
|
23
26
|
planType: "transactionPlan";
|
|
24
27
|
}>, config?: {
|
|
25
28
|
abortSignal?: AbortSignal;
|
|
29
|
+
maxInstructionsPerTransaction?: number;
|
|
26
30
|
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
27
31
|
transactionPlanExecutor: _solana_kit.TransactionPlanExecutor<_solana_kit_plugin_rpc.RpcSendContext>;
|
|
28
32
|
sendTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
@@ -31,9 +35,11 @@ declare function useSolanaClient(): {
|
|
|
31
35
|
planType: "transactionPlan";
|
|
32
36
|
}>, config?: {
|
|
33
37
|
abortSignal?: AbortSignal;
|
|
38
|
+
maxInstructionsPerTransaction?: number;
|
|
34
39
|
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
35
40
|
sendTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
36
41
|
abortSignal?: AbortSignal;
|
|
42
|
+
maxInstructionsPerTransaction?: number;
|
|
37
43
|
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
38
44
|
airdrop: (address: _solana_kit.Address, amount: _solana_kit.Lamports, abortSignal?: AbortSignal) => Promise<_solana_kit.Signature | undefined>;
|
|
39
45
|
}>, "payer"> & {
|
package/dist/useSolanaClient.mjs
CHANGED
package/dist/useSubscription.mjs
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
export { u as useTokenAccounts } from './shared/vue.
|
|
2
|
-
import '@vue-solana/core/token-accounts';
|
|
3
|
-
import './shared/vue.CpkwC8Th.mjs';
|
|
4
|
-
import './shared/vue.Mxc8w6Qk.mjs';
|
|
5
|
-
import './shared/vue.CQh3AUE8.mjs';
|
|
6
|
-
import 'vue';
|
|
7
|
-
import './shared/vue.D_P5SqqD.mjs';
|
|
8
|
-
import './shared/vue.BwBqla_n.mjs';
|
|
9
|
-
import '@vue-solana/core/address';
|
|
10
|
-
import '@vue-solana/core/errors';
|
|
1
|
+
export { u as useTokenAccounts } from './shared/vue.DTpvqDyY.mjs';
|
package/dist/useTokenBalance.mjs
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
export { u as useTokenBalance } from './shared/vue.
|
|
2
|
-
import '@vue-solana/core/token-accounts';
|
|
3
|
-
import 'vue';
|
|
4
|
-
import './shared/vue.CpkwC8Th.mjs';
|
|
5
|
-
import './shared/vue.Mxc8w6Qk.mjs';
|
|
6
|
-
import './shared/vue.CQh3AUE8.mjs';
|
|
7
|
-
import './shared/vue.D_P5SqqD.mjs';
|
|
8
|
-
import './shared/vue.BwBqla_n.mjs';
|
|
9
|
-
import '@vue-solana/core/address';
|
|
10
|
-
import '@vue-solana/core/errors';
|
|
1
|
+
export { u as useTokenBalance } from './shared/vue.FehFeE3w.mjs';
|
package/dist/useTrackedData.mjs
CHANGED
package/dist/useTransaction.mjs
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
export { g as getConfirmedTransactionStatus, u as useTransactionConfirmation } from './shared/vue.
|
|
2
|
-
import '@vue-solana/core/transaction';
|
|
3
|
-
import 'vue';
|
|
4
|
-
import './shared/vue.DlihC5GG.mjs';
|
|
5
|
-
import '@vue-solana/core/errors';
|
|
6
|
-
import './shared/vue.CpkwC8Th.mjs';
|
|
7
|
-
import './shared/vue.Mxc8w6Qk.mjs';
|
|
8
|
-
import './shared/vue.CQh3AUE8.mjs';
|
|
9
|
-
import './shared/vue.D_P5SqqD.mjs';
|
|
1
|
+
export { g as getConfirmedTransactionStatus, u as useTransactionConfirmation } from './shared/vue.DPwdqRO_.mjs';
|
package/dist/useWallet.mjs
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export { u as useWallet } from './shared/vue.
|
|
2
|
-
import '@vue-solana/core/errors';
|
|
3
|
-
import '@vue-solana/core/wallet';
|
|
4
|
-
import 'vue';
|
|
5
|
-
import './shared/vue.CQh3AUE8.mjs';
|
|
6
|
-
import './shared/vue.D_P5SqqD.mjs';
|
|
1
|
+
export { u as useWallet } from './shared/vue.DY9VadLH.mjs';
|
package/dist/useWallets.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-solana/vue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-rc.0",
|
|
4
4
|
"description": "Vue plugin and composables for Solana applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -171,27 +171,30 @@
|
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
"files": [
|
|
174
|
-
"dist"
|
|
174
|
+
"dist",
|
|
175
|
+
"!dist/**/*.d.mts"
|
|
175
176
|
],
|
|
176
177
|
"publishConfig": {
|
|
177
178
|
"access": "public"
|
|
178
179
|
},
|
|
179
180
|
"dependencies": {
|
|
180
|
-
"
|
|
181
|
-
"@vue-solana/core": "3.0.0"
|
|
181
|
+
"@vue-solana/core": "4.0.0-rc.0"
|
|
182
182
|
},
|
|
183
183
|
"peerDependencies": {
|
|
184
184
|
"vue": "^3.5.0"
|
|
185
185
|
},
|
|
186
186
|
"devDependencies": {
|
|
187
|
+
"@vue/test-utils": "^2.4.11",
|
|
187
188
|
"typescript": "^5.8.3",
|
|
188
189
|
"unbuild": "^3.5.0",
|
|
190
|
+
"vitest": "^4.1.8",
|
|
189
191
|
"vue": "^3.5.16"
|
|
190
192
|
},
|
|
191
193
|
"scripts": {
|
|
192
194
|
"build": "NODE_OPTIONS=--max-old-space-size=8192 unbuild",
|
|
193
195
|
"dev": "unbuild --stub",
|
|
194
196
|
"typecheck": "tsc --noEmit",
|
|
195
|
-
"clean": "rm -rf dist"
|
|
197
|
+
"clean": "rm -rf dist",
|
|
198
|
+
"check:esm-map": "node ../../scripts/check-exports-map.mjs"
|
|
196
199
|
}
|
|
197
200
|
}
|
package/dist/index.d.mts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
export { AccountInfo, UseAccountInfoOptions, useAccountInfo } from './useAccountInfo.mjs';
|
|
2
|
-
export { UseActionOptions, UseActionReturn, UseActionStatus, useAction } from './useAction.mjs';
|
|
3
|
-
export { useAirdrop } from './useAirdrop.mjs';
|
|
4
|
-
export { BalanceInput, useBalance } from './useBalance.mjs';
|
|
5
|
-
export { MissingClientCapabilityError, UseClientCapabilityOptions, useClientCapability } from './useClientCapability.mjs';
|
|
6
|
-
export { useConnection } from './useConnection.mjs';
|
|
7
|
-
export { PlanTransactionConfig, PlanTransactionStatus, usePlanTransaction, usePlanTransactions } from './usePlanTransaction.mjs';
|
|
8
|
-
export { ProgramAccount, ProgramAccountDataSizeFilter, ProgramAccountDataSlice, ProgramAccountFilter, ProgramAccountMemcmpEncoding, ProgramAccountMemcmpFilter, UseProgramAccountsOptions, useProgramAccounts } from './useProgramAccounts.mjs';
|
|
9
|
-
export { useIdentity, usePayer } from './usePayer.mjs';
|
|
10
|
-
export { UseRequestOptions, UseRequestRefresherOptions, UseRequestReturn, UseRequestSource, UseRequestStatus, useRequest } from './useRequest.mjs';
|
|
11
|
-
export { useRpc } from './useRpc.mjs';
|
|
12
|
-
export { SelectedWalletAccount, SelectedWalletAccountContext, SelectedWalletAccountOptions, SelectedWalletAccountProvider, WalletAccountFilter, createSelectedWalletAccountContext, provideSelectedWalletAccount, selectedWalletAccountInjectionKey, useSelectedWalletAccount } from './useSelectedWalletAccount.mjs';
|
|
13
|
-
export { SendTransactionConfig, SendTransactionInput, SendTransactionStatus, SendTransactionsInput, useSendTransaction, useSendTransactions } from './useSendTransaction.mjs';
|
|
14
|
-
export { SignMessageStatus, useSignMessage } from './useSignMessage.mjs';
|
|
15
|
-
export { SignAndSendTransactionOptions, SignAndSendTransactionStatus, useSignAndSendTransaction } from './useSignAndSendTransaction.mjs';
|
|
16
|
-
export { SignTransactionsStatus, useSignTransactions } from './useSignTransactions.mjs';
|
|
17
|
-
export { PartialSignAndSendError, SignAndSendTransactionsStatus, useSignAndSendTransactions } from './useSignAndSendTransactions.mjs';
|
|
18
|
-
export { SignatureStatus, UseSignatureStatusOptions, useSignatureStatus } from './useSignatureStatus.mjs';
|
|
19
|
-
export { SignInStatus, useSignIn } from './useSignIn.mjs';
|
|
20
|
-
export { tryUseSolana, useSolana } from './useSolana.mjs';
|
|
21
|
-
export { useSolanaClient } from './useSolanaClient.mjs';
|
|
22
|
-
export { UseSubscriptionOptions, UseSubscriptionReconnectOptions, UseSubscriptionReturn, UseSubscriptionSource, UseSubscriptionStatus, useSubscription } from './useSubscription.mjs';
|
|
23
|
-
export { UseTokenAccountsOptions, useTokenAccounts } from './useTokenAccounts.mjs';
|
|
24
|
-
export { useTokenBalance } from './useTokenBalance.mjs';
|
|
25
|
-
export { UseTrackedDataInitialSource, UseTrackedDataOptions, UseTrackedDataRefresherOptions, UseTrackedDataReturn, UseTrackedDataSource, UseTrackedDataStatus, UseTrackedDataStreamSource, useTrackedData } from './useTrackedData.mjs';
|
|
26
|
-
export { UseTransactionOptions, useTransaction } from './useTransaction.mjs';
|
|
27
|
-
export { TransactionConfirmationStatus, getConfirmedTransactionStatus, useTransactionConfirmation } from './useTransactionConfirmation.mjs';
|
|
28
|
-
export { useWallet } from './useWallet.mjs';
|
|
29
|
-
export { useWallets } from './useWallets.mjs';
|
|
30
|
-
import { V as VueSolanaContext } from './shared/vue.DL3z5PxP.mjs';
|
|
31
|
-
export { S as SolanaConnectionStatus, s as solanaInjectionKey } from './shared/vue.DL3z5PxP.mjs';
|
|
32
|
-
import { GetSolanaIosWalletsOptions } from '@vue-solana/core/ios-wallet';
|
|
33
|
-
import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-wallet';
|
|
34
|
-
import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
35
|
-
export * from '@vue-solana/core/types';
|
|
36
|
-
export { TransactionStatus } from '@vue-solana/core/types';
|
|
37
|
-
import { App } from 'vue';
|
|
38
|
-
export { SolanaError, SolanaErrorCode, isSolanaError } from '@vue-solana/core/errors';
|
|
39
|
-
export * from '@vue-solana/core/kit';
|
|
40
|
-
import '@solana/kit-plugin-rpc';
|
|
41
|
-
import '@solana/kit';
|
|
42
|
-
import './shared/vue.BGGixph-.mjs';
|
|
43
|
-
import '@vue-solana/core/token-accounts';
|
|
44
|
-
|
|
45
|
-
interface VueSolanaPluginOptions extends SolanaConfig {
|
|
46
|
-
wallet?: SolanaWallet | null;
|
|
47
|
-
mobileWallet?: false | RegisterSolanaMobileWalletOptions;
|
|
48
|
-
iosWallet?: false | GetSolanaIosWalletsOptions;
|
|
49
|
-
}
|
|
50
|
-
interface VueSolanaPlugin {
|
|
51
|
-
/** Installs the plugin on a Vue app (called synchronously by `app.use`). */
|
|
52
|
-
install(app: App): void;
|
|
53
|
-
/**
|
|
54
|
-
* The app context built by `install`, available once `app.use(plugin)` has
|
|
55
|
-
* run. Lets framework integrations (e.g. the Nuxt module) hand the live
|
|
56
|
-
* context to consumers that run outside a component setup.
|
|
57
|
-
*/
|
|
58
|
-
context: VueSolanaContext | null;
|
|
59
|
-
}
|
|
60
|
-
declare function createSolanaPlugin(options?: VueSolanaPluginOptions): VueSolanaPlugin;
|
|
61
|
-
declare const VueSolana: typeof createSolanaPlugin;
|
|
62
|
-
|
|
63
|
-
export { VueSolana, VueSolanaContext, createSolanaPlugin };
|
|
64
|
-
export type { VueSolanaPlugin, VueSolanaPluginOptions };
|
package/dist/kit.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@vue-solana/core/kit';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
function decodeBase64(value) {
|
|
2
|
-
const binary = atob(value);
|
|
3
|
-
const bytes = new Uint8Array(binary.length);
|
|
4
|
-
for (let index = 0; index < binary.length; index += 1) {
|
|
5
|
-
bytes[index] = binary.charCodeAt(index);
|
|
6
|
-
}
|
|
7
|
-
return bytes;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { decodeBase64 as d };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
2
|
-
import { shallowRef, computed, ref, onScopeDispose } from 'vue';
|
|
3
|
-
import { u as useClientCapability, M as MissingClientCapabilityError } from './vue.B9uRpSDJ.mjs';
|
|
4
|
-
import { u as useSolanaClient } from './vue.Mxc8w6Qk.mjs';
|
|
5
|
-
|
|
6
|
-
function useClientAction(config) {
|
|
7
|
-
const { capability, hookName, providerHint, statuses } = config;
|
|
8
|
-
useClientCapability([capability, "payer"], { hookName, providerHint });
|
|
9
|
-
const { client } = useSolanaClient();
|
|
10
|
-
const data = shallowRef(null);
|
|
11
|
-
const status = shallowRef(statuses.idle);
|
|
12
|
-
const loading = computed(() => status.value === statuses.working);
|
|
13
|
-
const error = ref(null);
|
|
14
|
-
let executionId = 0;
|
|
15
|
-
let abortController;
|
|
16
|
-
onScopeDispose(() => {
|
|
17
|
-
abortController?.abort();
|
|
18
|
-
executionId++;
|
|
19
|
-
});
|
|
20
|
-
async function execute(input, options = {}) {
|
|
21
|
-
const method = client?.[capability];
|
|
22
|
-
if (typeof method !== "function") {
|
|
23
|
-
throw new MissingClientCapabilityError(hookName, [capability], providerHint);
|
|
24
|
-
}
|
|
25
|
-
abortController?.abort();
|
|
26
|
-
const controller = new AbortController();
|
|
27
|
-
abortController = controller;
|
|
28
|
-
const currentExecutionId = ++executionId;
|
|
29
|
-
status.value = statuses.working;
|
|
30
|
-
error.value = null;
|
|
31
|
-
data.value = null;
|
|
32
|
-
try {
|
|
33
|
-
const abortSignal = options.abortSignal ? AbortSignal.any([controller.signal, options.abortSignal]) : controller.signal;
|
|
34
|
-
const result = await method(input, { abortSignal });
|
|
35
|
-
if (currentExecutionId === executionId) {
|
|
36
|
-
data.value = result;
|
|
37
|
-
status.value = statuses.success;
|
|
38
|
-
}
|
|
39
|
-
return result;
|
|
40
|
-
} catch (cause) {
|
|
41
|
-
const normalizedError = normalizeSolanaError(cause, "RPC_FAILURE");
|
|
42
|
-
if (currentExecutionId === executionId) {
|
|
43
|
-
error.value = normalizedError;
|
|
44
|
-
status.value = statuses.error;
|
|
45
|
-
}
|
|
46
|
-
throw normalizedError;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return { data, status, loading, error, execute };
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { useClientAction as u };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SolanaError } from '@vue-solana/core/errors';
|
|
2
|
-
import { SolanaContext, SolanaWallet, SolanaWalletInfo } from '@vue-solana/core/types';
|
|
3
|
-
import { Ref, InjectionKey } from 'vue';
|
|
4
|
-
|
|
5
|
-
type SolanaConnectionStatus = "idle" | "checking" | "connected" | "error";
|
|
6
|
-
interface VueSolanaContext extends SolanaContext {
|
|
7
|
-
wallet: Ref<SolanaWallet | null>;
|
|
8
|
-
status: Ref<SolanaConnectionStatus>;
|
|
9
|
-
error: Ref<SolanaError | null>;
|
|
10
|
-
latestBlockhash: Ref<string | null>;
|
|
11
|
-
wallets: Ref<SolanaWalletInfo[]>;
|
|
12
|
-
selectedWallet: Ref<SolanaWalletInfo | null>;
|
|
13
|
-
checkConnection: () => Promise<void>;
|
|
14
|
-
setWallet: (wallet: SolanaWallet | null) => void;
|
|
15
|
-
refreshWallets: () => void;
|
|
16
|
-
selectWallet: (wallet: SolanaWalletInfo | null) => void;
|
|
17
|
-
}
|
|
18
|
-
declare const solanaInjectionKey: InjectionKey<VueSolanaContext>;
|
|
19
|
-
|
|
20
|
-
export { solanaInjectionKey as s };
|
|
21
|
-
export type { SolanaConnectionStatus as S, VueSolanaContext as V };
|
package/dist/swr.d.mts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { useRequest, UseRequestOptions, UseRequestReturn } from './useRequest.mjs';
|
|
2
|
-
import { UseSubscriptionSource, UseSubscriptionOptions, UseSubscriptionReturn } from './useSubscription.mjs';
|
|
3
|
-
import { UseTrackedDataSource, UseTrackedDataOptions, UseTrackedDataReturn } from './useTrackedData.mjs';
|
|
4
|
-
import '@vue-solana/core/errors';
|
|
5
|
-
import 'vue';
|
|
6
|
-
import '@vue-solana/core/kit';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Remove every cached SWR entry (all adapters). Useful between test cases
|
|
10
|
-
* and to reset server-side caches per request.
|
|
11
|
-
*/
|
|
12
|
-
declare function clearSwrCache(): void;
|
|
13
|
-
/**
|
|
14
|
-
* `useRequest` with cache keying. A component mounting with a key that
|
|
15
|
-
* already holds data shows it immediately (stale) while its own request
|
|
16
|
-
* revalidates; results are written back for the next mount.
|
|
17
|
-
*
|
|
18
|
-
* A `null`/`undefined` source disables the request and **clears** the
|
|
19
|
-
* cached entry for the key — including when the component mounts with the
|
|
20
|
-
* source already disabled.
|
|
21
|
-
*/
|
|
22
|
-
declare function useRequestSwr<TResult>(key: string, source: Parameters<typeof useRequest<TResult>>[0], options?: UseRequestOptions): UseRequestReturn<TResult>;
|
|
23
|
-
/**
|
|
24
|
-
* `useSubscription` with cache keying — a freshly mounted component seeds
|
|
25
|
-
* from the last-known stream value while its own subscription connects.
|
|
26
|
-
*
|
|
27
|
-
* A `null`/`undefined` source disables the subscription and **clears** the
|
|
28
|
-
* cached entry for the key.
|
|
29
|
-
*/
|
|
30
|
-
declare function useSubscriptionSwr<TResult>(key: string, source: UseSubscriptionSource<TResult>, options?: UseSubscriptionOptions): UseSubscriptionReturn<TResult>;
|
|
31
|
-
/**
|
|
32
|
-
* `useTrackedData` with cache keying — seeds from the last-known
|
|
33
|
-
* {@link SolanaRpcResponse} envelope (data **and** slot context) while the
|
|
34
|
-
* fetch + subscription pair revalidates.
|
|
35
|
-
*
|
|
36
|
-
* A `null`/`undefined` source disables the composable and **clears** the
|
|
37
|
-
* cached entry for the key.
|
|
38
|
-
*/
|
|
39
|
-
declare function useTrackedDataSwr<TInitialValue, TStreamValue, TItem>(key: string, source: UseTrackedDataSource<TInitialValue, TStreamValue, TItem>, options?: UseTrackedDataOptions): UseTrackedDataReturn<TItem>;
|
|
40
|
-
|
|
41
|
-
export { clearSwrCache, useRequestSwr, useSubscriptionSwr, useTrackedDataSwr };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as vue from 'vue';
|
|
2
|
-
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import * as _vue_solana_core_errors from '@vue-solana/core/errors';
|
|
4
|
-
import { Commitment } from '@vue-solana/core/kit';
|
|
5
|
-
|
|
6
|
-
interface UseAccountInfoOptions {
|
|
7
|
-
commitment?: Commitment;
|
|
8
|
-
}
|
|
9
|
-
interface AccountInfo {
|
|
10
|
-
executable: boolean;
|
|
11
|
-
lamports: number;
|
|
12
|
-
owner: string;
|
|
13
|
-
space: number;
|
|
14
|
-
data: Uint8Array;
|
|
15
|
-
}
|
|
16
|
-
declare function useAccountInfo(address: MaybeRefOrGetter<string | null | undefined>, options?: UseAccountInfoOptions): {
|
|
17
|
-
error: vue.ShallowRef<_vue_solana_core_errors.SolanaError | null>;
|
|
18
|
-
loading: vue.ShallowRef<boolean>;
|
|
19
|
-
refresh: () => Promise<AccountInfo | null>;
|
|
20
|
-
accountInfo: vue.ShallowRef<AccountInfo | null>;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export { useAccountInfo };
|
|
24
|
-
export type { AccountInfo, UseAccountInfoOptions };
|
package/dist/useAction.d.mts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ComputedRef, Ref } from 'vue';
|
|
2
|
-
|
|
3
|
-
type UseActionStatus = "idle" | "running" | "success" | "error";
|
|
4
|
-
interface UseActionOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Called after a dispatch settles successfully.
|
|
7
|
-
*/
|
|
8
|
-
onSuccess?: (data: unknown) => void;
|
|
9
|
-
/**
|
|
10
|
-
* Called after a dispatch fails for a reason other than supersession.
|
|
11
|
-
*/
|
|
12
|
-
onError?: (error: unknown) => void;
|
|
13
|
-
}
|
|
14
|
-
interface UseActionReturn<TArgs extends readonly unknown[], TResult> {
|
|
15
|
-
data: ComputedRef<TResult | undefined>;
|
|
16
|
-
dispatch: (...args: TArgs) => Promise<TResult>;
|
|
17
|
-
error: ComputedRef<unknown>;
|
|
18
|
-
isRunning: ComputedRef<boolean>;
|
|
19
|
-
reset: () => void;
|
|
20
|
-
status: ComputedRef<UseActionStatus>;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Generic async action state machine.
|
|
24
|
-
*
|
|
25
|
-
* Accepts any async function that receives a fresh `AbortSignal` per call and
|
|
26
|
-
* tracks `{ data, dispatch, error, isRunning, reset, status }` through Vue
|
|
27
|
-
* reactive state.
|
|
28
|
-
*
|
|
29
|
-
* - There is no dependencies array: pass the handler directly or as a ref;
|
|
30
|
-
* `dispatch` always invokes the latest closure, so handlers reading
|
|
31
|
-
* reactive state never see stale values. `dispatch` keeps a stable identity
|
|
32
|
-
* across the component lifetime.
|
|
33
|
-
* - Calling `dispatch` again while a call is in flight aborts the previous
|
|
34
|
-
* call. Superseded calls reject with an abort reason so callers can detect
|
|
35
|
-
* them; they never corrupt state.
|
|
36
|
-
* - Failures surface on `error` while the previous `data` is preserved for
|
|
37
|
-
* stale-while-revalidate rendering.
|
|
38
|
-
*
|
|
39
|
-
* The underlying state machine is `createSolanaActionStore` from
|
|
40
|
-
* `@vue-solana/core/action`, shared with non-Vue consumers.
|
|
41
|
-
*/
|
|
42
|
-
declare function useAction<TArgs extends readonly unknown[], TResult>(action: ((signal: AbortSignal, ...args: TArgs) => Promise<TResult>) | Ref<(signal: AbortSignal, ...args: TArgs) => Promise<TResult>>, options?: UseActionOptions): UseActionReturn<TArgs, TResult>;
|
|
43
|
-
|
|
44
|
-
export { useAction };
|
|
45
|
-
export type { UseActionOptions, UseActionReturn, UseActionStatus };
|
package/dist/useAirdrop.d.mts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Address, Lamports, Signature } from '@vue-solana/core/kit';
|
|
2
|
-
import { UseActionReturn } from './useAction.mjs';
|
|
3
|
-
import 'vue';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Airdrops SOL into an account. Each `dispatch(address, amount)` runs the
|
|
7
|
-
* airdrop with a fresh `AbortSignal`; calling `dispatch` again while a call is
|
|
8
|
-
* in flight aborts the previous one.
|
|
9
|
-
*
|
|
10
|
-
* Requires the client to expose an `airdrop` capability, typically installed
|
|
11
|
-
* with the RPC airdrop plugin, e.g.
|
|
12
|
-
* `createClient().use(solanaRpc({ ... })).use(rpcAirdrop())` from
|
|
13
|
-
* `@solana/kit-plugin-rpc`. `solanaRpc()` is required rather than the
|
|
14
|
-
* read-only `solanaRpcConnection()`: an airdrop signs a request, so the
|
|
15
|
-
* client needs a `payer`. The capability is commonly available on test
|
|
16
|
-
* networks (devnet, testnet) and local validators.
|
|
17
|
-
*
|
|
18
|
-
* Some implementations (e.g. LiteSVM) update balances directly without sending
|
|
19
|
-
* a transaction, in which case the resolved `data` is `undefined` rather than
|
|
20
|
-
* a {@link Signature}.
|
|
21
|
-
*/
|
|
22
|
-
declare function useAirdrop(): UseActionReturn<[
|
|
23
|
-
address: Address,
|
|
24
|
-
amount: Lamports
|
|
25
|
-
], Signature | undefined>;
|
|
26
|
-
|
|
27
|
-
export { useAirdrop };
|
package/dist/useBalance.d.mts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as vue from 'vue';
|
|
2
|
-
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import * as _vue_solana_core_errors from '@vue-solana/core/errors';
|
|
4
|
-
import { Commitment } from '@vue-solana/core/kit';
|
|
5
|
-
|
|
6
|
-
type BalanceInput = string | null | undefined;
|
|
7
|
-
declare function useBalance(address: MaybeRefOrGetter<BalanceInput>, commitment?: Commitment): {
|
|
8
|
-
error: vue.ShallowRef<_vue_solana_core_errors.SolanaError | null>;
|
|
9
|
-
loading: vue.ShallowRef<boolean>;
|
|
10
|
-
refresh: () => Promise<number | null>;
|
|
11
|
-
balance: vue.ShallowRef<number | null>;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { useBalance };
|
|
15
|
-
export type { BalanceInput };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Thrown by {@link useClientCapability} when the installed Solana client does
|
|
3
|
-
* not expose a requested capability.
|
|
4
|
-
*/
|
|
5
|
-
declare class MissingClientCapabilityError extends Error {
|
|
6
|
-
/** Name of the hook that requested the capability, e.g. `usePayer`. */
|
|
7
|
-
readonly hookName: string;
|
|
8
|
-
/** Human guidance for installing the capability on the client. */
|
|
9
|
-
readonly providerHint: string;
|
|
10
|
-
/** The missing capability name(s). */
|
|
11
|
-
readonly capabilities: readonly string[];
|
|
12
|
-
constructor(hookName: string, capabilities: readonly string[], providerHint: string);
|
|
13
|
-
}
|
|
14
|
-
interface UseClientCapabilityOptions {
|
|
15
|
-
/**
|
|
16
|
-
* Name of the calling hook for error messages (defaults to
|
|
17
|
-
* `useClientCapability`).
|
|
18
|
-
*/
|
|
19
|
-
hookName?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Guidance appended to the error when a capability is missing, e.g. which
|
|
22
|
-
* `@solana/kit` plugin to `.use()`.
|
|
23
|
-
*/
|
|
24
|
-
providerHint?: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Runtime assertion that a capability is installed on the (loosely-typed)
|
|
28
|
-
* Solana client. Throws a {@link MissingClientCapabilityError} — naming the
|
|
29
|
-
* calling hook and how to install the capability — if any requested
|
|
30
|
-
* capability is missing. Accepts one capability name or an array.
|
|
31
|
-
*
|
|
32
|
-
* The assertion runs synchronously during setup (the first step of mount),
|
|
33
|
-
* so a misconfigured client fails fast with a clear error instead of a
|
|
34
|
-
* cryptic `undefined is not a function` later on.
|
|
35
|
-
*/
|
|
36
|
-
declare function useClientCapability(capability: string | readonly string[], options?: UseClientCapabilityOptions): void;
|
|
37
|
-
|
|
38
|
-
export { MissingClientCapabilityError, useClientCapability };
|
|
39
|
-
export type { UseClientCapabilityOptions };
|