@vue-solana/vue 2.3.0 → 2.4.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 +68 -61
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +5 -5
- package/dist/shared/{vue.BY0qpgYr.cjs → vue.4C5kX4fE.cjs} +2 -1
- package/dist/shared/{vue.CATOh_9G.mjs → vue.B-xtuLtD.mjs} +1 -1
- package/dist/shared/{vue.CTqPbvz3.cjs → vue.B4eMoJT2.cjs} +2 -2
- package/dist/shared/{vue.B8LptjZP.mjs → vue.B9uRpSDJ.mjs} +2 -1
- package/dist/shared/{vue.C4hGlFC8.mjs → vue.Co5rj-I6.mjs} +6 -5
- package/dist/shared/{vue.DT4vCUa6.mjs → vue.DAthhH4D.mjs} +4 -4
- package/dist/shared/{vue.BSfiHqwj.mjs → vue.DDQxNX5q.mjs} +2 -2
- package/dist/shared/{vue.BFbIDI66.cjs → vue.DKoM8jIV.cjs} +4 -4
- package/dist/shared/{vue.BfGt94sg.cjs → vue.Dn3KLJZH.cjs} +6 -5
- package/dist/shared/{vue.g8fnm_ca.cjs → vue.ldvmk9NM.cjs} +1 -1
- package/dist/useAirdrop.cjs +2 -2
- package/dist/useAirdrop.d.cts +4 -2
- package/dist/useAirdrop.d.mts +4 -2
- package/dist/useAirdrop.d.ts +4 -2
- package/dist/useAirdrop.mjs +2 -2
- package/dist/useClientCapability.cjs +1 -1
- package/dist/useClientCapability.mjs +1 -1
- package/dist/useConnection.d.cts +35 -2
- package/dist/useConnection.d.mts +35 -2
- package/dist/useConnection.d.ts +35 -2
- package/dist/useIdentity.cjs +2 -2
- package/dist/useIdentity.mjs +2 -2
- package/dist/usePayer.cjs +2 -2
- package/dist/usePayer.mjs +2 -2
- package/dist/usePlanTransaction.cjs +2 -2
- package/dist/usePlanTransaction.d.cts +5 -1
- package/dist/usePlanTransaction.d.mts +5 -1
- package/dist/usePlanTransaction.d.ts +5 -1
- package/dist/usePlanTransaction.mjs +2 -2
- package/dist/usePlanTransactions.cjs +2 -2
- package/dist/usePlanTransactions.mjs +2 -2
- package/dist/useRpc.d.cts +35 -2
- package/dist/useRpc.d.mts +35 -2
- package/dist/useRpc.d.ts +35 -2
- package/dist/useSendTransaction.cjs +2 -2
- package/dist/useSendTransaction.d.cts +6 -1
- package/dist/useSendTransaction.d.mts +6 -1
- package/dist/useSendTransaction.d.ts +6 -1
- package/dist/useSendTransaction.mjs +2 -2
- package/dist/useSendTransactions.cjs +2 -2
- package/dist/useSendTransactions.mjs +2 -2
- package/dist/useSolanaClient.d.cts +35 -2
- package/dist/useSolanaClient.d.mts +35 -2
- package/dist/useSolanaClient.d.ts +35 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -33,16 +33,17 @@ New to Solana? Start with the official docs and the project concepts guide:
|
|
|
33
33
|
- Live data composables over Kit reactive stores (`useRequest`, `useSubscription`, `useTrackedData`) plus SWR cache adapters.
|
|
34
34
|
- A generic async action state machine (`useAction`) built on `@vue-solana/core/action`.
|
|
35
35
|
- Reactive Kit client signers (`usePayer`, `useIdentity`) and transaction planning (`usePlanTransaction`, `usePlanTransactions`) with fail-fast client capability assertions.
|
|
36
|
+
- Client-sent transactions through the official Kit planner and RPC plan-sending executor installed by the default client.
|
|
36
37
|
- Direct subpath exports for narrower imports.
|
|
37
38
|
|
|
38
39
|
## Compatibility
|
|
39
40
|
|
|
40
|
-
| Requirement | Supported
|
|
41
|
-
| ------------- |
|
|
42
|
-
| Vue | `^3.5.0`
|
|
43
|
-
| TypeScript | TypeScript 5.x recommended
|
|
44
|
-
| Solana client | Provided through `@vue-solana/core`
|
|
45
|
-
| Clusters | `mainnet-beta
|
|
41
|
+
| Requirement | Supported |
|
|
42
|
+
| ------------- | ----------------------------------------------------------------- |
|
|
43
|
+
| Vue | `^3.5.0` |
|
|
44
|
+
| TypeScript | TypeScript 5.x recommended |
|
|
45
|
+
| Solana client | Provided through `@vue-solana/core` |
|
|
46
|
+
| Clusters | `mainnet` (alias `mainnet-beta`), `devnet`, `testnet`, `localnet` |
|
|
46
47
|
|
|
47
48
|
## Install
|
|
48
49
|
|
|
@@ -86,27 +87,31 @@ You can also pass a custom RPC endpoint:
|
|
|
86
87
|
```ts
|
|
87
88
|
createApp(App).use(
|
|
88
89
|
createSolanaPlugin({
|
|
89
|
-
cluster: "mainnet
|
|
90
|
+
cluster: "mainnet",
|
|
90
91
|
endpoint: "https://your-rpc.example.com",
|
|
91
92
|
commitment: "confirmed",
|
|
92
93
|
}),
|
|
93
94
|
);
|
|
94
95
|
```
|
|
95
96
|
|
|
96
|
-
Supported clusters are `mainnet-beta
|
|
97
|
+
Supported clusters are `mainnet` (legacy alias `mainnet-beta`), `devnet`, `testnet`, and `localnet`. Use `mainnet` for Solana mainnet; this is Solana's official mainnet cluster name.
|
|
98
|
+
|
|
99
|
+
`payer` and `payerSecretKey` are supported by direct Vue/core clients. A client-sent transaction requires a payer. Never put a raw secret or `payerSecretKey` in Nuxt public runtime config, and never ship a funded signing key to an end-user browser. The default `createSolanaPlugin()` client composes the official `solanaRpc()`, `rpcTransactionPlanner()`, and `rpcTransactionPlanSendingExecutor()` stack; the old custom fallback sender is not used.
|
|
97
100
|
|
|
98
101
|
### Plugin Options
|
|
99
102
|
|
|
100
|
-
| Option
|
|
101
|
-
|
|
|
102
|
-
| `cluster`
|
|
103
|
-
| `endpoint`
|
|
104
|
-
| `wsEndpoint`
|
|
105
|
-
| `commitment`
|
|
106
|
-
| `autoConnect`
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
103
|
+
| Option | Type | Default | Description |
|
|
104
|
+
| ---------------- | -------------------------------------------------------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------- |
|
|
105
|
+
| `cluster` | `"mainnet" \| "mainnet-beta" \| "devnet" \| "testnet" \| "localnet"` | `"devnet"` | Solana cluster used when `endpoint` is omitted. |
|
|
106
|
+
| `endpoint` | `string` | Public endpoint for `cluster` | HTTP RPC endpoint. Use a dedicated RPC provider for production apps. |
|
|
107
|
+
| `wsEndpoint` | `string` | Derived from `endpoint` | WebSocket RPC endpoint. |
|
|
108
|
+
| `commitment` | Solana commitment | Solana client default | Default commitment for created connections. |
|
|
109
|
+
| `autoConnect` | `boolean` | `false` | Reconnects only a previously selected discovered wallet identity when it is discovered again. |
|
|
110
|
+
| `payer` | `TransactionSigner` | None | Client fee payer and signer for client-sent transactions. |
|
|
111
|
+
| `payerSecretKey` | `string` | None | Base64 64-byte Ed25519 keypair, secret key first, resolved at client creation. |
|
|
112
|
+
| `wallet` | `SolanaWallet` | Disabled | Custom wallet adapter, useful for tests or custom integrations. |
|
|
113
|
+
| `mobileWallet` | `MobileWalletOptions \| false` | Enabled on supported Android clients | Configures or disables Android Mobile Wallet Adapter registration. |
|
|
114
|
+
| `iosWallet` | `iOSWalletOptions \| false` | Enabled on iOS browsers | Configures or disables iOS browser wallet universal links (Phantom, Solflare, Backpack). |
|
|
110
115
|
|
|
111
116
|
The root export remains supported. For composables, prefer direct subpath imports in new code so bundlers can avoid evaluating unrelated package entry code:
|
|
112
117
|
|
|
@@ -188,7 +193,7 @@ const { balance, loading, error, refresh } = useBalance(address);
|
|
|
188
193
|
|
|
189
194
|
### Airdrop on Test Networks
|
|
190
195
|
|
|
191
|
-
`useAirdrop()` sends SOL to an account on devnet, testnet, or a local validator.
|
|
196
|
+
`useAirdrop()` sends SOL to an account on devnet, testnet, or a local validator. The default Vue client includes the RPC and airdrop capabilities; a custom client can install them with `createClient().use(solanaRpc({ ... })).use(rpcAirdrop())` from `@solana/kit-plugin-rpc`.
|
|
192
197
|
|
|
193
198
|
```ts
|
|
194
199
|
import { lamports } from "@solana/kit";
|
|
@@ -368,7 +373,9 @@ A wallet may modify the message or transaction before signing — for example to
|
|
|
368
373
|
|
|
369
374
|
### Sending with the Client (no wallet popup)
|
|
370
375
|
|
|
371
|
-
`useSendTransaction()` and `useSendTransactions()` send through the Kit client's transaction-sending capability (`ClientWithTransactionSending`) instead of the connected wallet. The client plans the transaction from your input, signs it with its own signers — typically the client identity or `payer` keypair, e.g. a relayer — submits it, and returns the result. There is no wallet extension and no approval popup.
|
|
376
|
+
`useSendTransaction()` and `useSendTransactions()` send through the Kit client's transaction-sending capability (`ClientWithTransactionSending`) instead of the connected wallet. The client plans the transaction from your input, signs it with its own signers — typically the client identity or `payer` keypair, e.g. a relayer — submits it, and returns the result. There is no wallet extension and no approval popup. The official executor waits for `confirmed` commitment before resolving.
|
|
377
|
+
|
|
378
|
+
Configure a direct client with `payer` or `payerSecretKey`. `payerSecretKey` is a base64 64-byte Ed25519 keypair and must stay in a trusted server or development context. Never put it in Nuxt public runtime config or ship a funded key to an end-user browser.
|
|
372
379
|
|
|
373
380
|
**Which to use:**
|
|
374
381
|
|
|
@@ -382,7 +389,7 @@ A wallet may modify the message or transaction before signing — for example to
|
|
|
382
389
|
|
|
383
390
|
Use the client flow for automated or server-backed signing (airdrop faucet, cron jobs, relayer fees paid by your keypair), and the wallet flow when the end user must own and approve each transaction.
|
|
384
391
|
|
|
385
|
-
**
|
|
392
|
+
**Default client composition.** `createSolanaPlugin()` and `createSolanaClient()` install the official `solanaRpc()`, `rpcTransactionPlanner()`, and `rpcTransactionPlanSendingExecutor()` plugins by default. The old custom fallback sender is not used, so `useSendTransaction()` and `useSendTransactions()` do not need a second manual plugin installation. The official executor waits for `confirmed` commitment before `execute()` resolves and the composable reports `sent`. A custom client must still provide the planner and sending executor and a `payer`.
|
|
386
393
|
|
|
387
394
|
```ts
|
|
388
395
|
import { useSendTransaction } from "@vue-solana/vue/useSendTransaction";
|
|
@@ -579,45 +586,45 @@ Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
|
|
|
579
586
|
|
|
580
587
|
## API
|
|
581
588
|
|
|
582
|
-
| API | Description
|
|
583
|
-
| ------------------------------------------------------------------------------------------ |
|
|
584
|
-
| `createSolanaPlugin(options?)` | Installs the Vue Solana context.
|
|
585
|
-
| `VueSolana` | Alias for `createSolanaPlugin`.
|
|
586
|
-
| `useSolana()` | Returns the full injected Solana context.
|
|
587
|
-
| `useRpc()` | Returns cluster, endpoint, connection status, latest blockhash, the Kit `client`, and `checkConnection()`.
|
|
588
|
-
| `useSolanaClient()` | Returns the injected Kit client as `{ client, rpc }`. The recommended RPC path.
|
|
589
|
-
| `useConnection()` | Returns the Kit `client`. Deprecated in favor of `useSolanaClient()`.
|
|
590
|
-
| `useWallet()` | Returns wallet refs, computed connection state, and wallet actions.
|
|
591
|
-
| `useWallets()` | Returns discovered browser extension wallets, Android MWA wallets, iOS browser wallet links, and wallet selection actions.
|
|
592
|
-
| `useSignMessage()` | Signs arbitrary message bytes through the connected wallet when message signing is supported.
|
|
593
|
-
| `useBalance(address, commitment?)` | Loads lamport balance for an address string.
|
|
594
|
-
| `useAirdrop()` | Airdrops SOL on devnet/testnet/localnets; `data` is the `Signature`, or `undefined` when applied directly.
|
|
595
|
-
| `useAccountInfo(address, options?)` | Loads normalized account info (executable, lamports, owner, space, data bytes).
|
|
596
|
-
| `useProgramAccounts(programId, config?)` | Loads accounts owned by a program with optional filters, commitment, and `dataSlice`.
|
|
597
|
-
| `useTransaction(handler, options?)` | Generic async transaction state helper with optional timeout settings.
|
|
598
|
-
| `useTransactionConfirmation(options?)` | Confirms a submitted signature with reactive status and timeout/error state.
|
|
599
|
-
| `useSignatureStatus(signature, options?)` | Reads a transaction signature status with optional polling.
|
|
600
|
-
| `useSignAndSendTransaction()` | Signs and sends a transaction through the configured wallet, with optional confirmation waiting.
|
|
601
|
-
| `useTokenAccounts(owner, options?)` | Reads SPL token accounts for an owner.
|
|
602
|
-
| `useTokenBalance(mint, owner, commitment?)` | Reads the token balance for a mint/owner pair.
|
|
603
|
-
| `useAction(handler, options?)` | Generic async action state machine; each dispatch aborts the prior in-flight call.
|
|
604
|
-
| `useRequest(source, options?)` | One-shot Kit request that re-fires when its source changes, preserving the previous `data` while revalidating.
|
|
605
|
-
| `useSubscription(source, options?)` | Live data over a Kit reactive stream store (e.g. RPC subscriptions), torn down on unmount.
|
|
606
|
-
| `useTrackedData(source, options?)` | Slot-deduplicated fetch plus subscription over Kit's slot-tracking store.
|
|
607
|
-
| `useRequestSwr(key, ...)` / `useSubscriptionSwr(key, ...)` / `useTrackedDataSwr(key, ...)` | Cache-keyed SWR adapters seeding fresh mounts from the last-known result.
|
|
608
|
-
| `clearSwrCache()` | Clears every cached SWR entry.
|
|
609
|
-
| `useSignIn(input?)` | Sign In With Solana (SIWS) trigger returning `{ account, signedMessage, signature }` for server-side verification.
|
|
610
|
-
| `useSelectedWalletAccount()` | App-wide selected wallet account context: `[selectedAccount, setSelectedAccount, filteredWallets]`.
|
|
611
|
-
| `SelectedWalletAccountProvider` | Component that provides the selected wallet account context to its subtree.
|
|
612
|
-
| `useSignTransactions()` | Batch-signs transactions through the wallet, preferring `signTransactions` and falling back to `signAllTransactions`.
|
|
613
|
-
| `useSignAndSendTransactions()` | Signs and sends multiple transactions, returning one signature each, with a singular sequential fallback.
|
|
614
|
-
| `useClientCapability(capability, options?)` | Fails fast with a clear error when the configured Solana client lacks a requested capability.
|
|
615
|
-
| `usePayer()` | Reactive Kit client `payer` signer ref
|
|
616
|
-
| `useIdentity()` | Reactive Kit client `identity` signer ref (requires
|
|
617
|
-
| `usePlanTransaction()` | Plans a single transaction message from instruction inputs without signing or sending.
|
|
618
|
-
| `usePlanTransactions()` | Plans a batch of transaction messages from instruction inputs.
|
|
619
|
-
| `useSendTransaction()` |
|
|
620
|
-
| `useSendTransactions()` | Sends a batch
|
|
589
|
+
| API | Description |
|
|
590
|
+
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
591
|
+
| `createSolanaPlugin(options?)` | Installs the Vue Solana context. |
|
|
592
|
+
| `VueSolana` | Alias for `createSolanaPlugin`. |
|
|
593
|
+
| `useSolana()` | Returns the full injected Solana context. |
|
|
594
|
+
| `useRpc()` | Returns cluster, endpoint, connection status, latest blockhash, the Kit `client`, and `checkConnection()`. |
|
|
595
|
+
| `useSolanaClient()` | Returns the injected Kit client as `{ client, rpc }`. The recommended RPC path. |
|
|
596
|
+
| `useConnection()` | Returns the Kit `client`. Deprecated in favor of `useSolanaClient()`. |
|
|
597
|
+
| `useWallet()` | Returns wallet refs, computed connection state, and wallet actions. |
|
|
598
|
+
| `useWallets()` | Returns discovered browser extension wallets, Android MWA wallets, iOS browser wallet links, and wallet selection actions. |
|
|
599
|
+
| `useSignMessage()` | Signs arbitrary message bytes through the connected wallet when message signing is supported. |
|
|
600
|
+
| `useBalance(address, commitment?)` | Loads lamport balance for an address string. |
|
|
601
|
+
| `useAirdrop()` | Airdrops SOL on devnet/testnet/localnets; `data` is the `Signature`, or `undefined` when applied directly. |
|
|
602
|
+
| `useAccountInfo(address, options?)` | Loads normalized account info (executable, lamports, owner, space, data bytes). |
|
|
603
|
+
| `useProgramAccounts(programId, config?)` | Loads accounts owned by a program with optional filters, commitment, and `dataSlice`. |
|
|
604
|
+
| `useTransaction(handler, options?)` | Generic async transaction state helper with optional timeout settings. |
|
|
605
|
+
| `useTransactionConfirmation(options?)` | Confirms a submitted signature with reactive status and timeout/error state. |
|
|
606
|
+
| `useSignatureStatus(signature, options?)` | Reads a transaction signature status with optional polling. |
|
|
607
|
+
| `useSignAndSendTransaction()` | Signs and sends a transaction through the configured wallet, with optional confirmation waiting. |
|
|
608
|
+
| `useTokenAccounts(owner, options?)` | Reads SPL token accounts for an owner. |
|
|
609
|
+
| `useTokenBalance(mint, owner, commitment?)` | Reads the token balance for a mint/owner pair. |
|
|
610
|
+
| `useAction(handler, options?)` | Generic async action state machine; each dispatch aborts the prior in-flight call. |
|
|
611
|
+
| `useRequest(source, options?)` | One-shot Kit request that re-fires when its source changes, preserving the previous `data` while revalidating. |
|
|
612
|
+
| `useSubscription(source, options?)` | Live data over a Kit reactive stream store (e.g. RPC subscriptions), torn down on unmount. |
|
|
613
|
+
| `useTrackedData(source, options?)` | Slot-deduplicated fetch plus subscription over Kit's slot-tracking store. |
|
|
614
|
+
| `useRequestSwr(key, ...)` / `useSubscriptionSwr(key, ...)` / `useTrackedDataSwr(key, ...)` | Cache-keyed SWR adapters seeding fresh mounts from the last-known result. |
|
|
615
|
+
| `clearSwrCache()` | Clears every cached SWR entry. |
|
|
616
|
+
| `useSignIn(input?)` | Sign In With Solana (SIWS) trigger returning `{ account, signedMessage, signature }` for server-side verification. |
|
|
617
|
+
| `useSelectedWalletAccount()` | App-wide selected wallet account context: `[selectedAccount, setSelectedAccount, filteredWallets]`. |
|
|
618
|
+
| `SelectedWalletAccountProvider` | Component that provides the selected wallet account context to its subtree. |
|
|
619
|
+
| `useSignTransactions()` | Batch-signs transactions through the wallet, preferring `signTransactions` and falling back to `signAllTransactions`. |
|
|
620
|
+
| `useSignAndSendTransactions()` | Signs and sends multiple transactions, returning one signature each, with a singular sequential fallback. |
|
|
621
|
+
| `useClientCapability(capability, options?)` | Fails fast with a clear error when the configured Solana client lacks a requested capability. |
|
|
622
|
+
| `usePayer()` | Reactive Kit client `payer` signer ref. The default client exposes a configured payer when supplied. |
|
|
623
|
+
| `useIdentity()` | Reactive Kit client `identity` signer ref (requires an identity signer on a custom client). |
|
|
624
|
+
| `usePlanTransaction()` | Plans a single transaction message from instruction inputs without signing or sending; the default client includes the official planner. |
|
|
625
|
+
| `usePlanTransactions()` | Plans a batch of transaction messages from instruction inputs. |
|
|
626
|
+
| `useSendTransaction()` | Uses the official client transaction-sending capability to plan, sign, submit, and wait for `confirmed` commitment (no wallet). |
|
|
627
|
+
| `useSendTransactions()` | Sends a batch through the same official capability, waiting for `confirmed` commitment. |
|
|
621
628
|
|
|
622
629
|
Direct composable subpaths:
|
|
623
630
|
|
|
@@ -665,7 +672,7 @@ Other direct subpaths:
|
|
|
665
672
|
- Wallet and RPC operations require the plugin-provided client context. Composables are SSR-safe, but real wallet work should run after hydration or in user actions.
|
|
666
673
|
- Public Solana RPC endpoints are useful for development, but production apps should use dedicated RPC infrastructure.
|
|
667
674
|
- Broad `useProgramAccounts()` scans can be expensive or blocked on public RPC nodes. Prefer narrow filters and `dataSlice`.
|
|
668
|
-
- Use `mainnet
|
|
675
|
+
- Use `mainnet` for Solana mainnet. This is Solana's official mainnet cluster name; the legacy `mainnet-beta` spelling is still accepted and redirects to the same endpoint.
|
|
669
676
|
- v2.0.0 removed `@solana/web3-compat` and the `web3` subpaths. Build transaction messages with `@solana/kit` and pass raw `Uint8Array` wire bytes to wallet flows. See the [Kit Migration guide](https://vue-solana-docs.vercel.app/guides/kit-migration) for migrating from v1.
|
|
670
677
|
- Desktop native app wallets are planned but not implemented yet.
|
|
671
678
|
|
package/dist/index.cjs
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
const useAccountInfo = require('./shared/vue.D-qi8PSL.cjs');
|
|
4
4
|
const useAction = require('./shared/vue.CoaIWGPT.cjs');
|
|
5
|
-
const useAirdrop = require('./shared/vue.
|
|
5
|
+
const useAirdrop = require('./shared/vue.B4eMoJT2.cjs');
|
|
6
6
|
const useBalance = require('./shared/vue.E_npPFoV.cjs');
|
|
7
|
-
const useClientCapability = require('./shared/vue.
|
|
7
|
+
const useClientCapability = require('./shared/vue.4C5kX4fE.cjs');
|
|
8
8
|
const useConnection = require('./shared/vue.BVaMoz9y.cjs');
|
|
9
|
-
const usePlanTransaction = require('./shared/vue.
|
|
9
|
+
const usePlanTransaction = require('./shared/vue.Dn3KLJZH.cjs');
|
|
10
10
|
const useProgramAccounts = require('./shared/vue.Di7yjJ-R.cjs');
|
|
11
|
-
const usePayer = require('./shared/vue.
|
|
11
|
+
const usePayer = require('./shared/vue.ldvmk9NM.cjs');
|
|
12
12
|
const useRequest = require('./shared/vue.ZuUCEEab.cjs');
|
|
13
13
|
const useRpc = require('./shared/vue.FiMmnMHr.cjs');
|
|
14
14
|
const SelectedWalletAccountProvider = require('./shared/vue.DDbVk0Zh.cjs');
|
|
15
|
-
const useSendTransaction = require('./shared/vue.
|
|
15
|
+
const useSendTransaction = require('./shared/vue.DKoM8jIV.cjs');
|
|
16
16
|
const useSignMessage = require('./shared/vue.B6ainw2G.cjs');
|
|
17
17
|
const useSignAndSendTransaction = require('./shared/vue.CWZSMVnB.cjs');
|
|
18
18
|
const useSignTransactions = require('./shared/vue.DFaMJLAQ.cjs');
|
package/dist/index.d.cts
CHANGED
|
@@ -35,6 +35,7 @@ import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-walle
|
|
|
35
35
|
import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
36
36
|
import { App } from 'vue';
|
|
37
37
|
import '@vue-solana/core/errors';
|
|
38
|
+
import '@solana/kit-plugin-rpc';
|
|
38
39
|
import '@solana/kit';
|
|
39
40
|
import '@vue-solana/core/token-accounts';
|
|
40
41
|
|
package/dist/index.d.mts
CHANGED
|
@@ -35,6 +35,7 @@ import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-walle
|
|
|
35
35
|
import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
36
36
|
import { App } from 'vue';
|
|
37
37
|
import '@vue-solana/core/errors';
|
|
38
|
+
import '@solana/kit-plugin-rpc';
|
|
38
39
|
import '@solana/kit';
|
|
39
40
|
import '@vue-solana/core/token-accounts';
|
|
40
41
|
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ import { RegisterSolanaMobileWalletOptions } from '@vue-solana/core/mobile-walle
|
|
|
35
35
|
import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
36
36
|
import { App } from 'vue';
|
|
37
37
|
import '@vue-solana/core/errors';
|
|
38
|
+
import '@solana/kit-plugin-rpc';
|
|
38
39
|
import '@solana/kit';
|
|
39
40
|
import '@vue-solana/core/token-accounts';
|
|
40
41
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export { u as useAccountInfo } from './shared/vue.BQRpjwKl.mjs';
|
|
2
2
|
export { u as useAction } from './shared/vue.DYk0Xfr3.mjs';
|
|
3
|
-
export { u as useAirdrop } from './shared/vue.
|
|
3
|
+
export { u as useAirdrop } from './shared/vue.DDQxNX5q.mjs';
|
|
4
4
|
export { u as useBalance } from './shared/vue.BINkrA8h.mjs';
|
|
5
|
-
export { M as MissingClientCapabilityError, u as useClientCapability } from './shared/vue.
|
|
5
|
+
export { M as MissingClientCapabilityError, u as useClientCapability } from './shared/vue.B9uRpSDJ.mjs';
|
|
6
6
|
export { u as useConnection } from './shared/vue.CpkwC8Th.mjs';
|
|
7
|
-
export { u as usePlanTransaction, a as usePlanTransactions } from './shared/vue.
|
|
7
|
+
export { u as usePlanTransaction, a as usePlanTransactions } from './shared/vue.Co5rj-I6.mjs';
|
|
8
8
|
export { u as useProgramAccounts } from './shared/vue.C13umiQi.mjs';
|
|
9
|
-
export { u as useIdentity, a as usePayer } from './shared/vue.
|
|
9
|
+
export { u as useIdentity, a as usePayer } from './shared/vue.B-xtuLtD.mjs';
|
|
10
10
|
export { u as useRequest } from './shared/vue.B8VvC8d2.mjs';
|
|
11
11
|
export { u as useRpc } from './shared/vue.BsGwt78R.mjs';
|
|
12
12
|
export { S as SelectedWalletAccountProvider, c as createSelectedWalletAccountContext, p as provideSelectedWalletAccount, s as selectedWalletAccountInjectionKey, u as useSelectedWalletAccount } from './shared/vue.DXQVIRZA.mjs';
|
|
13
|
-
export { u as useSendTransaction, a as useSendTransactions } from './shared/vue.
|
|
13
|
+
export { u as useSendTransaction, a as useSendTransactions } from './shared/vue.DAthhH4D.mjs';
|
|
14
14
|
export { u as useSignMessage } from './shared/vue.JUWqu6kD.mjs';
|
|
15
15
|
export { u as useSignAndSendTransaction } from './shared/vue.Dyi1OCI1.mjs';
|
|
16
16
|
export { u as useSignTransactions } from './shared/vue.CMohL_Cz.mjs';
|
|
@@ -25,7 +25,8 @@ function useClientCapability(capability, options = {}) {
|
|
|
25
25
|
const providerHint = options.providerHint ?? "Install it by adding the corresponding @solana/kit plugin with `createClient().use(...)`.";
|
|
26
26
|
const { client } = useSolanaClient.useSolanaClient();
|
|
27
27
|
for (const name of capabilities) {
|
|
28
|
-
|
|
28
|
+
const value = client[name];
|
|
29
|
+
if (value === null || typeof value !== "function" && typeof value !== "object") {
|
|
29
30
|
throw new MissingClientCapabilityError(hookName, [name], providerHint);
|
|
30
31
|
}
|
|
31
32
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const useAction = require('./vue.CoaIWGPT.cjs');
|
|
4
|
-
const useClientCapability = require('./vue.
|
|
4
|
+
const useClientCapability = require('./vue.4C5kX4fE.cjs');
|
|
5
5
|
const useSolanaClient = require('./vue.BIxphCAq.cjs');
|
|
6
6
|
|
|
7
7
|
function toReadableAirdropError(error) {
|
|
@@ -21,7 +21,7 @@ function toReadableAirdropError(error) {
|
|
|
21
21
|
function useAirdrop() {
|
|
22
22
|
useClientCapability.useClientCapability("airdrop", {
|
|
23
23
|
hookName: "useAirdrop",
|
|
24
|
-
providerHint: "Install it by adding the airdrop capability with `createClient().use(
|
|
24
|
+
providerHint: "Install it by adding the airdrop capability with `createClient().use(solanaRpc({ ... })).use(rpcAirdrop())` from `@solana/kit-plugin-rpc`, on a client that has a `payer` signer to sign the request."
|
|
25
25
|
});
|
|
26
26
|
const { client } = useSolanaClient.useSolanaClient();
|
|
27
27
|
return useAction.useAction((abortSignal, address, amount) => {
|
|
@@ -23,7 +23,8 @@ function useClientCapability(capability, options = {}) {
|
|
|
23
23
|
const providerHint = options.providerHint ?? "Install it by adding the corresponding @solana/kit plugin with `createClient().use(...)`.";
|
|
24
24
|
const { client } = useSolanaClient();
|
|
25
25
|
for (const name of capabilities) {
|
|
26
|
-
|
|
26
|
+
const value = client[name];
|
|
27
|
+
if (value === null || typeof value !== "function" && typeof value !== "object") {
|
|
27
28
|
throw new MissingClientCapabilityError(hookName, [name], providerHint);
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
2
2
|
import { shallowRef, ref, onScopeDispose } from 'vue';
|
|
3
|
-
import { u as useClientCapability } from './vue.
|
|
3
|
+
import { u as useClientCapability } from './vue.B9uRpSDJ.mjs';
|
|
4
4
|
import { u as useSolanaClient } from './vue.Mxc8w6Qk.mjs';
|
|
5
5
|
|
|
6
|
+
const PLANNING_PROVIDER_HINT = "Install a planner plugin, e.g. `createClient().use(rpcTransactionPlanner())` from `@solana/kit-plugin-rpc`, and plan with a client that has a `payer` signer \u2014 Kit reads `client.payer` to set the fee payer.";
|
|
6
7
|
function usePlanTransaction() {
|
|
7
|
-
useClientCapability(["planTransaction"], {
|
|
8
|
+
useClientCapability(["planTransaction", "payer"], {
|
|
8
9
|
hookName: "usePlanTransaction",
|
|
9
|
-
providerHint:
|
|
10
|
+
providerHint: PLANNING_PROVIDER_HINT
|
|
10
11
|
});
|
|
11
12
|
const { client } = useSolanaClient();
|
|
12
13
|
const transactionMessage = shallowRef(null);
|
|
@@ -59,9 +60,9 @@ function usePlanTransaction() {
|
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
62
|
function usePlanTransactions() {
|
|
62
|
-
useClientCapability(["planTransactions"], {
|
|
63
|
+
useClientCapability(["planTransactions", "payer"], {
|
|
63
64
|
hookName: "usePlanTransactions",
|
|
64
|
-
providerHint:
|
|
65
|
+
providerHint: PLANNING_PROVIDER_HINT
|
|
65
66
|
});
|
|
66
67
|
const { client } = useSolanaClient();
|
|
67
68
|
const transactionPlan = shallowRef(null);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { normalizeSolanaError } from '@vue-solana/core/errors';
|
|
2
2
|
import { shallowRef, ref, onScopeDispose } from 'vue';
|
|
3
|
-
import { u as useClientCapability } from './vue.
|
|
3
|
+
import { u as useClientCapability } from './vue.B9uRpSDJ.mjs';
|
|
4
4
|
import { u as useSolanaClient } from './vue.Mxc8w6Qk.mjs';
|
|
5
5
|
|
|
6
|
-
const SENDING_PROVIDER_HINT = "
|
|
6
|
+
const SENDING_PROVIDER_HINT = "Use a client created by `createSolanaClient({ payer })` \u2014 or any client with a `payer` signer. Kit reads `client.payer` when it plans a transaction from an instruction plan.";
|
|
7
7
|
function useSendTransaction() {
|
|
8
|
-
useClientCapability(["sendTransaction"], {
|
|
8
|
+
useClientCapability(["sendTransaction", "payer"], {
|
|
9
9
|
hookName: "useSendTransaction",
|
|
10
10
|
providerHint: SENDING_PROVIDER_HINT
|
|
11
11
|
});
|
|
@@ -60,7 +60,7 @@ function useSendTransaction() {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
function useSendTransactions() {
|
|
63
|
-
useClientCapability(["sendTransactions"], {
|
|
63
|
+
useClientCapability(["sendTransactions", "payer"], {
|
|
64
64
|
hookName: "useSendTransactions",
|
|
65
65
|
providerHint: SENDING_PROVIDER_HINT
|
|
66
66
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as useAction } from './vue.DYk0Xfr3.mjs';
|
|
2
|
-
import { u as useClientCapability } from './vue.
|
|
2
|
+
import { u as useClientCapability } from './vue.B9uRpSDJ.mjs';
|
|
3
3
|
import { u as useSolanaClient } from './vue.Mxc8w6Qk.mjs';
|
|
4
4
|
|
|
5
5
|
function toReadableAirdropError(error) {
|
|
@@ -19,7 +19,7 @@ function toReadableAirdropError(error) {
|
|
|
19
19
|
function useAirdrop() {
|
|
20
20
|
useClientCapability("airdrop", {
|
|
21
21
|
hookName: "useAirdrop",
|
|
22
|
-
providerHint: "Install it by adding the airdrop capability with `createClient().use(
|
|
22
|
+
providerHint: "Install it by adding the airdrop capability with `createClient().use(solanaRpc({ ... })).use(rpcAirdrop())` from `@solana/kit-plugin-rpc`, on a client that has a `payer` signer to sign the request."
|
|
23
23
|
});
|
|
24
24
|
const { client } = useSolanaClient();
|
|
25
25
|
return useAction((abortSignal, address, amount) => {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
const errors = require('@vue-solana/core/errors');
|
|
4
4
|
const vue = require('vue');
|
|
5
|
-
const useClientCapability = require('./vue.
|
|
5
|
+
const useClientCapability = require('./vue.4C5kX4fE.cjs');
|
|
6
6
|
const useSolanaClient = require('./vue.BIxphCAq.cjs');
|
|
7
7
|
|
|
8
|
-
const SENDING_PROVIDER_HINT = "
|
|
8
|
+
const SENDING_PROVIDER_HINT = "Use a client created by `createSolanaClient({ payer })` \u2014 or any client with a `payer` signer. Kit reads `client.payer` when it plans a transaction from an instruction plan.";
|
|
9
9
|
function useSendTransaction() {
|
|
10
|
-
useClientCapability.useClientCapability(["sendTransaction"], {
|
|
10
|
+
useClientCapability.useClientCapability(["sendTransaction", "payer"], {
|
|
11
11
|
hookName: "useSendTransaction",
|
|
12
12
|
providerHint: SENDING_PROVIDER_HINT
|
|
13
13
|
});
|
|
@@ -62,7 +62,7 @@ function useSendTransaction() {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
function useSendTransactions() {
|
|
65
|
-
useClientCapability.useClientCapability(["sendTransactions"], {
|
|
65
|
+
useClientCapability.useClientCapability(["sendTransactions", "payer"], {
|
|
66
66
|
hookName: "useSendTransactions",
|
|
67
67
|
providerHint: SENDING_PROVIDER_HINT
|
|
68
68
|
});
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
const errors = require('@vue-solana/core/errors');
|
|
4
4
|
const vue = require('vue');
|
|
5
|
-
const useClientCapability = require('./vue.
|
|
5
|
+
const useClientCapability = require('./vue.4C5kX4fE.cjs');
|
|
6
6
|
const useSolanaClient = require('./vue.BIxphCAq.cjs');
|
|
7
7
|
|
|
8
|
+
const PLANNING_PROVIDER_HINT = "Install a planner plugin, e.g. `createClient().use(rpcTransactionPlanner())` from `@solana/kit-plugin-rpc`, and plan with a client that has a `payer` signer \u2014 Kit reads `client.payer` to set the fee payer.";
|
|
8
9
|
function usePlanTransaction() {
|
|
9
|
-
useClientCapability.useClientCapability(["planTransaction"], {
|
|
10
|
+
useClientCapability.useClientCapability(["planTransaction", "payer"], {
|
|
10
11
|
hookName: "usePlanTransaction",
|
|
11
|
-
providerHint:
|
|
12
|
+
providerHint: PLANNING_PROVIDER_HINT
|
|
12
13
|
});
|
|
13
14
|
const { client } = useSolanaClient.useSolanaClient();
|
|
14
15
|
const transactionMessage = vue.shallowRef(null);
|
|
@@ -61,9 +62,9 @@ function usePlanTransaction() {
|
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
64
|
function usePlanTransactions() {
|
|
64
|
-
useClientCapability.useClientCapability(["planTransactions"], {
|
|
65
|
+
useClientCapability.useClientCapability(["planTransactions", "payer"], {
|
|
65
66
|
hookName: "usePlanTransactions",
|
|
66
|
-
providerHint:
|
|
67
|
+
providerHint: PLANNING_PROVIDER_HINT
|
|
67
68
|
});
|
|
68
69
|
const { client } = useSolanaClient.useSolanaClient();
|
|
69
70
|
const transactionPlan = vue.shallowRef(null);
|
package/dist/useAirdrop.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const useAirdrop = require('./shared/vue.
|
|
3
|
+
const useAirdrop = require('./shared/vue.B4eMoJT2.cjs');
|
|
4
4
|
require('./shared/vue.CoaIWGPT.cjs');
|
|
5
5
|
require('@vue-solana/core/action');
|
|
6
6
|
require('vue');
|
|
7
|
-
require('./shared/vue.
|
|
7
|
+
require('./shared/vue.4C5kX4fE.cjs');
|
|
8
8
|
require('./shared/vue.BIxphCAq.cjs');
|
|
9
9
|
require('./shared/vue.DE3emjSF.cjs');
|
|
10
10
|
require('./shared/vue.DEHxNvUX.cjs');
|
package/dist/useAirdrop.d.cts
CHANGED
|
@@ -9,8 +9,10 @@ import 'vue';
|
|
|
9
9
|
*
|
|
10
10
|
* Requires the client to expose an `airdrop` capability, typically installed
|
|
11
11
|
* with the RPC airdrop plugin, e.g.
|
|
12
|
-
* `createClient().use(
|
|
13
|
-
* `@solana/kit-plugin-rpc`.
|
|
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
|
|
14
16
|
* networks (devnet, testnet) and local validators.
|
|
15
17
|
*
|
|
16
18
|
* Some implementations (e.g. LiteSVM) update balances directly without sending
|
package/dist/useAirdrop.d.mts
CHANGED
|
@@ -9,8 +9,10 @@ import 'vue';
|
|
|
9
9
|
*
|
|
10
10
|
* Requires the client to expose an `airdrop` capability, typically installed
|
|
11
11
|
* with the RPC airdrop plugin, e.g.
|
|
12
|
-
* `createClient().use(
|
|
13
|
-
* `@solana/kit-plugin-rpc`.
|
|
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
|
|
14
16
|
* networks (devnet, testnet) and local validators.
|
|
15
17
|
*
|
|
16
18
|
* Some implementations (e.g. LiteSVM) update balances directly without sending
|
package/dist/useAirdrop.d.ts
CHANGED
|
@@ -9,8 +9,10 @@ import 'vue';
|
|
|
9
9
|
*
|
|
10
10
|
* Requires the client to expose an `airdrop` capability, typically installed
|
|
11
11
|
* with the RPC airdrop plugin, e.g.
|
|
12
|
-
* `createClient().use(
|
|
13
|
-
* `@solana/kit-plugin-rpc`.
|
|
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
|
|
14
16
|
* networks (devnet, testnet) and local validators.
|
|
15
17
|
*
|
|
16
18
|
* Some implementations (e.g. LiteSVM) update balances directly without sending
|
package/dist/useAirdrop.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { u as useAirdrop } from './shared/vue.
|
|
1
|
+
export { u as useAirdrop } from './shared/vue.DDQxNX5q.mjs';
|
|
2
2
|
import './shared/vue.DYk0Xfr3.mjs';
|
|
3
3
|
import '@vue-solana/core/action';
|
|
4
4
|
import 'vue';
|
|
5
|
-
import './shared/vue.
|
|
5
|
+
import './shared/vue.B9uRpSDJ.mjs';
|
|
6
6
|
import './shared/vue.Mxc8w6Qk.mjs';
|
|
7
7
|
import './shared/vue.CQh3AUE8.mjs';
|
|
8
8
|
import './shared/vue.D_P5SqqD.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { M as MissingClientCapabilityError, u as useClientCapability } from './shared/vue.
|
|
1
|
+
export { M as MissingClientCapabilityError, u as useClientCapability } from './shared/vue.B9uRpSDJ.mjs';
|
|
2
2
|
import './shared/vue.Mxc8w6Qk.mjs';
|
|
3
3
|
import './shared/vue.CQh3AUE8.mjs';
|
|
4
4
|
import 'vue';
|