@vue-solana/core 2.0.0 → 2.1.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 +23 -19
- package/dist/action.cjs +15 -0
- package/dist/action.d.cts +28 -0
- package/dist/action.d.mts +28 -0
- package/dist/action.d.ts +28 -0
- package/dist/action.mjs +12 -0
- package/dist/clusters.d.cts +1 -1
- package/dist/clusters.d.mts +1 -1
- package/dist/clusters.d.ts +1 -1
- package/dist/index.cjs +12 -2
- package/dist/index.d.cts +4 -3
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +5 -4
- package/dist/ios-wallet.d.cts +1 -1
- package/dist/ios-wallet.d.mts +1 -1
- package/dist/ios-wallet.d.ts +1 -1
- package/dist/kit.cjs +4 -0
- package/dist/kit.d.cts +2 -2
- package/dist/kit.d.mts +2 -2
- package/dist/kit.d.ts +2 -2
- package/dist/kit.mjs +1 -1
- package/dist/mobile-wallet.d.cts +1 -1
- package/dist/mobile-wallet.d.mts +1 -1
- package/dist/mobile-wallet.d.ts +1 -1
- package/dist/rpc.d.cts +1 -1
- package/dist/rpc.d.mts +1 -1
- package/dist/rpc.d.ts +1 -1
- package/dist/shared/{core.DMgTrB_2.d.ts → core.CQ_yMDAL.d.cts} +46 -15
- package/dist/shared/{core.DMgTrB_2.d.cts → core.CQ_yMDAL.d.mts} +46 -15
- package/dist/shared/{core.DMgTrB_2.d.mts → core.CQ_yMDAL.d.ts} +46 -15
- package/dist/shared/{core.BOHiMZiM.mjs → core.DEcQDbtz.mjs} +82 -4
- package/dist/shared/{core.Cu_gaUSn.cjs → core.DjxUirkw.cjs} +81 -3
- package/dist/token-accounts.d.cts +1 -1
- package/dist/token-accounts.d.mts +1 -1
- package/dist/token-accounts.d.ts +1 -1
- package/dist/transaction.d.cts +1 -1
- package/dist/transaction.d.mts +1 -1
- package/dist/transaction.d.ts +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/wallet-standard.cjs +1 -1
- package/dist/wallet-standard.d.cts +1 -1
- package/dist/wallet-standard.d.mts +1 -1
- package/dist/wallet-standard.d.ts +1 -1
- package/dist/wallet-standard.mjs +1 -1
- package/dist/wallet.cjs +33 -0
- package/dist/wallet.d.cts +5 -2
- package/dist/wallet.d.mts +5 -2
- package/dist/wallet.d.ts +5 -2
- package/dist/wallet.mjs +31 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ Full Vue Solana docs:
|
|
|
36
36
|
- iOS browser wallet link helpers for supported wallets.
|
|
37
37
|
- Transaction submission and confirmation helpers.
|
|
38
38
|
- SPL token account reads through Kit RPC `jsonParsed`.
|
|
39
|
+
- A framework-agnostic action state machine (`createSolanaActionStore`) for async Solana work with per-attempt `AbortSignal` handling.
|
|
39
40
|
|
|
40
41
|
## Compatibility
|
|
41
42
|
|
|
@@ -127,6 +128,7 @@ https://faucet.solana.com
|
|
|
127
128
|
|
|
128
129
|
Direct subpaths:
|
|
129
130
|
|
|
131
|
+
- `@vue-solana/core/action`
|
|
130
132
|
- `@vue-solana/core/types`
|
|
131
133
|
- `@vue-solana/core/address`
|
|
132
134
|
- `@vue-solana/core/buffer-polyfill`
|
|
@@ -142,24 +144,26 @@ Direct subpaths:
|
|
|
142
144
|
- `@vue-solana/core/wallet`
|
|
143
145
|
- `@vue-solana/core/wallet-standard`
|
|
144
146
|
|
|
145
|
-
| API | Description
|
|
146
|
-
| --------------------------------------------------------------- |
|
|
147
|
-
| `DEFAULT_CLUSTER` | Default cluster, currently `devnet`.
|
|
148
|
-
| `parseAddress(value)` | Parses an `Address`, address string, ref-like `{ value }`, getter, `null`, or `undefined` into an `Address \| null`. Invalid strings throw `INVALID_ADDRESS`.
|
|
149
|
-
| `createSolanaClient(config?)` | Creates a Kit client exposing lazy `rpc` and `rpcSubscriptions`.
|
|
150
|
-
| `createSolanaContext(config?)` | Creates `{ cluster, endpoint, wsEndpoint, client }`.
|
|
151
|
-
| `getClusterEndpoint(cluster?)` | Returns the HTTP RPC endpoint for a cluster.
|
|
152
|
-
| `getClusterWebSocketEndpoint(cluster?)` | Returns the WebSocket endpoint for a cluster.
|
|
153
|
-
| `getWebSocketEndpoint(endpoint)` | Converts `http`/`https` RPC URLs to `ws`/`wss` URLs.
|
|
154
|
-
| `isWalletConnected(wallet)` | Checks whether a wallet is connected and has an address.
|
|
155
|
-
| `assertWalletConnected(wallet)` | Throws if the wallet is not connected.
|
|
156
|
-
| `assertWalletCanSignMessage(wallet)` | Throws if the wallet is disconnected or cannot sign messages.
|
|
157
|
-
| `assertWalletCanSign(wallet)` | Throws if the wallet cannot sign transactions.
|
|
158
|
-
| `signAndSendTransaction(client, wallet, transaction, options?)` | Signs and sends raw wire bytes (`SolanaTransaction = Uint8Array`) using a configured wallet.
|
|
159
|
-
| `confirmTransactionSignature(client, signature, options?)` | Waits for a submitted signature to reach a requested commitment by polling `getSignatureStatuses`. Defaults to `confirmed` and a 60 second timeout.
|
|
160
|
-
| `getTokenAccountsByOwner(client, owner, options?)` | Returns SPL token accounts for an owner (token and token-2022 programs by default).
|
|
161
|
-
| `getTokenAccount(client, address, commitment?)` | Reads a single token account, returning `null` when it does not exist.
|
|
162
|
-
| `getTokenBalance(client, mint, owner, commitment?)` | Reads the token balance for an owner's associated token account as `{ amount, decimals }`.
|
|
147
|
+
| API | Description |
|
|
148
|
+
| --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
149
|
+
| `DEFAULT_CLUSTER` | Default cluster, currently `devnet`. |
|
|
150
|
+
| `parseAddress(value)` | Parses an `Address`, address string, ref-like `{ value }`, getter, `null`, or `undefined` into an `Address \| null`. Invalid strings throw `INVALID_ADDRESS`. |
|
|
151
|
+
| `createSolanaClient(config?)` | Creates a Kit client exposing lazy `rpc` and `rpcSubscriptions`. |
|
|
152
|
+
| `createSolanaContext(config?)` | Creates `{ cluster, endpoint, wsEndpoint, client }`. |
|
|
153
|
+
| `getClusterEndpoint(cluster?)` | Returns the HTTP RPC endpoint for a cluster. |
|
|
154
|
+
| `getClusterWebSocketEndpoint(cluster?)` | Returns the WebSocket endpoint for a cluster. |
|
|
155
|
+
| `getWebSocketEndpoint(endpoint)` | Converts `http`/`https` RPC URLs to `ws`/`wss` URLs. |
|
|
156
|
+
| `isWalletConnected(wallet)` | Checks whether a wallet is connected and has an address. |
|
|
157
|
+
| `assertWalletConnected(wallet)` | Throws if the wallet is not connected. |
|
|
158
|
+
| `assertWalletCanSignMessage(wallet)` | Throws if the wallet is disconnected or cannot sign messages. |
|
|
159
|
+
| `assertWalletCanSign(wallet)` | Throws if the wallet cannot sign transactions. |
|
|
160
|
+
| `signAndSendTransaction(client, wallet, transaction, options?)` | Signs and sends raw wire bytes (`SolanaTransaction = Uint8Array`) using a configured wallet. |
|
|
161
|
+
| `confirmTransactionSignature(client, signature, options?)` | Waits for a submitted signature to reach a requested commitment by polling `getSignatureStatuses`. Defaults to `confirmed` and a 60 second timeout. |
|
|
162
|
+
| `getTokenAccountsByOwner(client, owner, options?)` | Returns SPL token accounts for an owner (token and token-2022 programs by default). |
|
|
163
|
+
| `getTokenAccount(client, address, commitment?)` | Reads a single token account, returning `null` when it does not exist. |
|
|
164
|
+
| `getTokenBalance(client, mint, owner, commitment?)` | Reads the token balance for an owner's associated token account as `{ amount, decimals }`. |
|
|
165
|
+
| `createSolanaActionStore(fn)` | Wraps an async `(signal, ...args) => Promise` function into a `{ getState, subscribe, dispatch, reset, withSignal }` store; each dispatch aborts the prior in-flight call. |
|
|
166
|
+
| `isSolanaActionAborted(error)` | Detects abort errors from superseded action dispatches. |
|
|
163
167
|
|
|
164
168
|
## Wallet Interface
|
|
165
169
|
|
|
@@ -220,4 +224,4 @@ Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
|
|
|
220
224
|
|
|
221
225
|
## Status
|
|
222
226
|
|
|
223
|
-
This package provides Kit RPC helpers, browser extension wallet primitives, Android mobile wallet registration, message signing, token account reads, and
|
|
227
|
+
This package provides Kit RPC helpers, browser extension wallet primitives, Android mobile wallet registration, message signing, token account reads, transaction helpers, and a framework-agnostic async action state machine.
|
package/dist/action.cjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const kit = require('@solana/kit');
|
|
4
|
+
require('@solana/kit-plugin-rpc');
|
|
5
|
+
|
|
6
|
+
function createSolanaActionStore(fn) {
|
|
7
|
+
return kit.createReactiveActionStore(fn);
|
|
8
|
+
}
|
|
9
|
+
function isSolanaActionAborted(error) {
|
|
10
|
+
return kit.isAbortError(error);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
exports.isAbortError = kit.isAbortError;
|
|
14
|
+
exports.createSolanaActionStore = createSolanaActionStore;
|
|
15
|
+
exports.isSolanaActionAborted = isSolanaActionAborted;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactiveActionState, ReactiveActionStore } from '@solana/kit';
|
|
2
|
+
export { isAbortError } from '@solana/kit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Framework-agnostic action state machine for Solana async work.
|
|
6
|
+
*
|
|
7
|
+
* Wraps an async function receiving a fresh `AbortSignal` per call and exposes a
|
|
8
|
+
* `{ getState, subscribe, dispatch, reset, withSignal }` store that UI frameworks
|
|
9
|
+
* can bridge into reactive state (Vue composables, React hooks, etc.).
|
|
10
|
+
*
|
|
11
|
+
* - Each `dispatch` aborts the previous in-flight call (fresh signal per dispatch).
|
|
12
|
+
* - Superseded calls reject with an abort error; real failures surface on state.
|
|
13
|
+
* - `withSignal` composes a caller-provided cancellation source per dispatch
|
|
14
|
+
* (per-attempt timeouts, shared kill switches).
|
|
15
|
+
*
|
|
16
|
+
* @see `createReactiveActionStore` from `@solana/kit`, which this wraps.
|
|
17
|
+
*/
|
|
18
|
+
type SolanaActionStore<TArgs extends readonly unknown[], TResult> = ReactiveActionStore<TArgs, TResult>;
|
|
19
|
+
declare function createSolanaActionStore<TArgs extends readonly unknown[], TResult>(fn: (signal: AbortSignal, ...args: TArgs) => Promise<TResult>): SolanaActionStore<TArgs, TResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Snapshot shape bridged into reactive state by framework composables.
|
|
22
|
+
*/
|
|
23
|
+
type SolanaActionState<TResult> = ReactiveActionState<TResult>;
|
|
24
|
+
|
|
25
|
+
declare function isSolanaActionAborted(error: unknown): boolean;
|
|
26
|
+
|
|
27
|
+
export { createSolanaActionStore, isSolanaActionAborted };
|
|
28
|
+
export type { SolanaActionState, SolanaActionStore };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactiveActionState, ReactiveActionStore } from '@solana/kit';
|
|
2
|
+
export { isAbortError } from '@solana/kit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Framework-agnostic action state machine for Solana async work.
|
|
6
|
+
*
|
|
7
|
+
* Wraps an async function receiving a fresh `AbortSignal` per call and exposes a
|
|
8
|
+
* `{ getState, subscribe, dispatch, reset, withSignal }` store that UI frameworks
|
|
9
|
+
* can bridge into reactive state (Vue composables, React hooks, etc.).
|
|
10
|
+
*
|
|
11
|
+
* - Each `dispatch` aborts the previous in-flight call (fresh signal per dispatch).
|
|
12
|
+
* - Superseded calls reject with an abort error; real failures surface on state.
|
|
13
|
+
* - `withSignal` composes a caller-provided cancellation source per dispatch
|
|
14
|
+
* (per-attempt timeouts, shared kill switches).
|
|
15
|
+
*
|
|
16
|
+
* @see `createReactiveActionStore` from `@solana/kit`, which this wraps.
|
|
17
|
+
*/
|
|
18
|
+
type SolanaActionStore<TArgs extends readonly unknown[], TResult> = ReactiveActionStore<TArgs, TResult>;
|
|
19
|
+
declare function createSolanaActionStore<TArgs extends readonly unknown[], TResult>(fn: (signal: AbortSignal, ...args: TArgs) => Promise<TResult>): SolanaActionStore<TArgs, TResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Snapshot shape bridged into reactive state by framework composables.
|
|
22
|
+
*/
|
|
23
|
+
type SolanaActionState<TResult> = ReactiveActionState<TResult>;
|
|
24
|
+
|
|
25
|
+
declare function isSolanaActionAborted(error: unknown): boolean;
|
|
26
|
+
|
|
27
|
+
export { createSolanaActionStore, isSolanaActionAborted };
|
|
28
|
+
export type { SolanaActionState, SolanaActionStore };
|
package/dist/action.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactiveActionState, ReactiveActionStore } from '@solana/kit';
|
|
2
|
+
export { isAbortError } from '@solana/kit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Framework-agnostic action state machine for Solana async work.
|
|
6
|
+
*
|
|
7
|
+
* Wraps an async function receiving a fresh `AbortSignal` per call and exposes a
|
|
8
|
+
* `{ getState, subscribe, dispatch, reset, withSignal }` store that UI frameworks
|
|
9
|
+
* can bridge into reactive state (Vue composables, React hooks, etc.).
|
|
10
|
+
*
|
|
11
|
+
* - Each `dispatch` aborts the previous in-flight call (fresh signal per dispatch).
|
|
12
|
+
* - Superseded calls reject with an abort error; real failures surface on state.
|
|
13
|
+
* - `withSignal` composes a caller-provided cancellation source per dispatch
|
|
14
|
+
* (per-attempt timeouts, shared kill switches).
|
|
15
|
+
*
|
|
16
|
+
* @see `createReactiveActionStore` from `@solana/kit`, which this wraps.
|
|
17
|
+
*/
|
|
18
|
+
type SolanaActionStore<TArgs extends readonly unknown[], TResult> = ReactiveActionStore<TArgs, TResult>;
|
|
19
|
+
declare function createSolanaActionStore<TArgs extends readonly unknown[], TResult>(fn: (signal: AbortSignal, ...args: TArgs) => Promise<TResult>): SolanaActionStore<TArgs, TResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Snapshot shape bridged into reactive state by framework composables.
|
|
22
|
+
*/
|
|
23
|
+
type SolanaActionState<TResult> = ReactiveActionState<TResult>;
|
|
24
|
+
|
|
25
|
+
declare function isSolanaActionAborted(error: unknown): boolean;
|
|
26
|
+
|
|
27
|
+
export { createSolanaActionStore, isSolanaActionAborted };
|
|
28
|
+
export type { SolanaActionState, SolanaActionStore };
|
package/dist/action.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createReactiveActionStore, isAbortError } from '@solana/kit';
|
|
2
|
+
export { isAbortError } from '@solana/kit';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
4
|
+
|
|
5
|
+
function createSolanaActionStore(fn) {
|
|
6
|
+
return createReactiveActionStore(fn);
|
|
7
|
+
}
|
|
8
|
+
function isSolanaActionAborted(error) {
|
|
9
|
+
return isAbortError(error);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { createSolanaActionStore, isSolanaActionAborted };
|
package/dist/clusters.d.cts
CHANGED
package/dist/clusters.d.mts
CHANGED
package/dist/clusters.d.ts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const action = require('./action.cjs');
|
|
3
4
|
const clusters = require('./clusters.cjs');
|
|
4
5
|
const address = require('./address.cjs');
|
|
5
6
|
const bufferPolyfill = require('./buffer-polyfill.cjs');
|
|
@@ -12,12 +13,12 @@ const tokenAccounts = require('./token-accounts.cjs');
|
|
|
12
13
|
const transaction = require('./transaction.cjs');
|
|
13
14
|
const timeout = require('./timeout.cjs');
|
|
14
15
|
const wallet = require('./wallet.cjs');
|
|
15
|
-
const discovery = require('./shared/core.
|
|
16
|
+
const discovery = require('./shared/core.DjxUirkw.cjs');
|
|
16
17
|
const _ = require('buffer/');
|
|
17
18
|
const kit = require('@solana/kit');
|
|
19
|
+
require('@solana/kit-plugin-rpc');
|
|
18
20
|
require('bs58');
|
|
19
21
|
require('tweetnacl');
|
|
20
|
-
require('@solana/kit-plugin-rpc');
|
|
21
22
|
require('@solana-mobile/wallet-standard-mobile');
|
|
22
23
|
require('@wallet-standard/features');
|
|
23
24
|
require('@solana/wallet-standard-features');
|
|
@@ -25,6 +26,8 @@ require('@wallet-standard/app');
|
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
|
|
29
|
+
exports.createSolanaActionStore = action.createSolanaActionStore;
|
|
30
|
+
exports.isSolanaActionAborted = action.isSolanaActionAborted;
|
|
28
31
|
exports.DEFAULT_CLUSTER = clusters.DEFAULT_CLUSTER;
|
|
29
32
|
exports.getClusterEndpoint = clusters.getClusterEndpoint;
|
|
30
33
|
exports.getClusterWebSocketEndpoint = clusters.getClusterWebSocketEndpoint;
|
|
@@ -57,7 +60,10 @@ exports.withSolanaTimeout = timeout.withSolanaTimeout;
|
|
|
57
60
|
exports.withTimeout = timeout.withTimeout;
|
|
58
61
|
exports.SolanaWalletError = wallet.SolanaWalletError;
|
|
59
62
|
exports.assertWalletCanSign = wallet.assertWalletCanSign;
|
|
63
|
+
exports.assertWalletCanSignAndSendTransactions = wallet.assertWalletCanSignAndSendTransactions;
|
|
64
|
+
exports.assertWalletCanSignIn = wallet.assertWalletCanSignIn;
|
|
60
65
|
exports.assertWalletCanSignMessage = wallet.assertWalletCanSignMessage;
|
|
66
|
+
exports.assertWalletCanSignTransactions = wallet.assertWalletCanSignTransactions;
|
|
61
67
|
exports.assertWalletConnected = wallet.assertWalletConnected;
|
|
62
68
|
exports.createNoWalletSelectedError = wallet.createNoWalletSelectedError;
|
|
63
69
|
exports.isWalletConnected = wallet.isWalletConnected;
|
|
@@ -70,4 +76,8 @@ exports.isSolanaStandardWallet = discovery.isSolanaStandardWallet;
|
|
|
70
76
|
exports.subscribeSolanaWallets = discovery.subscribeSolanaWallets;
|
|
71
77
|
exports.Buffer = _.Buffer;
|
|
72
78
|
exports.address = kit.address;
|
|
79
|
+
exports.createReactiveActionStore = kit.createReactiveActionStore;
|
|
80
|
+
exports.createReactiveStoreWithInitialValueAndSlotTracking = kit.createReactiveStoreWithInitialValueAndSlotTracking;
|
|
81
|
+
exports.getAbortablePromise = kit.getAbortablePromise;
|
|
82
|
+
exports.isAbortError = kit.isAbortError;
|
|
73
83
|
exports.lamports = kit.lamports;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/// <reference path="../types/buffer.d.ts" />
|
|
2
|
+
export { SolanaActionState, SolanaActionStore, createSolanaActionStore, isSolanaActionAborted } from './action.cjs';
|
|
2
3
|
export { DEFAULT_CLUSTER, getClusterEndpoint, getClusterWebSocketEndpoint, getWebSocketEndpoint } from './clusters.cjs';
|
|
3
4
|
export { AddressInput, MaybeAddressInput, parseAddress } from './address.cjs';
|
|
4
5
|
export { installSolanaBufferPolyfill } from './buffer-polyfill.cjs';
|
|
5
6
|
export { SolanaError, SolanaErrorCode, SolanaErrorOptions, createSolanaError, isSolanaError, normalizeSolanaError } from './errors.cjs';
|
|
6
7
|
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.cjs';
|
|
7
|
-
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, b as SolanaClient, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as
|
|
8
|
+
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, b as SolanaClient, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as SolanaSignInAccount, g as SolanaSignInInput, h as SolanaSignInResult, i as SolanaSignMessageResult, j as SolanaTransaction, k as SolanaWallet, l as SolanaWalletInfo, T as TransactionConfirmation, m as TransactionStatus, n as createSolanaClient } from './shared/core.CQ_yMDAL.cjs';
|
|
8
9
|
export { RegisterSolanaMobileWalletOptions, SolanaMobileWalletAppIdentity, getDefaultMobileWalletAppIdentity, isSolanaMobileWalletSupported, registerSolanaMobileWallet } from './mobile-wallet.cjs';
|
|
9
10
|
export { createSolanaContext } from './rpc.cjs';
|
|
10
11
|
export { TokenAccountInfo, TokenAccountsByOwnerOptions, TokenBalanceResult, getTokenAccount, getTokenAccountsByOwner, getTokenBalance } from './token-accounts.cjs';
|
|
11
12
|
export { confirmTransactionSignature, signAndSendTransaction } from './transaction.cjs';
|
|
12
13
|
export { withSolanaTimeout, withTimeout } from './timeout.cjs';
|
|
13
|
-
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignMessage, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.cjs';
|
|
14
|
+
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignAndSendTransactions, assertWalletCanSignIn, assertWalletCanSignMessage, assertWalletCanSignTransactions, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.cjs';
|
|
14
15
|
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.cjs';
|
|
15
|
-
export { Address, Commitment, Lamports, Rpc, Signature, SolanaRpcApi, address, lamports } from '@solana/kit';
|
|
16
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SolanaRpcApi, SolanaRpcResponse, TransactionMessage, TransactionPlan, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
16
17
|
export { Buffer } from 'buffer/';
|
|
17
18
|
import '@wallet-standard/base';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/// <reference path="../types/buffer.d.ts" />
|
|
2
|
+
export { SolanaActionState, SolanaActionStore, createSolanaActionStore, isSolanaActionAborted } from './action.mjs';
|
|
2
3
|
export { DEFAULT_CLUSTER, getClusterEndpoint, getClusterWebSocketEndpoint, getWebSocketEndpoint } from './clusters.mjs';
|
|
3
4
|
export { AddressInput, MaybeAddressInput, parseAddress } from './address.mjs';
|
|
4
5
|
export { installSolanaBufferPolyfill } from './buffer-polyfill.mjs';
|
|
5
6
|
export { SolanaError, SolanaErrorCode, SolanaErrorOptions, createSolanaError, isSolanaError, normalizeSolanaError } from './errors.mjs';
|
|
6
7
|
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.mjs';
|
|
7
|
-
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, b as SolanaClient, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as
|
|
8
|
+
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, b as SolanaClient, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as SolanaSignInAccount, g as SolanaSignInInput, h as SolanaSignInResult, i as SolanaSignMessageResult, j as SolanaTransaction, k as SolanaWallet, l as SolanaWalletInfo, T as TransactionConfirmation, m as TransactionStatus, n as createSolanaClient } from './shared/core.CQ_yMDAL.mjs';
|
|
8
9
|
export { RegisterSolanaMobileWalletOptions, SolanaMobileWalletAppIdentity, getDefaultMobileWalletAppIdentity, isSolanaMobileWalletSupported, registerSolanaMobileWallet } from './mobile-wallet.mjs';
|
|
9
10
|
export { createSolanaContext } from './rpc.mjs';
|
|
10
11
|
export { TokenAccountInfo, TokenAccountsByOwnerOptions, TokenBalanceResult, getTokenAccount, getTokenAccountsByOwner, getTokenBalance } from './token-accounts.mjs';
|
|
11
12
|
export { confirmTransactionSignature, signAndSendTransaction } from './transaction.mjs';
|
|
12
13
|
export { withSolanaTimeout, withTimeout } from './timeout.mjs';
|
|
13
|
-
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignMessage, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.mjs';
|
|
14
|
+
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignAndSendTransactions, assertWalletCanSignIn, assertWalletCanSignMessage, assertWalletCanSignTransactions, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.mjs';
|
|
14
15
|
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.mjs';
|
|
15
|
-
export { Address, Commitment, Lamports, Rpc, Signature, SolanaRpcApi, address, lamports } from '@solana/kit';
|
|
16
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SolanaRpcApi, SolanaRpcResponse, TransactionMessage, TransactionPlan, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
16
17
|
export { Buffer } from 'buffer/';
|
|
17
18
|
import '@wallet-standard/base';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/// <reference path="../types/buffer.d.ts" />
|
|
2
|
+
export { SolanaActionState, SolanaActionStore, createSolanaActionStore, isSolanaActionAborted } from './action.js';
|
|
2
3
|
export { DEFAULT_CLUSTER, getClusterEndpoint, getClusterWebSocketEndpoint, getWebSocketEndpoint } from './clusters.js';
|
|
3
4
|
export { AddressInput, MaybeAddressInput, parseAddress } from './address.js';
|
|
4
5
|
export { installSolanaBufferPolyfill } from './buffer-polyfill.js';
|
|
5
6
|
export { SolanaError, SolanaErrorCode, SolanaErrorOptions, createSolanaError, isSolanaError, normalizeSolanaError } from './errors.js';
|
|
6
7
|
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.js';
|
|
7
|
-
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, b as SolanaClient, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as
|
|
8
|
+
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, b as SolanaClient, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as SolanaSignInAccount, g as SolanaSignInInput, h as SolanaSignInResult, i as SolanaSignMessageResult, j as SolanaTransaction, k as SolanaWallet, l as SolanaWalletInfo, T as TransactionConfirmation, m as TransactionStatus, n as createSolanaClient } from './shared/core.CQ_yMDAL.js';
|
|
8
9
|
export { RegisterSolanaMobileWalletOptions, SolanaMobileWalletAppIdentity, getDefaultMobileWalletAppIdentity, isSolanaMobileWalletSupported, registerSolanaMobileWallet } from './mobile-wallet.js';
|
|
9
10
|
export { createSolanaContext } from './rpc.js';
|
|
10
11
|
export { TokenAccountInfo, TokenAccountsByOwnerOptions, TokenBalanceResult, getTokenAccount, getTokenAccountsByOwner, getTokenBalance } from './token-accounts.js';
|
|
11
12
|
export { confirmTransactionSignature, signAndSendTransaction } from './transaction.js';
|
|
12
13
|
export { withSolanaTimeout, withTimeout } from './timeout.js';
|
|
13
|
-
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignMessage, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.js';
|
|
14
|
+
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignAndSendTransactions, assertWalletCanSignIn, assertWalletCanSignMessage, assertWalletCanSignTransactions, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.js';
|
|
14
15
|
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.js';
|
|
15
|
-
export { Address, Commitment, Lamports, Rpc, Signature, SolanaRpcApi, address, lamports } from '@solana/kit';
|
|
16
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SolanaRpcApi, SolanaRpcResponse, TransactionMessage, TransactionPlan, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
16
17
|
export { Buffer } from 'buffer/';
|
|
17
18
|
import '@wallet-standard/base';
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { createSolanaActionStore, isSolanaActionAborted } from './action.mjs';
|
|
1
2
|
export { DEFAULT_CLUSTER, getClusterEndpoint, getClusterWebSocketEndpoint, getWebSocketEndpoint } from './clusters.mjs';
|
|
2
3
|
export { parseAddress } from './address.mjs';
|
|
3
4
|
export { installSolanaBufferPolyfill } from './buffer-polyfill.mjs';
|
|
@@ -9,13 +10,13 @@ export { createSolanaContext } from './rpc.mjs';
|
|
|
9
10
|
export { getTokenAccount, getTokenAccountsByOwner, getTokenBalance } from './token-accounts.mjs';
|
|
10
11
|
export { confirmTransactionSignature, signAndSendTransaction } from './transaction.mjs';
|
|
11
12
|
export { withSolanaTimeout, withTimeout } from './timeout.mjs';
|
|
12
|
-
export { SolanaWalletError, assertWalletCanSign, assertWalletCanSignMessage, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.mjs';
|
|
13
|
-
export { S as SOLANA_CHAINS, a as SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, b as adaptSolanaStandardWallet, g as getRegisteredSolanaWallets, c as getSolanaChain, i as isSolanaStandardWallet, s as subscribeSolanaWallets } from './shared/core.
|
|
13
|
+
export { SolanaWalletError, assertWalletCanSign, assertWalletCanSignAndSendTransactions, assertWalletCanSignIn, assertWalletCanSignMessage, assertWalletCanSignTransactions, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.mjs';
|
|
14
|
+
export { S as SOLANA_CHAINS, a as SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, b as adaptSolanaStandardWallet, g as getRegisteredSolanaWallets, c as getSolanaChain, i as isSolanaStandardWallet, s as subscribeSolanaWallets } from './shared/core.DEcQDbtz.mjs';
|
|
14
15
|
export { Buffer } from 'buffer/';
|
|
15
|
-
export { address, lamports } from '@solana/kit';
|
|
16
|
+
export { address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
17
|
+
import '@solana/kit-plugin-rpc';
|
|
16
18
|
import 'bs58';
|
|
17
19
|
import 'tweetnacl';
|
|
18
|
-
import '@solana/kit-plugin-rpc';
|
|
19
20
|
import '@solana-mobile/wallet-standard-mobile';
|
|
20
21
|
import '@wallet-standard/features';
|
|
21
22
|
import '@solana/wallet-standard-features';
|
package/dist/ios-wallet.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SolanaChain, c as SolanaCluster,
|
|
1
|
+
import { a as SolanaChain, c as SolanaCluster, l as SolanaWalletInfo, k as SolanaWallet } from './shared/core.CQ_yMDAL.cjs';
|
|
2
2
|
import '@solana/kit';
|
|
3
3
|
|
|
4
4
|
interface SolanaIosWalletAppIdentity {
|
package/dist/ios-wallet.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SolanaChain, c as SolanaCluster,
|
|
1
|
+
import { a as SolanaChain, c as SolanaCluster, l as SolanaWalletInfo, k as SolanaWallet } from './shared/core.CQ_yMDAL.mjs';
|
|
2
2
|
import '@solana/kit';
|
|
3
3
|
|
|
4
4
|
interface SolanaIosWalletAppIdentity {
|
package/dist/ios-wallet.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SolanaChain, c as SolanaCluster,
|
|
1
|
+
import { a as SolanaChain, c as SolanaCluster, l as SolanaWalletInfo, k as SolanaWallet } from './shared/core.CQ_yMDAL.js';
|
|
2
2
|
import '@solana/kit';
|
|
3
3
|
|
|
4
4
|
interface SolanaIosWalletAppIdentity {
|
package/dist/kit.cjs
CHANGED
|
@@ -17,5 +17,9 @@ function createSolanaClient(config = {}) {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
exports.address = kit.address;
|
|
20
|
+
exports.createReactiveActionStore = kit.createReactiveActionStore;
|
|
21
|
+
exports.createReactiveStoreWithInitialValueAndSlotTracking = kit.createReactiveStoreWithInitialValueAndSlotTracking;
|
|
22
|
+
exports.getAbortablePromise = kit.getAbortablePromise;
|
|
23
|
+
exports.isAbortError = kit.isAbortError;
|
|
20
24
|
exports.lamports = kit.lamports;
|
|
21
25
|
exports.createSolanaClient = createSolanaClient;
|
package/dist/kit.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Address, Commitment, Lamports, Rpc, Signature, SolanaRpcApi, address, lamports } from '@solana/kit';
|
|
2
|
-
export { b as SolanaClient,
|
|
1
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SolanaRpcApi, SolanaRpcResponse, TransactionMessage, TransactionPlan, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
2
|
+
export { b as SolanaClient, n as createSolanaClient } from './shared/core.CQ_yMDAL.cjs';
|
package/dist/kit.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Address, Commitment, Lamports, Rpc, Signature, SolanaRpcApi, address, lamports } from '@solana/kit';
|
|
2
|
-
export { b as SolanaClient,
|
|
1
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SolanaRpcApi, SolanaRpcResponse, TransactionMessage, TransactionPlan, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
2
|
+
export { b as SolanaClient, n as createSolanaClient } from './shared/core.CQ_yMDAL.mjs';
|
package/dist/kit.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Address, Commitment, Lamports, Rpc, Signature, SolanaRpcApi, address, lamports } from '@solana/kit';
|
|
2
|
-
export { b as SolanaClient,
|
|
1
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SolanaRpcApi, SolanaRpcResponse, TransactionMessage, TransactionPlan, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
2
|
+
export { b as SolanaClient, n as createSolanaClient } from './shared/core.CQ_yMDAL.js';
|
package/dist/kit.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createClient } from '@solana/kit';
|
|
2
|
-
export { address, lamports } from '@solana/kit';
|
|
2
|
+
export { address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
3
3
|
import { solanaRpcConnection } from '@solana/kit-plugin-rpc';
|
|
4
4
|
import { DEFAULT_CLUSTER, getClusterEndpoint, getWebSocketEndpoint, getClusterWebSocketEndpoint } from './clusters.mjs';
|
|
5
5
|
|
package/dist/mobile-wallet.d.cts
CHANGED
package/dist/mobile-wallet.d.mts
CHANGED
package/dist/mobile-wallet.d.ts
CHANGED
package/dist/rpc.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as SolanaConfig, e as SolanaContext } from './shared/core.
|
|
1
|
+
import { d as SolanaConfig, e as SolanaContext } from './shared/core.CQ_yMDAL.cjs';
|
|
2
2
|
import '@solana/kit';
|
|
3
3
|
|
|
4
4
|
declare function createSolanaContext(config?: SolanaConfig): SolanaContext;
|
package/dist/rpc.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as SolanaConfig, e as SolanaContext } from './shared/core.
|
|
1
|
+
import { d as SolanaConfig, e as SolanaContext } from './shared/core.CQ_yMDAL.mjs';
|
|
2
2
|
import '@solana/kit';
|
|
3
3
|
|
|
4
4
|
declare function createSolanaContext(config?: SolanaConfig): SolanaContext;
|
package/dist/rpc.d.ts
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
import * as _solana_kit from '@solana/kit';
|
|
2
2
|
import { Commitment, Slot, Address, Signature } from '@solana/kit';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Create a @solana/kit client for the given Solana configuration.
|
|
6
|
-
*
|
|
7
|
-
* The returned client exposes read-only `rpc` and `rpcSubscriptions`; use
|
|
8
|
-
* `client.rpc.getSlot().send()` and friends instead of the legacy
|
|
9
|
-
* `connection` APIs.
|
|
10
|
-
*/
|
|
11
|
-
declare function createSolanaClient(config?: SolanaConfig): _solana_kit.Client<_solana_kit.ExtendedClient<object, {
|
|
12
|
-
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
|
-
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
14
|
-
}>>;
|
|
15
|
-
type SolanaClient = ReturnType<typeof createSolanaClient>;
|
|
16
|
-
|
|
17
4
|
type SolanaCluster = "mainnet-beta" | "testnet" | "devnet" | "localnet";
|
|
18
5
|
type SolanaChain = "solana:mainnet" | "solana:testnet" | "solana:devnet" | "solana:localnet";
|
|
19
6
|
interface SolanaConfig {
|
|
@@ -34,6 +21,33 @@ interface SolanaSignMessageResult {
|
|
|
34
21
|
signedMessage: Uint8Array;
|
|
35
22
|
signature: Uint8Array;
|
|
36
23
|
}
|
|
24
|
+
interface SolanaSignInAccount {
|
|
25
|
+
address: Address;
|
|
26
|
+
publicKey: Uint8Array;
|
|
27
|
+
chains: string[];
|
|
28
|
+
label?: string;
|
|
29
|
+
icon?: string;
|
|
30
|
+
}
|
|
31
|
+
interface SolanaSignInResult {
|
|
32
|
+
account: SolanaSignInAccount;
|
|
33
|
+
signedMessage: Uint8Array;
|
|
34
|
+
signature: Uint8Array;
|
|
35
|
+
signatureType?: "ed25519";
|
|
36
|
+
}
|
|
37
|
+
interface SolanaSignInInput {
|
|
38
|
+
domain?: string;
|
|
39
|
+
address?: string;
|
|
40
|
+
statement?: string;
|
|
41
|
+
uri?: string;
|
|
42
|
+
version?: string;
|
|
43
|
+
chainId?: string;
|
|
44
|
+
nonce?: string;
|
|
45
|
+
issuedAt?: string;
|
|
46
|
+
expirationTime?: string;
|
|
47
|
+
notBefore?: string;
|
|
48
|
+
requestId?: string;
|
|
49
|
+
resources?: readonly string[];
|
|
50
|
+
}
|
|
37
51
|
interface SolanaWallet {
|
|
38
52
|
publicKey: Address | null;
|
|
39
53
|
connected: boolean;
|
|
@@ -44,11 +58,14 @@ interface SolanaWallet {
|
|
|
44
58
|
connect: () => Promise<void>;
|
|
45
59
|
disconnect: () => Promise<void>;
|
|
46
60
|
signMessage?: (message: Uint8Array) => Promise<SolanaSignMessageResult>;
|
|
61
|
+
signIn?: (input?: SolanaSignInInput) => Promise<SolanaSignInResult>;
|
|
47
62
|
signTransaction?: (transaction: SolanaTransaction) => Promise<SolanaTransaction>;
|
|
48
63
|
signAllTransactions?: (transactions: SolanaTransaction[]) => Promise<SolanaTransaction[]>;
|
|
64
|
+
signTransactions?: (transactions: SolanaTransaction[]) => Promise<SolanaTransaction[]>;
|
|
49
65
|
signAndSendTransaction?: (transaction: SolanaTransaction, options?: SendTransactionOptions) => Promise<{
|
|
50
66
|
signature: string;
|
|
51
67
|
}>;
|
|
68
|
+
signAndSendTransactions?: (transactions: SolanaTransaction[], options?: SendTransactionOptions) => Promise<string[]>;
|
|
52
69
|
}
|
|
53
70
|
interface SolanaWalletInfo {
|
|
54
71
|
name: string;
|
|
@@ -62,6 +79,7 @@ interface SolanaWalletInfo {
|
|
|
62
79
|
capabilities?: {
|
|
63
80
|
connect?: boolean;
|
|
64
81
|
disconnect?: boolean;
|
|
82
|
+
signIn?: boolean;
|
|
65
83
|
signMessage?: boolean;
|
|
66
84
|
signTransaction?: boolean;
|
|
67
85
|
signAllTransactions?: boolean;
|
|
@@ -98,5 +116,18 @@ interface TransactionConfirmation {
|
|
|
98
116
|
status: TransactionStatus;
|
|
99
117
|
}
|
|
100
118
|
|
|
101
|
-
|
|
102
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Create a @solana/kit client for the given Solana configuration.
|
|
121
|
+
*
|
|
122
|
+
* The returned client exposes read-only `rpc` and `rpcSubscriptions`; use
|
|
123
|
+
* `client.rpc.getSlot().send()` and friends instead of the legacy
|
|
124
|
+
* `connection` APIs.
|
|
125
|
+
*/
|
|
126
|
+
declare function createSolanaClient(config?: SolanaConfig): _solana_kit.Client<_solana_kit.ExtendedClient<object, {
|
|
127
|
+
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>;
|
|
128
|
+
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
129
|
+
}>>;
|
|
130
|
+
type SolanaClient = ReturnType<typeof createSolanaClient>;
|
|
131
|
+
|
|
132
|
+
export { createSolanaClient as n };
|
|
133
|
+
export type { ConfirmTransactionOptions as C, SendTransactionOptions as S, TransactionConfirmation as T, SolanaChain as a, SolanaClient as b, SolanaCluster as c, SolanaConfig as d, SolanaContext as e, SolanaSignInAccount as f, SolanaSignInInput as g, SolanaSignInResult as h, SolanaSignMessageResult as i, SolanaTransaction as j, SolanaWallet as k, SolanaWalletInfo as l, TransactionStatus as m };
|