@vue-solana/vue 0.8.1 → 0.8.3
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 -46
- package/dist/buffer-polyfill.cjs +8 -0
- package/dist/buffer-polyfill.d.cts +2 -0
- package/dist/buffer-polyfill.d.mts +2 -0
- package/dist/buffer-polyfill.d.ts +2 -0
- package/dist/buffer-polyfill.mjs +1 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/useAccountInfo.d.cts +3 -3
- package/dist/useAccountInfo.d.mts +3 -3
- package/dist/useAccountInfo.d.ts +3 -3
- package/dist/useBalance.d.cts +2 -2
- package/dist/useBalance.d.mts +2 -2
- package/dist/useBalance.d.ts +2 -2
- package/dist/useConnection.d.cts +3 -1
- package/dist/useConnection.d.mts +3 -1
- package/dist/useConnection.d.ts +3 -1
- package/dist/useProgramAccounts.d.cts +4 -4
- package/dist/useProgramAccounts.d.mts +4 -4
- package/dist/useProgramAccounts.d.ts +4 -4
- package/dist/useRpc.d.cts +2 -1
- package/dist/useRpc.d.mts +2 -1
- package/dist/useRpc.d.ts +2 -1
- package/dist/useSignAndSendTransaction.d.cts +24 -7
- package/dist/useSignAndSendTransaction.d.mts +24 -7
- package/dist/useSignAndSendTransaction.d.ts +24 -7
- package/dist/useSignatureStatus.d.cts +3 -3
- package/dist/useSignatureStatus.d.mts +3 -3
- package/dist/useSignatureStatus.d.ts +3 -3
- package/dist/useTransaction.d.cts +3 -3
- package/dist/useTransaction.d.mts +3 -3
- package/dist/useTransaction.d.ts +3 -3
- package/dist/useTransactionConfirmation.d.cts +23 -6
- package/dist/useTransactionConfirmation.d.mts +23 -6
- package/dist/useTransactionConfirmation.d.ts +23 -6
- package/dist/useWallet.d.cts +2 -1
- package/dist/useWallet.d.mts +2 -1
- package/dist/useWallet.d.ts +2 -1
- package/dist/web3.cjs +13 -0
- package/dist/web3.d.cts +1 -0
- package/dist/web3.d.mts +1 -0
- package/dist/web3.d.ts +1 -0
- package/dist/web3.mjs +1 -0
- package/package.json +13 -4
package/README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# @vue-solana/vue
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@vue-solana/vue)
|
|
4
|
+
[](https://www.npmjs.com/package/@vue-solana/vue)
|
|
5
|
+
[](https://github.com/vue-solana/vue-solana/blob/main/LICENSE)
|
|
6
|
+
[](https://vue-solana-docs.vercel.app/packages/vue)
|
|
7
|
+
|
|
8
|
+
Solana wallet, RPC, account, message signing, and transaction composables for Vue 3.
|
|
4
9
|
|
|
5
10
|
Use this package in Vue 3 apps that need Solana RPC access, balance reads, wallet state, message signing, and transaction helper state.
|
|
6
11
|
|
|
@@ -14,14 +19,34 @@ New to Solana? Start with the official docs and the project concepts guide:
|
|
|
14
19
|
- [Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
|
|
15
20
|
- [Live demo](https://vue-solana-docs.vercel.app/demo)
|
|
16
21
|
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
- Vue plugin for shared Solana RPC and wallet context.
|
|
25
|
+
- SSR-safe composables that return inert state when no client plugin context is available.
|
|
26
|
+
- RPC status and latest blockhash reads.
|
|
27
|
+
- Balance, account info, program account, and signature status composables.
|
|
28
|
+
- Unified wallet discovery and selection for browser extensions, Android Mobile Wallet Adapter, and supported iOS browser wallets.
|
|
29
|
+
- Message signing helpers for wallet ownership and authentication challenges.
|
|
30
|
+
- Transaction submission and confirmation state helpers.
|
|
31
|
+
- Direct subpath exports for narrower imports.
|
|
32
|
+
|
|
33
|
+
## Compatibility
|
|
34
|
+
|
|
35
|
+
| Requirement | Supported |
|
|
36
|
+
| ------------- | ----------------------------------------------- |
|
|
37
|
+
| Vue | `^3.5.0` |
|
|
38
|
+
| TypeScript | TypeScript 5.x recommended |
|
|
39
|
+
| Solana client | Provided through `@vue-solana/core` |
|
|
40
|
+
| Clusters | `mainnet-beta`, `devnet`, `testnet`, `localnet` |
|
|
41
|
+
|
|
17
42
|
## Install
|
|
18
43
|
|
|
19
44
|
```sh
|
|
20
|
-
pnpm add @vue-solana/vue
|
|
45
|
+
pnpm add @vue-solana/vue
|
|
21
46
|
```
|
|
22
47
|
|
|
23
48
|
```sh
|
|
24
|
-
npm install @vue-solana/vue
|
|
49
|
+
npm install @vue-solana/vue
|
|
25
50
|
```
|
|
26
51
|
|
|
27
52
|
## Plugin Setup
|
|
@@ -63,6 +88,18 @@ createApp(App).use(
|
|
|
63
88
|
|
|
64
89
|
Supported clusters are `mainnet-beta`, `devnet`, `testnet`, and `localnet`. Use `mainnet-beta` for Solana mainnet; this is Solana's official cluster name.
|
|
65
90
|
|
|
91
|
+
### Plugin Options
|
|
92
|
+
|
|
93
|
+
| Option | Type | Default | Description |
|
|
94
|
+
| -------------- | ------------------------------------------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------- |
|
|
95
|
+
| `cluster` | `"mainnet-beta" \| "devnet" \| "testnet" \| "localnet"` | `"devnet"` | Solana cluster used when `endpoint` is omitted. |
|
|
96
|
+
| `endpoint` | `string` | Public endpoint for `cluster` | HTTP RPC endpoint. Use a dedicated RPC provider for production apps. |
|
|
97
|
+
| `wsEndpoint` | `string` | Derived from `endpoint` | WebSocket RPC endpoint. |
|
|
98
|
+
| `commitment` | Solana commitment | Solana client default | Default commitment for created connections. |
|
|
99
|
+
| `autoConnect` | `boolean` | `false` | Reconnects only a previously selected discovered wallet identity when it is discovered again. |
|
|
100
|
+
| `wallet` | `SolanaWallet` | Disabled | Custom wallet adapter, useful for tests or custom integrations. |
|
|
101
|
+
| `mobileWallet` | `MobileWalletOptions \| false` | Enabled on supported Android clients | Configures or disables Android Mobile Wallet Adapter registration. |
|
|
102
|
+
|
|
66
103
|
The root export remains supported. For composables, prefer direct subpath imports in new code so bundlers can avoid evaluating unrelated package entry code:
|
|
67
104
|
|
|
68
105
|
```ts
|
|
@@ -268,21 +305,23 @@ Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
|
|
|
268
305
|
|
|
269
306
|
## API
|
|
270
307
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
308
|
+
| API | Description |
|
|
309
|
+
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
310
|
+
| `createSolanaPlugin(options?)` | Installs the Vue Solana context. |
|
|
311
|
+
| `VueSolana` | Alias for `createSolanaPlugin`. |
|
|
312
|
+
| `useSolana()` | Returns the full injected Solana context. |
|
|
313
|
+
| `useRpc()` | Returns cluster, endpoint, connection status, latest blockhash, and `checkConnection()`. |
|
|
314
|
+
| `useConnection()` | Returns the Solana `Connection`. |
|
|
315
|
+
| `useWallet()` | Returns wallet refs, computed connection state, and wallet actions. |
|
|
316
|
+
| `useWallets()` | Returns discovered browser extension wallets, Android MWA wallets, iOS browser wallet links, and wallet selection actions. |
|
|
317
|
+
| `useSignMessage()` | Signs arbitrary message bytes through the connected wallet when message signing is supported. |
|
|
318
|
+
| `useBalance(address, commitment?)` | Loads lamport balance for a `PublicKey` or address string. |
|
|
319
|
+
| `useAccountInfo(address, options?)` | Loads account info and can subscribe to account changes with `watch: true`. |
|
|
320
|
+
| `useProgramAccounts(programId, config?)` | Loads accounts owned by a program with optional filters, commitment, and `dataSlice`. |
|
|
321
|
+
| `useTransaction(handler, options?)` | Generic async transaction state helper with optional timeout settings. |
|
|
322
|
+
| `useTransactionConfirmation(options?)` | Confirms a submitted signature with reactive status and timeout/error state. |
|
|
323
|
+
| `useSignatureStatus(signature, options?)` | Reads a transaction signature status with optional polling or websocket subscription. |
|
|
324
|
+
| `useSignAndSendTransaction()` | Signs and sends a transaction through the configured wallet, with optional confirmation waiting. |
|
|
286
325
|
|
|
287
326
|
Direct composable subpaths:
|
|
288
327
|
|
|
@@ -300,37 +339,20 @@ Direct composable subpaths:
|
|
|
300
339
|
- `@vue-solana/vue/useSignatureStatus`
|
|
301
340
|
- `@vue-solana/vue/useSignAndSendTransaction`
|
|
302
341
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
`@solana/web3-compat@0.0.21` currently has broken TypeScript metadata. Runtime imports still use the real package, but TypeScript consumers may need a local declaration shim.
|
|
342
|
+
Other direct subpaths:
|
|
306
343
|
|
|
307
|
-
|
|
344
|
+
- `@vue-solana/vue/web3`
|
|
345
|
+
- `@vue-solana/vue/buffer-polyfill`
|
|
308
346
|
|
|
309
|
-
|
|
310
|
-
declare module "@solana/web3-compat" {
|
|
311
|
-
export type {
|
|
312
|
-
AccountInfo,
|
|
313
|
-
Commitment,
|
|
314
|
-
RpcResponseAndContext,
|
|
315
|
-
SendOptions,
|
|
316
|
-
SignatureResult,
|
|
317
|
-
SignatureStatus,
|
|
318
|
-
TransactionSignature,
|
|
319
|
-
} from "@solana/web3.js";
|
|
320
|
-
export {
|
|
321
|
-
Connection,
|
|
322
|
-
Keypair,
|
|
323
|
-
PublicKey,
|
|
324
|
-
SystemProgram,
|
|
325
|
-
Transaction,
|
|
326
|
-
TransactionInstruction,
|
|
327
|
-
VersionedTransaction,
|
|
328
|
-
} from "@solana/web3.js";
|
|
329
|
-
}
|
|
330
|
-
```
|
|
347
|
+
## Caveats
|
|
331
348
|
|
|
332
|
-
|
|
349
|
+
- 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.
|
|
350
|
+
- Public Solana RPC endpoints are useful for development, but production apps should use dedicated RPC infrastructure.
|
|
351
|
+
- Broad `useProgramAccounts()` scans can be expensive or blocked on public RPC nodes. Prefer narrow filters and `dataSlice`.
|
|
352
|
+
- Use `mainnet-beta` for Solana mainnet. `mainnet` is intentionally not accepted as a cluster alias.
|
|
353
|
+
- `@solana/web3-compat@0.0.21` currently has broken TypeScript package metadata. Runtime imports still use the real package, and current Vue Solana packages publish temporary declaration shims for documented imports. See [Troubleshooting](https://vue-solana-docs.vercel.app/troubleshooting) for details.
|
|
354
|
+
- Desktop native app wallets are planned but not implemented yet.
|
|
333
355
|
|
|
334
356
|
## Status
|
|
335
357
|
|
|
336
|
-
This package
|
|
358
|
+
This package provides RPC, balance, browser extension wallet, Android mobile wallet, iOS browser wallet, message signing, and transaction composables.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Buffer, installSolanaBufferPolyfill } from '@vue-solana/core/buffer-polyfill';
|
package/dist/index.d.cts
CHANGED
|
@@ -18,6 +18,7 @@ import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
|
18
18
|
import { App } from 'vue';
|
|
19
19
|
import '@vue-solana/core/address';
|
|
20
20
|
import '@vue-solana/core/errors';
|
|
21
|
+
import '@vue-solana/core/web3';
|
|
21
22
|
import '@solana/web3-compat';
|
|
22
23
|
|
|
23
24
|
interface VueSolanaPluginOptions extends SolanaConfig {
|
package/dist/index.d.mts
CHANGED
|
@@ -18,6 +18,7 @@ import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
|
18
18
|
import { App } from 'vue';
|
|
19
19
|
import '@vue-solana/core/address';
|
|
20
20
|
import '@vue-solana/core/errors';
|
|
21
|
+
import '@vue-solana/core/web3';
|
|
21
22
|
import '@solana/web3-compat';
|
|
22
23
|
|
|
23
24
|
interface VueSolanaPluginOptions extends SolanaConfig {
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { SolanaConfig, SolanaWallet } from '@vue-solana/core/types';
|
|
|
18
18
|
import { App } from 'vue';
|
|
19
19
|
import '@vue-solana/core/address';
|
|
20
20
|
import '@vue-solana/core/errors';
|
|
21
|
+
import '@vue-solana/core/web3';
|
|
21
22
|
import '@solana/web3-compat';
|
|
22
23
|
|
|
23
24
|
interface VueSolanaPluginOptions extends SolanaConfig {
|
|
@@ -2,17 +2,17 @@ import * as vue from 'vue';
|
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { Commitment } from '@solana/web3
|
|
5
|
+
import { Commitment, AccountInfo } from '@vue-solana/core/web3';
|
|
6
6
|
|
|
7
7
|
interface UseAccountInfoOptions {
|
|
8
8
|
commitment?: Commitment;
|
|
9
9
|
watch?: boolean;
|
|
10
10
|
}
|
|
11
11
|
declare function useAccountInfo(address: MaybeRefOrGetter<PublicKeyInput>, options?: UseAccountInfoOptions): {
|
|
12
|
-
accountInfo:
|
|
12
|
+
accountInfo: vue.ShallowRef<AccountInfo<Uint8Array<ArrayBufferLike>> | null, AccountInfo<Uint8Array<ArrayBufferLike>> | null>;
|
|
13
13
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
14
14
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
15
|
-
refresh: () => Promise<
|
|
15
|
+
refresh: () => Promise<AccountInfo<Uint8Array<ArrayBufferLike>> | null>;
|
|
16
16
|
stopWatching: () => Promise<void>;
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -2,17 +2,17 @@ import * as vue from 'vue';
|
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { Commitment } from '@solana/web3
|
|
5
|
+
import { Commitment, AccountInfo } from '@vue-solana/core/web3';
|
|
6
6
|
|
|
7
7
|
interface UseAccountInfoOptions {
|
|
8
8
|
commitment?: Commitment;
|
|
9
9
|
watch?: boolean;
|
|
10
10
|
}
|
|
11
11
|
declare function useAccountInfo(address: MaybeRefOrGetter<PublicKeyInput>, options?: UseAccountInfoOptions): {
|
|
12
|
-
accountInfo:
|
|
12
|
+
accountInfo: vue.ShallowRef<AccountInfo<Uint8Array<ArrayBufferLike>> | null, AccountInfo<Uint8Array<ArrayBufferLike>> | null>;
|
|
13
13
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
14
14
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
15
|
-
refresh: () => Promise<
|
|
15
|
+
refresh: () => Promise<AccountInfo<Uint8Array<ArrayBufferLike>> | null>;
|
|
16
16
|
stopWatching: () => Promise<void>;
|
|
17
17
|
};
|
|
18
18
|
|
package/dist/useAccountInfo.d.ts
CHANGED
|
@@ -2,17 +2,17 @@ import * as vue from 'vue';
|
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { Commitment } from '@solana/web3
|
|
5
|
+
import { Commitment, AccountInfo } from '@vue-solana/core/web3';
|
|
6
6
|
|
|
7
7
|
interface UseAccountInfoOptions {
|
|
8
8
|
commitment?: Commitment;
|
|
9
9
|
watch?: boolean;
|
|
10
10
|
}
|
|
11
11
|
declare function useAccountInfo(address: MaybeRefOrGetter<PublicKeyInput>, options?: UseAccountInfoOptions): {
|
|
12
|
-
accountInfo:
|
|
12
|
+
accountInfo: vue.ShallowRef<AccountInfo<Uint8Array<ArrayBufferLike>> | null, AccountInfo<Uint8Array<ArrayBufferLike>> | null>;
|
|
13
13
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
14
14
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
15
|
-
refresh: () => Promise<
|
|
15
|
+
refresh: () => Promise<AccountInfo<Uint8Array<ArrayBufferLike>> | null>;
|
|
16
16
|
stopWatching: () => Promise<void>;
|
|
17
17
|
};
|
|
18
18
|
|
package/dist/useBalance.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import { PublicKey, Commitment } from '@solana/web3
|
|
3
|
+
import { PublicKey, Commitment } from '@vue-solana/core/web3';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
5
|
|
|
6
6
|
declare function useBalance(address: MaybeRefOrGetter<PublicKey | string | null | undefined>, commitment?: Commitment): {
|
|
7
7
|
balance: vue.ShallowRef<number | null, number | null>;
|
|
8
8
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
9
9
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
10
|
-
refresh: () => Promise<
|
|
10
|
+
refresh: () => Promise<number | null>;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export { useBalance };
|
package/dist/useBalance.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import { PublicKey, Commitment } from '@solana/web3
|
|
3
|
+
import { PublicKey, Commitment } from '@vue-solana/core/web3';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
5
|
|
|
6
6
|
declare function useBalance(address: MaybeRefOrGetter<PublicKey | string | null | undefined>, commitment?: Commitment): {
|
|
7
7
|
balance: vue.ShallowRef<number | null, number | null>;
|
|
8
8
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
9
9
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
10
|
-
refresh: () => Promise<
|
|
10
|
+
refresh: () => Promise<number | null>;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export { useBalance };
|
package/dist/useBalance.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import { PublicKey, Commitment } from '@solana/web3
|
|
3
|
+
import { PublicKey, Commitment } from '@vue-solana/core/web3';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
5
|
|
|
6
6
|
declare function useBalance(address: MaybeRefOrGetter<PublicKey | string | null | undefined>, commitment?: Commitment): {
|
|
7
7
|
balance: vue.ShallowRef<number | null, number | null>;
|
|
8
8
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
9
9
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
10
|
-
refresh: () => Promise<
|
|
10
|
+
refresh: () => Promise<number | null>;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export { useBalance };
|
package/dist/useConnection.d.cts
CHANGED
package/dist/useConnection.d.mts
CHANGED
package/dist/useConnection.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as vue from 'vue';
|
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { PublicKey, AccountInfo, Commitment } from '@solana/web3
|
|
5
|
+
import { PublicKey, AccountInfo, Commitment } from '@vue-solana/core/web3';
|
|
6
6
|
|
|
7
7
|
type ProgramAccountMemcmpEncoding = "base58" | "base64" | "base64+zstd" | "bytes";
|
|
8
8
|
type ProgramAccountMemcmpFilter = {
|
|
@@ -25,15 +25,15 @@ interface UseProgramAccountsOptions {
|
|
|
25
25
|
dataSlice?: ProgramAccountDataSlice;
|
|
26
26
|
filters?: ProgramAccountFilter[];
|
|
27
27
|
}
|
|
28
|
-
interface ProgramAccount<TData extends
|
|
28
|
+
interface ProgramAccount<TData extends Uint8Array = Uint8Array> {
|
|
29
29
|
pubkey: PublicKey;
|
|
30
30
|
account: AccountInfo<TData>;
|
|
31
31
|
}
|
|
32
32
|
declare function useProgramAccounts(programId: MaybeRefOrGetter<PublicKeyInput>, options?: UseProgramAccountsOptions): {
|
|
33
|
-
accounts: vue.ShallowRef<ProgramAccount<
|
|
33
|
+
accounts: vue.ShallowRef<ProgramAccount<Uint8Array<ArrayBufferLike>>[], ProgramAccount<Uint8Array<ArrayBufferLike>>[]>;
|
|
34
34
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
35
35
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
36
|
-
refresh: () => Promise<ProgramAccount<
|
|
36
|
+
refresh: () => Promise<ProgramAccount<Uint8Array<ArrayBufferLike>>[]>;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export { useProgramAccounts };
|
|
@@ -2,7 +2,7 @@ import * as vue from 'vue';
|
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { PublicKey, AccountInfo, Commitment } from '@solana/web3
|
|
5
|
+
import { PublicKey, AccountInfo, Commitment } from '@vue-solana/core/web3';
|
|
6
6
|
|
|
7
7
|
type ProgramAccountMemcmpEncoding = "base58" | "base64" | "base64+zstd" | "bytes";
|
|
8
8
|
type ProgramAccountMemcmpFilter = {
|
|
@@ -25,15 +25,15 @@ interface UseProgramAccountsOptions {
|
|
|
25
25
|
dataSlice?: ProgramAccountDataSlice;
|
|
26
26
|
filters?: ProgramAccountFilter[];
|
|
27
27
|
}
|
|
28
|
-
interface ProgramAccount<TData extends
|
|
28
|
+
interface ProgramAccount<TData extends Uint8Array = Uint8Array> {
|
|
29
29
|
pubkey: PublicKey;
|
|
30
30
|
account: AccountInfo<TData>;
|
|
31
31
|
}
|
|
32
32
|
declare function useProgramAccounts(programId: MaybeRefOrGetter<PublicKeyInput>, options?: UseProgramAccountsOptions): {
|
|
33
|
-
accounts: vue.ShallowRef<ProgramAccount<
|
|
33
|
+
accounts: vue.ShallowRef<ProgramAccount<Uint8Array<ArrayBufferLike>>[], ProgramAccount<Uint8Array<ArrayBufferLike>>[]>;
|
|
34
34
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
35
35
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
36
|
-
refresh: () => Promise<ProgramAccount<
|
|
36
|
+
refresh: () => Promise<ProgramAccount<Uint8Array<ArrayBufferLike>>[]>;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export { useProgramAccounts };
|
|
@@ -2,7 +2,7 @@ import * as vue from 'vue';
|
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import { PublicKeyInput } from '@vue-solana/core/address';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
|
-
import { PublicKey, AccountInfo, Commitment } from '@solana/web3
|
|
5
|
+
import { PublicKey, AccountInfo, Commitment } from '@vue-solana/core/web3';
|
|
6
6
|
|
|
7
7
|
type ProgramAccountMemcmpEncoding = "base58" | "base64" | "base64+zstd" | "bytes";
|
|
8
8
|
type ProgramAccountMemcmpFilter = {
|
|
@@ -25,15 +25,15 @@ interface UseProgramAccountsOptions {
|
|
|
25
25
|
dataSlice?: ProgramAccountDataSlice;
|
|
26
26
|
filters?: ProgramAccountFilter[];
|
|
27
27
|
}
|
|
28
|
-
interface ProgramAccount<TData extends
|
|
28
|
+
interface ProgramAccount<TData extends Uint8Array = Uint8Array> {
|
|
29
29
|
pubkey: PublicKey;
|
|
30
30
|
account: AccountInfo<TData>;
|
|
31
31
|
}
|
|
32
32
|
declare function useProgramAccounts(programId: MaybeRefOrGetter<PublicKeyInput>, options?: UseProgramAccountsOptions): {
|
|
33
|
-
accounts: vue.ShallowRef<ProgramAccount<
|
|
33
|
+
accounts: vue.ShallowRef<ProgramAccount<Uint8Array<ArrayBufferLike>>[], ProgramAccount<Uint8Array<ArrayBufferLike>>[]>;
|
|
34
34
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
35
35
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
36
|
-
refresh: () => Promise<ProgramAccount<
|
|
36
|
+
refresh: () => Promise<ProgramAccount<Uint8Array<ArrayBufferLike>>[]>;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export { useProgramAccounts };
|
package/dist/useRpc.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as _vue_solana_core_errors from '@vue-solana/core/errors';
|
|
2
3
|
import * as vue from 'vue';
|
|
3
4
|
import * as _vue_solana_core_types from '@vue-solana/core/types';
|
|
@@ -11,7 +12,7 @@ declare function useRpc(): {
|
|
|
11
12
|
error: vue.Ref<_vue_solana_core_errors.SolanaError | null, _vue_solana_core_errors.SolanaError | null>;
|
|
12
13
|
latestBlockhash: vue.Ref<string | null, string | null>;
|
|
13
14
|
checkConnection: () => Promise<void>;
|
|
14
|
-
connection: Connection;
|
|
15
|
+
connection: _solana_web3_compat.Connection;
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
export { useRpc };
|
package/dist/useRpc.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as _vue_solana_core_errors from '@vue-solana/core/errors';
|
|
2
3
|
import * as vue from 'vue';
|
|
3
4
|
import * as _vue_solana_core_types from '@vue-solana/core/types';
|
|
@@ -11,7 +12,7 @@ declare function useRpc(): {
|
|
|
11
12
|
error: vue.Ref<_vue_solana_core_errors.SolanaError | null, _vue_solana_core_errors.SolanaError | null>;
|
|
12
13
|
latestBlockhash: vue.Ref<string | null, string | null>;
|
|
13
14
|
checkConnection: () => Promise<void>;
|
|
14
|
-
connection: Connection;
|
|
15
|
+
connection: _solana_web3_compat.Connection;
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
export { useRpc };
|
package/dist/useRpc.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as _vue_solana_core_errors from '@vue-solana/core/errors';
|
|
2
3
|
import * as vue from 'vue';
|
|
3
4
|
import * as _vue_solana_core_types from '@vue-solana/core/types';
|
|
@@ -11,7 +12,7 @@ declare function useRpc(): {
|
|
|
11
12
|
error: vue.Ref<_vue_solana_core_errors.SolanaError | null, _vue_solana_core_errors.SolanaError | null>;
|
|
12
13
|
latestBlockhash: vue.Ref<string | null, string | null>;
|
|
13
14
|
checkConnection: () => Promise<void>;
|
|
14
|
-
connection: Connection;
|
|
15
|
+
connection: _solana_web3_compat.Connection;
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
export { useRpc };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
3
4
|
import { SendTransactionOptions, ConfirmTransactionOptions, TransactionConfirmation, SolanaTransaction } from '@vue-solana/core/types';
|
|
4
|
-
import { TransactionSignature } from '@solana/web3
|
|
5
|
+
import { TransactionSignature } from '@vue-solana/core/web3';
|
|
5
6
|
|
|
6
7
|
type SignAndSendTransactionStatus = "idle" | "sending" | "sent" | "confirming" | "processed" | "confirmed" | "finalized" | "error";
|
|
7
8
|
interface SignAndSendTransactionOptions extends SendTransactionOptions {
|
|
@@ -9,20 +10,36 @@ interface SignAndSendTransactionOptions extends SendTransactionOptions {
|
|
|
9
10
|
confirmation?: ConfirmTransactionOptions;
|
|
10
11
|
}
|
|
11
12
|
declare function useSignAndSendTransaction(): {
|
|
12
|
-
signature:
|
|
13
|
+
signature: vue.Ref<string | null, string | null>;
|
|
13
14
|
confirmation: vue.Ref<{
|
|
14
15
|
signature: TransactionSignature;
|
|
15
|
-
commitment:
|
|
16
|
-
result:
|
|
16
|
+
commitment: _solana_web3_compat.Commitment;
|
|
17
|
+
result: {
|
|
18
|
+
context: {
|
|
19
|
+
slot: number;
|
|
20
|
+
apiVersion?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
value: {
|
|
23
|
+
err: unknown | null;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
17
26
|
} | null, TransactionConfirmation | {
|
|
18
27
|
signature: TransactionSignature;
|
|
19
|
-
commitment:
|
|
20
|
-
result:
|
|
28
|
+
commitment: _solana_web3_compat.Commitment;
|
|
29
|
+
result: {
|
|
30
|
+
context: {
|
|
31
|
+
slot: number;
|
|
32
|
+
apiVersion?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
value: {
|
|
35
|
+
err: unknown | null;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
21
38
|
} | null>;
|
|
22
39
|
status: vue.Ref<SignAndSendTransactionStatus, SignAndSendTransactionStatus>;
|
|
23
40
|
loading: vue.Ref<boolean, boolean>;
|
|
24
41
|
error: vue.Ref<SolanaError | null, SolanaError | null>;
|
|
25
|
-
execute: (transaction: SolanaTransaction, options?: SignAndSendTransactionOptions) => Promise<
|
|
42
|
+
execute: (transaction: SolanaTransaction, options?: SignAndSendTransactionOptions) => Promise<string>;
|
|
26
43
|
};
|
|
27
44
|
|
|
28
45
|
export { useSignAndSendTransaction };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
3
4
|
import { SendTransactionOptions, ConfirmTransactionOptions, TransactionConfirmation, SolanaTransaction } from '@vue-solana/core/types';
|
|
4
|
-
import { TransactionSignature } from '@solana/web3
|
|
5
|
+
import { TransactionSignature } from '@vue-solana/core/web3';
|
|
5
6
|
|
|
6
7
|
type SignAndSendTransactionStatus = "idle" | "sending" | "sent" | "confirming" | "processed" | "confirmed" | "finalized" | "error";
|
|
7
8
|
interface SignAndSendTransactionOptions extends SendTransactionOptions {
|
|
@@ -9,20 +10,36 @@ interface SignAndSendTransactionOptions extends SendTransactionOptions {
|
|
|
9
10
|
confirmation?: ConfirmTransactionOptions;
|
|
10
11
|
}
|
|
11
12
|
declare function useSignAndSendTransaction(): {
|
|
12
|
-
signature:
|
|
13
|
+
signature: vue.Ref<string | null, string | null>;
|
|
13
14
|
confirmation: vue.Ref<{
|
|
14
15
|
signature: TransactionSignature;
|
|
15
|
-
commitment:
|
|
16
|
-
result:
|
|
16
|
+
commitment: _solana_web3_compat.Commitment;
|
|
17
|
+
result: {
|
|
18
|
+
context: {
|
|
19
|
+
slot: number;
|
|
20
|
+
apiVersion?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
value: {
|
|
23
|
+
err: unknown | null;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
17
26
|
} | null, TransactionConfirmation | {
|
|
18
27
|
signature: TransactionSignature;
|
|
19
|
-
commitment:
|
|
20
|
-
result:
|
|
28
|
+
commitment: _solana_web3_compat.Commitment;
|
|
29
|
+
result: {
|
|
30
|
+
context: {
|
|
31
|
+
slot: number;
|
|
32
|
+
apiVersion?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
value: {
|
|
35
|
+
err: unknown | null;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
21
38
|
} | null>;
|
|
22
39
|
status: vue.Ref<SignAndSendTransactionStatus, SignAndSendTransactionStatus>;
|
|
23
40
|
loading: vue.Ref<boolean, boolean>;
|
|
24
41
|
error: vue.Ref<SolanaError | null, SolanaError | null>;
|
|
25
|
-
execute: (transaction: SolanaTransaction, options?: SignAndSendTransactionOptions) => Promise<
|
|
42
|
+
execute: (transaction: SolanaTransaction, options?: SignAndSendTransactionOptions) => Promise<string>;
|
|
26
43
|
};
|
|
27
44
|
|
|
28
45
|
export { useSignAndSendTransaction };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
3
4
|
import { SendTransactionOptions, ConfirmTransactionOptions, TransactionConfirmation, SolanaTransaction } from '@vue-solana/core/types';
|
|
4
|
-
import { TransactionSignature } from '@solana/web3
|
|
5
|
+
import { TransactionSignature } from '@vue-solana/core/web3';
|
|
5
6
|
|
|
6
7
|
type SignAndSendTransactionStatus = "idle" | "sending" | "sent" | "confirming" | "processed" | "confirmed" | "finalized" | "error";
|
|
7
8
|
interface SignAndSendTransactionOptions extends SendTransactionOptions {
|
|
@@ -9,20 +10,36 @@ interface SignAndSendTransactionOptions extends SendTransactionOptions {
|
|
|
9
10
|
confirmation?: ConfirmTransactionOptions;
|
|
10
11
|
}
|
|
11
12
|
declare function useSignAndSendTransaction(): {
|
|
12
|
-
signature:
|
|
13
|
+
signature: vue.Ref<string | null, string | null>;
|
|
13
14
|
confirmation: vue.Ref<{
|
|
14
15
|
signature: TransactionSignature;
|
|
15
|
-
commitment:
|
|
16
|
-
result:
|
|
16
|
+
commitment: _solana_web3_compat.Commitment;
|
|
17
|
+
result: {
|
|
18
|
+
context: {
|
|
19
|
+
slot: number;
|
|
20
|
+
apiVersion?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
value: {
|
|
23
|
+
err: unknown | null;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
17
26
|
} | null, TransactionConfirmation | {
|
|
18
27
|
signature: TransactionSignature;
|
|
19
|
-
commitment:
|
|
20
|
-
result:
|
|
28
|
+
commitment: _solana_web3_compat.Commitment;
|
|
29
|
+
result: {
|
|
30
|
+
context: {
|
|
31
|
+
slot: number;
|
|
32
|
+
apiVersion?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
value: {
|
|
35
|
+
err: unknown | null;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
21
38
|
} | null>;
|
|
22
39
|
status: vue.Ref<SignAndSendTransactionStatus, SignAndSendTransactionStatus>;
|
|
23
40
|
loading: vue.Ref<boolean, boolean>;
|
|
24
41
|
error: vue.Ref<SolanaError | null, SolanaError | null>;
|
|
25
|
-
execute: (transaction: SolanaTransaction, options?: SignAndSendTransactionOptions) => Promise<
|
|
42
|
+
execute: (transaction: SolanaTransaction, options?: SignAndSendTransactionOptions) => Promise<string>;
|
|
26
43
|
};
|
|
27
44
|
|
|
28
45
|
export { useSignAndSendTransaction };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import { Commitment, TransactionSignature } from '@solana/web3
|
|
3
|
+
import { Commitment, TransactionSignature, SignatureStatus } from '@vue-solana/core/web3';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
5
|
|
|
6
6
|
interface UseSignatureStatusOptions {
|
|
@@ -10,10 +10,10 @@ interface UseSignatureStatusOptions {
|
|
|
10
10
|
subscribe?: boolean;
|
|
11
11
|
}
|
|
12
12
|
declare function useSignatureStatus(signature: MaybeRefOrGetter<TransactionSignature | null | undefined>, options?: UseSignatureStatusOptions): {
|
|
13
|
-
status:
|
|
13
|
+
status: vue.ShallowRef<SignatureStatus | null, SignatureStatus | null>;
|
|
14
14
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
15
15
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
16
|
-
refresh: () => Promise<
|
|
16
|
+
refresh: () => Promise<SignatureStatus | null>;
|
|
17
17
|
stopPolling: () => void;
|
|
18
18
|
stopSubscription: () => Promise<void>;
|
|
19
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import { Commitment, TransactionSignature } from '@solana/web3
|
|
3
|
+
import { Commitment, TransactionSignature, SignatureStatus } from '@vue-solana/core/web3';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
5
|
|
|
6
6
|
interface UseSignatureStatusOptions {
|
|
@@ -10,10 +10,10 @@ interface UseSignatureStatusOptions {
|
|
|
10
10
|
subscribe?: boolean;
|
|
11
11
|
}
|
|
12
12
|
declare function useSignatureStatus(signature: MaybeRefOrGetter<TransactionSignature | null | undefined>, options?: UseSignatureStatusOptions): {
|
|
13
|
-
status:
|
|
13
|
+
status: vue.ShallowRef<SignatureStatus | null, SignatureStatus | null>;
|
|
14
14
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
15
15
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
16
|
-
refresh: () => Promise<
|
|
16
|
+
refresh: () => Promise<SignatureStatus | null>;
|
|
17
17
|
stopPolling: () => void;
|
|
18
18
|
stopSubscription: () => Promise<void>;
|
|
19
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import { Commitment, TransactionSignature } from '@solana/web3
|
|
3
|
+
import { Commitment, TransactionSignature, SignatureStatus } from '@vue-solana/core/web3';
|
|
4
4
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
5
|
|
|
6
6
|
interface UseSignatureStatusOptions {
|
|
@@ -10,10 +10,10 @@ interface UseSignatureStatusOptions {
|
|
|
10
10
|
subscribe?: boolean;
|
|
11
11
|
}
|
|
12
12
|
declare function useSignatureStatus(signature: MaybeRefOrGetter<TransactionSignature | null | undefined>, options?: UseSignatureStatusOptions): {
|
|
13
|
-
status:
|
|
13
|
+
status: vue.ShallowRef<SignatureStatus | null, SignatureStatus | null>;
|
|
14
14
|
loading: vue.ShallowRef<boolean, boolean>;
|
|
15
15
|
error: vue.ShallowRef<SolanaError | null, SolanaError | null>;
|
|
16
|
-
refresh: () => Promise<
|
|
16
|
+
refresh: () => Promise<SignatureStatus | null>;
|
|
17
17
|
stopPolling: () => void;
|
|
18
18
|
stopSubscription: () => Promise<void>;
|
|
19
19
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { TransactionSignature } from '@solana/web3
|
|
2
|
+
import { TransactionSignature } from '@vue-solana/core/web3';
|
|
3
3
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
4
4
|
|
|
5
5
|
interface UseTransactionOptions {
|
|
@@ -7,10 +7,10 @@ interface UseTransactionOptions {
|
|
|
7
7
|
timeoutMessage?: string;
|
|
8
8
|
}
|
|
9
9
|
declare function useTransaction<TArgs extends unknown[]>(handler: (...args: TArgs) => Promise<TransactionSignature>, options?: UseTransactionOptions): {
|
|
10
|
-
signature:
|
|
10
|
+
signature: vue.Ref<string | null, string | null>;
|
|
11
11
|
loading: vue.Ref<boolean, boolean>;
|
|
12
12
|
error: vue.Ref<SolanaError | null, SolanaError | null>;
|
|
13
|
-
execute: (...args: TArgs) => Promise<
|
|
13
|
+
execute: (...args: TArgs) => Promise<string>;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export { useTransaction };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { TransactionSignature } from '@solana/web3
|
|
2
|
+
import { TransactionSignature } from '@vue-solana/core/web3';
|
|
3
3
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
4
4
|
|
|
5
5
|
interface UseTransactionOptions {
|
|
@@ -7,10 +7,10 @@ interface UseTransactionOptions {
|
|
|
7
7
|
timeoutMessage?: string;
|
|
8
8
|
}
|
|
9
9
|
declare function useTransaction<TArgs extends unknown[]>(handler: (...args: TArgs) => Promise<TransactionSignature>, options?: UseTransactionOptions): {
|
|
10
|
-
signature:
|
|
10
|
+
signature: vue.Ref<string | null, string | null>;
|
|
11
11
|
loading: vue.Ref<boolean, boolean>;
|
|
12
12
|
error: vue.Ref<SolanaError | null, SolanaError | null>;
|
|
13
|
-
execute: (...args: TArgs) => Promise<
|
|
13
|
+
execute: (...args: TArgs) => Promise<string>;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export { useTransaction };
|
package/dist/useTransaction.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { TransactionSignature } from '@solana/web3
|
|
2
|
+
import { TransactionSignature } from '@vue-solana/core/web3';
|
|
3
3
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
4
4
|
|
|
5
5
|
interface UseTransactionOptions {
|
|
@@ -7,10 +7,10 @@ interface UseTransactionOptions {
|
|
|
7
7
|
timeoutMessage?: string;
|
|
8
8
|
}
|
|
9
9
|
declare function useTransaction<TArgs extends unknown[]>(handler: (...args: TArgs) => Promise<TransactionSignature>, options?: UseTransactionOptions): {
|
|
10
|
-
signature:
|
|
10
|
+
signature: vue.Ref<string | null, string | null>;
|
|
11
11
|
loading: vue.Ref<boolean, boolean>;
|
|
12
12
|
error: vue.Ref<SolanaError | null, SolanaError | null>;
|
|
13
|
-
execute: (...args: TArgs) => Promise<
|
|
13
|
+
execute: (...args: TArgs) => Promise<string>;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export { useTransaction };
|
|
@@ -1,20 +1,37 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import { TransactionConfirmation, ConfirmTransactionOptions } from '@vue-solana/core/types';
|
|
3
|
-
import { TransactionSignature } from '@solana/web3
|
|
4
|
+
import { TransactionSignature } from '@vue-solana/core/web3';
|
|
4
5
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
6
|
|
|
6
7
|
type TransactionConfirmationStatus = "idle" | "confirming" | "processed" | "confirmed" | "finalized" | "error";
|
|
7
8
|
declare function getConfirmedTransactionStatus(confirmation: TransactionConfirmation): Extract<TransactionConfirmationStatus, "processed" | "confirmed" | "finalized">;
|
|
8
9
|
declare function useTransactionConfirmation(defaultOptions?: ConfirmTransactionOptions): {
|
|
9
|
-
signature:
|
|
10
|
+
signature: vue.Ref<string | null, string | null>;
|
|
10
11
|
confirmation: vue.Ref<{
|
|
11
12
|
signature: TransactionSignature;
|
|
12
|
-
commitment:
|
|
13
|
-
result:
|
|
13
|
+
commitment: _solana_web3_compat.Commitment;
|
|
14
|
+
result: {
|
|
15
|
+
context: {
|
|
16
|
+
slot: number;
|
|
17
|
+
apiVersion?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
value: {
|
|
20
|
+
err: unknown | null;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
14
23
|
} | null, TransactionConfirmation | {
|
|
15
24
|
signature: TransactionSignature;
|
|
16
|
-
commitment:
|
|
17
|
-
result:
|
|
25
|
+
commitment: _solana_web3_compat.Commitment;
|
|
26
|
+
result: {
|
|
27
|
+
context: {
|
|
28
|
+
slot: number;
|
|
29
|
+
apiVersion?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
value: {
|
|
32
|
+
err: unknown | null;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
18
35
|
} | null>;
|
|
19
36
|
status: vue.Ref<TransactionConfirmationStatus, TransactionConfirmationStatus>;
|
|
20
37
|
loading: vue.Ref<boolean, boolean>;
|
|
@@ -1,20 +1,37 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import { TransactionConfirmation, ConfirmTransactionOptions } from '@vue-solana/core/types';
|
|
3
|
-
import { TransactionSignature } from '@solana/web3
|
|
4
|
+
import { TransactionSignature } from '@vue-solana/core/web3';
|
|
4
5
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
6
|
|
|
6
7
|
type TransactionConfirmationStatus = "idle" | "confirming" | "processed" | "confirmed" | "finalized" | "error";
|
|
7
8
|
declare function getConfirmedTransactionStatus(confirmation: TransactionConfirmation): Extract<TransactionConfirmationStatus, "processed" | "confirmed" | "finalized">;
|
|
8
9
|
declare function useTransactionConfirmation(defaultOptions?: ConfirmTransactionOptions): {
|
|
9
|
-
signature:
|
|
10
|
+
signature: vue.Ref<string | null, string | null>;
|
|
10
11
|
confirmation: vue.Ref<{
|
|
11
12
|
signature: TransactionSignature;
|
|
12
|
-
commitment:
|
|
13
|
-
result:
|
|
13
|
+
commitment: _solana_web3_compat.Commitment;
|
|
14
|
+
result: {
|
|
15
|
+
context: {
|
|
16
|
+
slot: number;
|
|
17
|
+
apiVersion?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
value: {
|
|
20
|
+
err: unknown | null;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
14
23
|
} | null, TransactionConfirmation | {
|
|
15
24
|
signature: TransactionSignature;
|
|
16
|
-
commitment:
|
|
17
|
-
result:
|
|
25
|
+
commitment: _solana_web3_compat.Commitment;
|
|
26
|
+
result: {
|
|
27
|
+
context: {
|
|
28
|
+
slot: number;
|
|
29
|
+
apiVersion?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
value: {
|
|
32
|
+
err: unknown | null;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
18
35
|
} | null>;
|
|
19
36
|
status: vue.Ref<TransactionConfirmationStatus, TransactionConfirmationStatus>;
|
|
20
37
|
loading: vue.Ref<boolean, boolean>;
|
|
@@ -1,20 +1,37 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import { TransactionConfirmation, ConfirmTransactionOptions } from '@vue-solana/core/types';
|
|
3
|
-
import { TransactionSignature } from '@solana/web3
|
|
4
|
+
import { TransactionSignature } from '@vue-solana/core/web3';
|
|
4
5
|
import { SolanaError } from '@vue-solana/core/errors';
|
|
5
6
|
|
|
6
7
|
type TransactionConfirmationStatus = "idle" | "confirming" | "processed" | "confirmed" | "finalized" | "error";
|
|
7
8
|
declare function getConfirmedTransactionStatus(confirmation: TransactionConfirmation): Extract<TransactionConfirmationStatus, "processed" | "confirmed" | "finalized">;
|
|
8
9
|
declare function useTransactionConfirmation(defaultOptions?: ConfirmTransactionOptions): {
|
|
9
|
-
signature:
|
|
10
|
+
signature: vue.Ref<string | null, string | null>;
|
|
10
11
|
confirmation: vue.Ref<{
|
|
11
12
|
signature: TransactionSignature;
|
|
12
|
-
commitment:
|
|
13
|
-
result:
|
|
13
|
+
commitment: _solana_web3_compat.Commitment;
|
|
14
|
+
result: {
|
|
15
|
+
context: {
|
|
16
|
+
slot: number;
|
|
17
|
+
apiVersion?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
value: {
|
|
20
|
+
err: unknown | null;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
14
23
|
} | null, TransactionConfirmation | {
|
|
15
24
|
signature: TransactionSignature;
|
|
16
|
-
commitment:
|
|
17
|
-
result:
|
|
25
|
+
commitment: _solana_web3_compat.Commitment;
|
|
26
|
+
result: {
|
|
27
|
+
context: {
|
|
28
|
+
slot: number;
|
|
29
|
+
apiVersion?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
value: {
|
|
32
|
+
err: unknown | null;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
18
35
|
} | null>;
|
|
19
36
|
status: vue.Ref<TransactionConfirmationStatus, TransactionConfirmationStatus>;
|
|
20
37
|
loading: vue.Ref<boolean, boolean>;
|
package/dist/useWallet.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import * as _vue_solana_core_types from '@vue-solana/core/types';
|
|
3
4
|
|
|
4
5
|
declare function useWallet(): {
|
|
5
6
|
wallet: vue.Ref<_vue_solana_core_types.SolanaWallet | null, _vue_solana_core_types.SolanaWallet | null>;
|
|
6
|
-
publicKey: vue.ComputedRef<
|
|
7
|
+
publicKey: vue.ComputedRef<_solana_web3_compat.PublicKey | null>;
|
|
7
8
|
connected: vue.ComputedRef<boolean>;
|
|
8
9
|
connecting: vue.ComputedRef<boolean>;
|
|
9
10
|
disconnecting: vue.ComputedRef<boolean>;
|
package/dist/useWallet.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import * as _vue_solana_core_types from '@vue-solana/core/types';
|
|
3
4
|
|
|
4
5
|
declare function useWallet(): {
|
|
5
6
|
wallet: vue.Ref<_vue_solana_core_types.SolanaWallet | null, _vue_solana_core_types.SolanaWallet | null>;
|
|
6
|
-
publicKey: vue.ComputedRef<
|
|
7
|
+
publicKey: vue.ComputedRef<_solana_web3_compat.PublicKey | null>;
|
|
7
8
|
connected: vue.ComputedRef<boolean>;
|
|
8
9
|
connecting: vue.ComputedRef<boolean>;
|
|
9
10
|
disconnecting: vue.ComputedRef<boolean>;
|
package/dist/useWallet.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as _solana_web3_compat from '@solana/web3-compat';
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import * as _vue_solana_core_types from '@vue-solana/core/types';
|
|
3
4
|
|
|
4
5
|
declare function useWallet(): {
|
|
5
6
|
wallet: vue.Ref<_vue_solana_core_types.SolanaWallet | null, _vue_solana_core_types.SolanaWallet | null>;
|
|
6
|
-
publicKey: vue.ComputedRef<
|
|
7
|
+
publicKey: vue.ComputedRef<_solana_web3_compat.PublicKey | null>;
|
|
7
8
|
connected: vue.ComputedRef<boolean>;
|
|
8
9
|
connecting: vue.ComputedRef<boolean>;
|
|
9
10
|
disconnecting: vue.ComputedRef<boolean>;
|
package/dist/web3.cjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const web3 = require('@vue-solana/core/web3');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.Connection = web3.Connection;
|
|
8
|
+
exports.Keypair = web3.Keypair;
|
|
9
|
+
exports.PublicKey = web3.PublicKey;
|
|
10
|
+
exports.SystemProgram = web3.SystemProgram;
|
|
11
|
+
exports.Transaction = web3.Transaction;
|
|
12
|
+
exports.TransactionInstruction = web3.TransactionInstruction;
|
|
13
|
+
exports.VersionedTransaction = web3.VersionedTransaction;
|
package/dist/web3.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AccountInfo, Commitment, Connection, Keypair, PublicKey, RpcResponseAndContext, SendOptions, SignatureResult, SignatureStatus, SystemProgram, Transaction, TransactionInstruction, TransactionSignature, VersionedTransaction } from '@vue-solana/core/web3';
|
package/dist/web3.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AccountInfo, Commitment, Connection, Keypair, PublicKey, RpcResponseAndContext, SendOptions, SignatureResult, SignatureStatus, SystemProgram, Transaction, TransactionInstruction, TransactionSignature, VersionedTransaction } from '@vue-solana/core/web3';
|
package/dist/web3.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AccountInfo, Commitment, Connection, Keypair, PublicKey, RpcResponseAndContext, SendOptions, SignatureResult, SignatureStatus, SystemProgram, Transaction, TransactionInstruction, TransactionSignature, VersionedTransaction } from '@vue-solana/core/web3';
|
package/dist/web3.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Connection, Keypair, PublicKey, SystemProgram, Transaction, TransactionInstruction, VersionedTransaction } from '@vue-solana/core/web3';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-solana/vue",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Vue plugin and composables for Solana applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -30,6 +30,11 @@
|
|
|
30
30
|
"import": "./dist/index.mjs",
|
|
31
31
|
"require": "./dist/index.cjs"
|
|
32
32
|
},
|
|
33
|
+
"./buffer-polyfill": {
|
|
34
|
+
"types": "./dist/buffer-polyfill.d.ts",
|
|
35
|
+
"import": "./dist/buffer-polyfill.mjs",
|
|
36
|
+
"require": "./dist/buffer-polyfill.cjs"
|
|
37
|
+
},
|
|
33
38
|
"./useSolana": {
|
|
34
39
|
"types": "./dist/useSolana.d.ts",
|
|
35
40
|
"import": "./dist/useSolana.mjs",
|
|
@@ -94,6 +99,11 @@
|
|
|
94
99
|
"types": "./dist/useSignAndSendTransaction.d.ts",
|
|
95
100
|
"import": "./dist/useSignAndSendTransaction.mjs",
|
|
96
101
|
"require": "./dist/useSignAndSendTransaction.cjs"
|
|
102
|
+
},
|
|
103
|
+
"./web3": {
|
|
104
|
+
"types": "./dist/web3.d.ts",
|
|
105
|
+
"import": "./dist/web3.mjs",
|
|
106
|
+
"require": "./dist/web3.cjs"
|
|
97
107
|
}
|
|
98
108
|
},
|
|
99
109
|
"files": [
|
|
@@ -103,15 +113,14 @@
|
|
|
103
113
|
"access": "public"
|
|
104
114
|
},
|
|
105
115
|
"dependencies": {
|
|
116
|
+
"@solana/web3-compat": "^0.0.21",
|
|
106
117
|
"bs58": "^6.0.0",
|
|
107
|
-
"@vue-solana/core": "0.7.
|
|
118
|
+
"@vue-solana/core": "0.7.2"
|
|
108
119
|
},
|
|
109
120
|
"peerDependencies": {
|
|
110
|
-
"@solana/web3-compat": "^0.0.21",
|
|
111
121
|
"vue": "^3.5.0"
|
|
112
122
|
},
|
|
113
123
|
"devDependencies": {
|
|
114
|
-
"@solana/web3-compat": "^0.0.21",
|
|
115
124
|
"typescript": "^5.8.3",
|
|
116
125
|
"unbuild": "^3.5.0",
|
|
117
126
|
"vue": "^3.5.16"
|