@vue-solana/core 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -19
- package/dist/action.cjs +1 -0
- package/dist/action.mjs +1 -0
- package/dist/clusters.cjs +4 -2
- package/dist/clusters.d.cts +2 -1
- package/dist/clusters.d.mts +2 -1
- package/dist/clusters.d.ts +2 -1
- package/dist/clusters.mjs +4 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +1 -1
- package/dist/ios-wallet.d.cts +2 -1
- package/dist/ios-wallet.d.mts +2 -1
- package/dist/ios-wallet.d.ts +2 -1
- package/dist/kit.cjs +53 -6
- package/dist/kit.d.cts +3 -2
- package/dist/kit.d.mts +3 -2
- package/dist/kit.d.ts +3 -2
- package/dist/kit.mjs +51 -8
- package/dist/mobile-wallet.d.cts +2 -1
- package/dist/mobile-wallet.d.mts +2 -1
- package/dist/mobile-wallet.d.ts +2 -1
- package/dist/rpc.cjs +1 -0
- package/dist/rpc.d.cts +2 -1
- package/dist/rpc.d.mts +2 -1
- package/dist/rpc.d.ts +2 -1
- package/dist/rpc.mjs +1 -0
- package/dist/shared/{core.Bk0PszDR.d.cts → core.C0cYheiB.d.cts} +66 -12
- package/dist/shared/{core.Bk0PszDR.d.mts → core.C0cYheiB.d.mts} +66 -12
- package/dist/shared/{core.Bk0PszDR.d.ts → core.C0cYheiB.d.ts} +66 -12
- package/dist/token-accounts.d.cts +2 -1
- package/dist/token-accounts.d.mts +2 -1
- package/dist/token-accounts.d.ts +2 -1
- package/dist/transaction.d.cts +2 -1
- package/dist/transaction.d.mts +2 -1
- package/dist/transaction.d.ts +2 -1
- package/dist/types.d.cts +2 -1
- package/dist/types.d.mts +2 -1
- package/dist/types.d.ts +2 -1
- package/dist/wallet-standard.d.cts +2 -1
- package/dist/wallet-standard.d.mts +2 -1
- package/dist/wallet-standard.d.ts +2 -1
- package/dist/wallet.d.cts +2 -1
- package/dist/wallet.d.mts +2 -1
- package/dist/wallet.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Full Vue Solana docs:
|
|
|
28
28
|
## Features
|
|
29
29
|
|
|
30
30
|
- Cluster-aware RPC helpers with HTTP and WebSocket endpoint defaults.
|
|
31
|
-
- A Kit `client` with lazy `rpc` and `rpcSubscriptions` through `createSolanaClient()` / `createSolanaContext()`.
|
|
31
|
+
- A Kit `client` with lazy `rpc` and `rpcSubscriptions` plus the official transaction planner and RPC plan-sending executor through `createSolanaClient()` / `createSolanaContext()`.
|
|
32
32
|
- Shared `SolanaConfig`, `SolanaContext`, and `SolanaWallet` types for framework integrations.
|
|
33
33
|
- Wallet capability assertions for connection, message signing, and transaction signing flows.
|
|
34
34
|
- Browser Wallet Standard adaptation primitives.
|
|
@@ -40,12 +40,12 @@ Full Vue Solana docs:
|
|
|
40
40
|
|
|
41
41
|
## Compatibility
|
|
42
42
|
|
|
43
|
-
| Requirement | Supported
|
|
44
|
-
| ------------- |
|
|
45
|
-
| Runtime | Modern ESM or CommonJS bundlers
|
|
46
|
-
| TypeScript | TypeScript 5.x recommended
|
|
47
|
-
| Solana client | `@solana/kit@^8.3.0` (and `@solana/kit-plugin-rpc`)
|
|
48
|
-
| Clusters | `mainnet-beta
|
|
43
|
+
| Requirement | Supported |
|
|
44
|
+
| ------------- | ----------------------------------------------------------------- |
|
|
45
|
+
| Runtime | Modern ESM or CommonJS bundlers |
|
|
46
|
+
| TypeScript | TypeScript 5.x recommended |
|
|
47
|
+
| Solana client | `@solana/kit@^8.3.0` (and `@solana/kit-plugin-rpc`) |
|
|
48
|
+
| Clusters | `mainnet` (alias `mainnet-beta`), `devnet`, `testnet`, `localnet` |
|
|
49
49
|
|
|
50
50
|
This package no longer depends on `@solana/web3-compat`. It depends on `@solana/kit` and `@solana/kit-plugin-rpc`, so apps do not need to install either directly for normal Vue Solana usage.
|
|
51
51
|
|
|
@@ -104,19 +104,25 @@ const config: SolanaConfig = {
|
|
|
104
104
|
};
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
| Option
|
|
108
|
-
|
|
|
109
|
-
| `cluster`
|
|
110
|
-
| `endpoint`
|
|
111
|
-
| `wsEndpoint`
|
|
112
|
-
| `commitment`
|
|
113
|
-
| `autoConnect`
|
|
107
|
+
| Option | Type | Default | Description |
|
|
108
|
+
| ---------------- | -------------------------------------------------------------------- | ----------------------------- | --------------------------------------------------------------------------------------- |
|
|
109
|
+
| `cluster` | `"mainnet" \| "mainnet-beta" \| "devnet" \| "testnet" \| "localnet"` | `"devnet"` | Solana cluster used when `endpoint` is omitted. |
|
|
110
|
+
| `endpoint` | `string` | Public endpoint for `cluster` | HTTP RPC endpoint. Use a dedicated RPC provider for production apps. |
|
|
111
|
+
| `wsEndpoint` | `string` | Derived from `endpoint` | WebSocket RPC endpoint. |
|
|
112
|
+
| `commitment` | Solana commitment | Solana client default | Default commitment for RPC calls. |
|
|
113
|
+
| `autoConnect` | `boolean` | `false` | Consumed by Vue/Nuxt integrations to reconnect a previously selected discovered wallet. |
|
|
114
|
+
| `payer` | `TransactionSigner` | None | Kit client fee payer and signer for client-sent transactions. |
|
|
115
|
+
| `payerSecretKey` | `string` | None | Base64 64-byte Ed25519 keypair, secret key first, resolved at client creation. |
|
|
114
116
|
|
|
115
|
-
Supported clusters are `mainnet-beta
|
|
117
|
+
Supported clusters are `mainnet` (legacy alias `mainnet-beta`), `testnet`, `devnet`, and `localnet`. If `endpoint` is omitted, the package uses the public Solana RPC endpoint for the selected cluster. If `wsEndpoint` is omitted, it is derived from the RPC endpoint.
|
|
116
118
|
|
|
117
119
|
`autoConnect` is consumed by the Vue plugin and Nuxt module. It defaults to `false`; when set to `true`, Vue Solana reconnects only a previously selected wallet identity that is discovered again on the client.
|
|
118
120
|
|
|
119
|
-
|
|
121
|
+
`payer` is a Kit `TransactionSigner`; `payerSecretKey` is its serializable base64 64-byte Ed25519 keypair form. Both are supported by direct core/Vue clients. A client-sent transaction requires a payer. Never put a raw secret or `payerSecretKey` in Nuxt public runtime config, and never ship a funded keypair to an end-user browser.
|
|
122
|
+
|
|
123
|
+
`createSolanaClient()` composes the official `@solana/kit-plugin-rpc` stack by default: `solanaRpc()`, `rpcTransactionPlanner()`, and `rpcTransactionPlanSendingExecutor()`. The old custom fallback sender is removed. The official sender adds a fresh blockhash, resource-limit and preflight handling, signs, submits, and waits for `confirmed` commitment before the send resolves.
|
|
124
|
+
|
|
125
|
+
Use `mainnet` for Solana mainnet. This is Solana's official mainnet cluster name. The legacy `mainnet-beta` spelling is still accepted and redirects to the same endpoint.
|
|
120
126
|
|
|
121
127
|
For development, use `devnet` and request free test SOL from the official faucet:
|
|
122
128
|
|
|
@@ -148,7 +154,7 @@ Direct subpaths:
|
|
|
148
154
|
| --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
149
155
|
| `DEFAULT_CLUSTER` | Default cluster, currently `devnet`. |
|
|
150
156
|
| `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
|
|
157
|
+
| `createSolanaClient(config?)` | Creates a Kit client exposing `rpc`, `rpcSubscriptions`, the official transaction planner, and the official RPC transaction-sending executor. |
|
|
152
158
|
| `createSolanaContext(config?)` | Creates `{ cluster, endpoint, wsEndpoint, client }`. |
|
|
153
159
|
| `getClusterEndpoint(cluster?)` | Returns the HTTP RPC endpoint for a cluster. |
|
|
154
160
|
| `getClusterWebSocketEndpoint(cluster?)` | Returns the WebSocket endpoint for a cluster. |
|
|
@@ -163,7 +169,9 @@ Direct subpaths:
|
|
|
163
169
|
| `getTokenAccount(client, address, commitment?)` | Reads a single token account, returning `null` when it does not exist. |
|
|
164
170
|
| `getTokenBalance(client, mint, owner, commitment?)` | Reads the token balance for an owner's associated token account as `{ amount, decimals }`. |
|
|
165
171
|
| `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
|
-
|
|
172
|
+
|
|
173
|
+
The client-sent API is the official Kit `ClientWithTransactionSending` capability installed by `createSolanaClient()`. It does not use a wallet popup; `sent` is reached after the RPC executor completes its send-and-confirm operation at `confirmed` commitment. Use a `payer`, and keep funded keys in a trusted server or relayer context.
|
|
174
|
+
| `isSolanaActionAborted(error)` | Detects abort errors from superseded action dispatches. |
|
|
167
175
|
|
|
168
176
|
## Wallet Interface
|
|
169
177
|
|
|
@@ -217,7 +225,7 @@ Docs: [Vue Solana Agent Skill](https://vue-solana-docs.vercel.app/agent-skill)
|
|
|
217
225
|
## Caveats
|
|
218
226
|
|
|
219
227
|
- Public Solana RPC endpoints are useful for development, but production apps should use dedicated RPC infrastructure.
|
|
220
|
-
- Use `mainnet
|
|
228
|
+
- Use `mainnet` for Solana mainnet. This is Solana's official mainnet cluster name; the legacy `mainnet-beta` spelling is still accepted and redirects to the same endpoint.
|
|
221
229
|
- Transactions are raw wire bytes. Build transaction messages with `@solana/kit` (`createTransactionMessage()`, `compileTransaction()`) and serialize them before passing them to wallet flows.
|
|
222
230
|
- v2.0.0 removed `@solana/web3-compat` and the `web3` subpaths. See the [Kit Migration guide](https://vue-solana-docs.vercel.app/guides/kit-migration) for migrating from v1.
|
|
223
231
|
- Desktop native app wallets are planned but not implemented yet.
|
package/dist/action.cjs
CHANGED
package/dist/action.mjs
CHANGED
package/dist/clusters.cjs
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
const DEFAULT_CLUSTER = "devnet";
|
|
4
4
|
const CLUSTER_ENDPOINTS = {
|
|
5
|
-
|
|
5
|
+
mainnet: "https://api.mainnet.solana.com",
|
|
6
|
+
"mainnet-beta": "https://api.mainnet.solana.com",
|
|
6
7
|
testnet: "https://api.testnet.solana.com",
|
|
7
8
|
devnet: "https://api.devnet.solana.com",
|
|
8
9
|
localnet: "http://127.0.0.1:8899"
|
|
9
10
|
};
|
|
10
11
|
const CLUSTER_WEBSOCKET_ENDPOINTS = {
|
|
11
|
-
|
|
12
|
+
mainnet: "wss://api.mainnet.solana.com",
|
|
13
|
+
"mainnet-beta": "wss://api.mainnet.solana.com",
|
|
12
14
|
testnet: "wss://api.testnet.solana.com",
|
|
13
15
|
devnet: "wss://api.devnet.solana.com",
|
|
14
16
|
localnet: "ws://127.0.0.1:8900"
|
package/dist/clusters.d.cts
CHANGED
package/dist/clusters.d.mts
CHANGED
package/dist/clusters.d.ts
CHANGED
package/dist/clusters.mjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
const DEFAULT_CLUSTER = "devnet";
|
|
2
2
|
const CLUSTER_ENDPOINTS = {
|
|
3
|
-
|
|
3
|
+
mainnet: "https://api.mainnet.solana.com",
|
|
4
|
+
"mainnet-beta": "https://api.mainnet.solana.com",
|
|
4
5
|
testnet: "https://api.testnet.solana.com",
|
|
5
6
|
devnet: "https://api.devnet.solana.com",
|
|
6
7
|
localnet: "http://127.0.0.1:8899"
|
|
7
8
|
};
|
|
8
9
|
const CLUSTER_WEBSOCKET_ENDPOINTS = {
|
|
9
|
-
|
|
10
|
+
mainnet: "wss://api.mainnet.solana.com",
|
|
11
|
+
"mainnet-beta": "wss://api.mainnet.solana.com",
|
|
10
12
|
testnet: "wss://api.testnet.solana.com",
|
|
11
13
|
devnet: "wss://api.devnet.solana.com",
|
|
12
14
|
localnet: "ws://127.0.0.1:8900"
|
package/dist/index.cjs
CHANGED
|
@@ -17,8 +17,8 @@ const discovery = require('./shared/core.DjxUirkw.cjs');
|
|
|
17
17
|
const _ = require('buffer/');
|
|
18
18
|
const kit = require('@solana/kit');
|
|
19
19
|
require('@solana/kit-plugin-rpc');
|
|
20
|
-
require('bs58');
|
|
21
20
|
require('tweetnacl');
|
|
21
|
+
require('bs58');
|
|
22
22
|
require('@solana-mobile/wallet-standard-mobile');
|
|
23
23
|
require('@wallet-standard/features');
|
|
24
24
|
require('@solana/wallet-standard-features');
|
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ export { AddressInput, MaybeAddressInput, parseAddress } from './address.cjs';
|
|
|
5
5
|
export { installSolanaBufferPolyfill } from './buffer-polyfill.cjs';
|
|
6
6
|
export { SolanaError, SolanaErrorCode, SolanaErrorOptions, createSolanaError, isSolanaError, normalizeSolanaError } from './errors.cjs';
|
|
7
7
|
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.cjs';
|
|
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.
|
|
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.C0cYheiB.cjs';
|
|
9
9
|
export { RegisterSolanaMobileWalletOptions, SolanaMobileWalletAppIdentity, getDefaultMobileWalletAppIdentity, isSolanaMobileWalletSupported, registerSolanaMobileWallet } from './mobile-wallet.cjs';
|
|
10
10
|
export { createSolanaContext } from './rpc.cjs';
|
|
11
11
|
export { TokenAccountInfo, TokenAccountsByOwnerOptions, TokenBalanceResult, getTokenAccount, getTokenAccountsByOwner, getTokenBalance } from './token-accounts.cjs';
|
|
@@ -13,6 +13,7 @@ export { confirmTransactionSignature, signAndSendTransaction } from './transacti
|
|
|
13
13
|
export { withSolanaTimeout, withTimeout } from './timeout.cjs';
|
|
14
14
|
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignAndSendTransactions, assertWalletCanSignIn, assertWalletCanSignMessage, assertWalletCanSignTransactions, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.cjs';
|
|
15
15
|
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.cjs';
|
|
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
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, ClientWithTransactionSending, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SingleTransactionPlan, SolanaRpcApi, SolanaRpcResponse, SuccessfulSingleTransactionPlanResult, TransactionMessage, TransactionPlan, TransactionPlanInput, TransactionPlanResult, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
17
17
|
export { Buffer } from 'buffer/';
|
|
18
|
+
import '@solana/kit-plugin-rpc';
|
|
18
19
|
import '@wallet-standard/base';
|
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ export { AddressInput, MaybeAddressInput, parseAddress } from './address.mjs';
|
|
|
5
5
|
export { installSolanaBufferPolyfill } from './buffer-polyfill.mjs';
|
|
6
6
|
export { SolanaError, SolanaErrorCode, SolanaErrorOptions, createSolanaError, isSolanaError, normalizeSolanaError } from './errors.mjs';
|
|
7
7
|
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.mjs';
|
|
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.
|
|
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.C0cYheiB.mjs';
|
|
9
9
|
export { RegisterSolanaMobileWalletOptions, SolanaMobileWalletAppIdentity, getDefaultMobileWalletAppIdentity, isSolanaMobileWalletSupported, registerSolanaMobileWallet } from './mobile-wallet.mjs';
|
|
10
10
|
export { createSolanaContext } from './rpc.mjs';
|
|
11
11
|
export { TokenAccountInfo, TokenAccountsByOwnerOptions, TokenBalanceResult, getTokenAccount, getTokenAccountsByOwner, getTokenBalance } from './token-accounts.mjs';
|
|
@@ -13,6 +13,7 @@ export { confirmTransactionSignature, signAndSendTransaction } from './transacti
|
|
|
13
13
|
export { withSolanaTimeout, withTimeout } from './timeout.mjs';
|
|
14
14
|
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignAndSendTransactions, assertWalletCanSignIn, assertWalletCanSignMessage, assertWalletCanSignTransactions, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.mjs';
|
|
15
15
|
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.mjs';
|
|
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
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, ClientWithTransactionSending, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SingleTransactionPlan, SolanaRpcApi, SolanaRpcResponse, SuccessfulSingleTransactionPlanResult, TransactionMessage, TransactionPlan, TransactionPlanInput, TransactionPlanResult, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
17
17
|
export { Buffer } from 'buffer/';
|
|
18
|
+
import '@solana/kit-plugin-rpc';
|
|
18
19
|
import '@wallet-standard/base';
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { AddressInput, MaybeAddressInput, parseAddress } from './address.js';
|
|
|
5
5
|
export { installSolanaBufferPolyfill } from './buffer-polyfill.js';
|
|
6
6
|
export { SolanaError, SolanaErrorCode, SolanaErrorOptions, createSolanaError, isSolanaError, normalizeSolanaError } from './errors.js';
|
|
7
7
|
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.js';
|
|
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.
|
|
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.C0cYheiB.js';
|
|
9
9
|
export { RegisterSolanaMobileWalletOptions, SolanaMobileWalletAppIdentity, getDefaultMobileWalletAppIdentity, isSolanaMobileWalletSupported, registerSolanaMobileWallet } from './mobile-wallet.js';
|
|
10
10
|
export { createSolanaContext } from './rpc.js';
|
|
11
11
|
export { TokenAccountInfo, TokenAccountsByOwnerOptions, TokenBalanceResult, getTokenAccount, getTokenAccountsByOwner, getTokenBalance } from './token-accounts.js';
|
|
@@ -13,6 +13,7 @@ export { confirmTransactionSignature, signAndSendTransaction } from './transacti
|
|
|
13
13
|
export { withSolanaTimeout, withTimeout } from './timeout.js';
|
|
14
14
|
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignAndSendTransactions, assertWalletCanSignIn, assertWalletCanSignMessage, assertWalletCanSignTransactions, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.js';
|
|
15
15
|
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.js';
|
|
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
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, ClientWithTransactionSending, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SingleTransactionPlan, SolanaRpcApi, SolanaRpcResponse, SuccessfulSingleTransactionPlanResult, TransactionMessage, TransactionPlan, TransactionPlanInput, TransactionPlanResult, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
17
17
|
export { Buffer } from 'buffer/';
|
|
18
|
+
import '@solana/kit-plugin-rpc';
|
|
18
19
|
import '@wallet-standard/base';
|
package/dist/index.mjs
CHANGED
|
@@ -15,8 +15,8 @@ export { S as SOLANA_CHAINS, a as SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, b as
|
|
|
15
15
|
export { Buffer } from 'buffer/';
|
|
16
16
|
export { address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
17
17
|
import '@solana/kit-plugin-rpc';
|
|
18
|
-
import 'bs58';
|
|
19
18
|
import 'tweetnacl';
|
|
19
|
+
import 'bs58';
|
|
20
20
|
import '@solana-mobile/wallet-standard-mobile';
|
|
21
21
|
import '@wallet-standard/features';
|
|
22
22
|
import '@solana/wallet-standard-features';
|
package/dist/ios-wallet.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as SolanaChain, c as SolanaCluster, l as SolanaWalletInfo, k as SolanaWallet } from './shared/core.
|
|
1
|
+
import { a as SolanaChain, c as SolanaCluster, l as SolanaWalletInfo, k as SolanaWallet } from './shared/core.C0cYheiB.cjs';
|
|
2
|
+
import '@solana/kit-plugin-rpc';
|
|
2
3
|
import '@solana/kit';
|
|
3
4
|
|
|
4
5
|
interface SolanaIosWalletAppIdentity {
|
package/dist/ios-wallet.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as SolanaChain, c as SolanaCluster, l as SolanaWalletInfo, k as SolanaWallet } from './shared/core.
|
|
1
|
+
import { a as SolanaChain, c as SolanaCluster, l as SolanaWalletInfo, k as SolanaWallet } from './shared/core.C0cYheiB.mjs';
|
|
2
|
+
import '@solana/kit-plugin-rpc';
|
|
2
3
|
import '@solana/kit';
|
|
3
4
|
|
|
4
5
|
interface SolanaIosWalletAppIdentity {
|
package/dist/ios-wallet.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as SolanaChain, c as SolanaCluster, l as SolanaWalletInfo, k as SolanaWallet } from './shared/core.
|
|
1
|
+
import { a as SolanaChain, c as SolanaCluster, l as SolanaWalletInfo, k as SolanaWallet } from './shared/core.C0cYheiB.js';
|
|
2
|
+
import '@solana/kit-plugin-rpc';
|
|
2
3
|
import '@solana/kit';
|
|
3
4
|
|
|
4
5
|
interface SolanaIosWalletAppIdentity {
|
package/dist/kit.cjs
CHANGED
|
@@ -2,19 +2,66 @@
|
|
|
2
2
|
|
|
3
3
|
const kit = require('@solana/kit');
|
|
4
4
|
const kitPluginRpc = require('@solana/kit-plugin-rpc');
|
|
5
|
+
const naclModule = require('tweetnacl');
|
|
5
6
|
const clusters = require('./clusters.cjs');
|
|
6
7
|
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
9
|
+
|
|
10
|
+
const naclModule__default = /*#__PURE__*/_interopDefaultCompat(naclModule);
|
|
11
|
+
|
|
12
|
+
function buildSolanaClient(endpoint, wsEndpoint, payer) {
|
|
13
|
+
const client = kit.createClient().use(
|
|
14
|
+
(current) => kit.extendClient(current, payer ? { payer } : {})
|
|
15
|
+
);
|
|
16
|
+
return client.use(
|
|
17
|
+
kitPluginRpc.solanaRpc({
|
|
13
18
|
rpcUrl: endpoint,
|
|
14
19
|
rpcSubscriptionsUrl: wsEndpoint
|
|
15
20
|
})
|
|
16
21
|
).use(kitPluginRpc.rpcAirdrop());
|
|
17
22
|
}
|
|
23
|
+
function createSolanaClient(config = {}) {
|
|
24
|
+
const cluster = config.cluster ?? clusters.DEFAULT_CLUSTER;
|
|
25
|
+
const endpoint = config.endpoint ?? clusters.getClusterEndpoint(cluster);
|
|
26
|
+
const wsEndpoint = config.wsEndpoint ?? (config.endpoint ? clusters.getWebSocketEndpoint(endpoint) : clusters.getClusterWebSocketEndpoint(cluster));
|
|
27
|
+
const payer = config.payer ?? resolvePayerFromSecretKey(config.payerSecretKey);
|
|
28
|
+
return buildSolanaClient(endpoint, wsEndpoint, payer);
|
|
29
|
+
}
|
|
30
|
+
function resolvePayerFromSecretKey(payerSecretKey) {
|
|
31
|
+
if (!payerSecretKey) {
|
|
32
|
+
return void 0;
|
|
33
|
+
}
|
|
34
|
+
const invalidError = () => new Error(
|
|
35
|
+
"Invalid `payerSecretKey`: expected a base64-encoded 64-byte Ed25519 keypair (secret key first)."
|
|
36
|
+
);
|
|
37
|
+
let keyPairBytes;
|
|
38
|
+
try {
|
|
39
|
+
keyPairBytes = Uint8Array.from(kit.getBase64Encoder().encode(payerSecretKey));
|
|
40
|
+
} catch {
|
|
41
|
+
throw invalidError();
|
|
42
|
+
}
|
|
43
|
+
if (keyPairBytes.length !== 64) {
|
|
44
|
+
throw invalidError();
|
|
45
|
+
}
|
|
46
|
+
const derivedKeyPair = naclModule__default.sign.keyPair.fromSeed(keyPairBytes.slice(0, 32));
|
|
47
|
+
const publicKey = keyPairBytes.slice(32);
|
|
48
|
+
if (!publicKey.every((value, index) => value === derivedKeyPair.publicKey[index])) {
|
|
49
|
+
throw invalidError();
|
|
50
|
+
}
|
|
51
|
+
const address2 = kit.getBase58Decoder().decode(publicKey);
|
|
52
|
+
return {
|
|
53
|
+
address: address2,
|
|
54
|
+
async signTransactions(transactions, config) {
|
|
55
|
+
config?.abortSignal?.throwIfAborted();
|
|
56
|
+
return transactions.map((transaction) => ({
|
|
57
|
+
[address2]: naclModule__default.sign.detached(
|
|
58
|
+
new Uint8Array(transaction.messageBytes),
|
|
59
|
+
keyPairBytes
|
|
60
|
+
)
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
18
65
|
|
|
19
66
|
exports.address = kit.address;
|
|
20
67
|
exports.createReactiveActionStore = kit.createReactiveActionStore;
|
package/dist/kit.d.cts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
import '@solana/kit-plugin-rpc';
|
|
2
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, ClientWithTransactionSending, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SingleTransactionPlan, SolanaRpcApi, SolanaRpcResponse, SuccessfulSingleTransactionPlanResult, TransactionMessage, TransactionPlan, TransactionPlanInput, TransactionPlanResult, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
3
|
+
export { b as SolanaClient, n as createSolanaClient } from './shared/core.C0cYheiB.cjs';
|
package/dist/kit.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
import '@solana/kit-plugin-rpc';
|
|
2
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, ClientWithTransactionSending, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SingleTransactionPlan, SolanaRpcApi, SolanaRpcResponse, SuccessfulSingleTransactionPlanResult, TransactionMessage, TransactionPlan, TransactionPlanInput, TransactionPlanResult, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
3
|
+
export { b as SolanaClient, n as createSolanaClient } from './shared/core.C0cYheiB.mjs';
|
package/dist/kit.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
import '@solana/kit-plugin-rpc';
|
|
2
|
+
export { Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, ClientWithTransactionSending, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SingleTransactionPlan, SolanaRpcApi, SolanaRpcResponse, SuccessfulSingleTransactionPlanResult, TransactionMessage, TransactionPlan, TransactionPlanInput, TransactionPlanResult, TransactionSigner, address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
3
|
+
export { b as SolanaClient, n as createSolanaClient } from './shared/core.C0cYheiB.js';
|
package/dist/kit.mjs
CHANGED
|
@@ -1,18 +1,61 @@
|
|
|
1
|
-
import { createClient } from '@solana/kit';
|
|
1
|
+
import { getBase64Encoder, getBase58Decoder, createClient, extendClient } from '@solana/kit';
|
|
2
2
|
export { address, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, getAbortablePromise, isAbortError, lamports } from '@solana/kit';
|
|
3
|
-
import {
|
|
3
|
+
import { solanaRpc, rpcAirdrop } from '@solana/kit-plugin-rpc';
|
|
4
|
+
import naclModule__default from 'tweetnacl';
|
|
4
5
|
import { DEFAULT_CLUSTER, getClusterEndpoint, getWebSocketEndpoint, getClusterWebSocketEndpoint } from './clusters.mjs';
|
|
5
6
|
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return
|
|
11
|
-
|
|
7
|
+
function buildSolanaClient(endpoint, wsEndpoint, payer) {
|
|
8
|
+
const client = createClient().use(
|
|
9
|
+
(current) => extendClient(current, payer ? { payer } : {})
|
|
10
|
+
);
|
|
11
|
+
return client.use(
|
|
12
|
+
solanaRpc({
|
|
12
13
|
rpcUrl: endpoint,
|
|
13
14
|
rpcSubscriptionsUrl: wsEndpoint
|
|
14
15
|
})
|
|
15
16
|
).use(rpcAirdrop());
|
|
16
17
|
}
|
|
18
|
+
function createSolanaClient(config = {}) {
|
|
19
|
+
const cluster = config.cluster ?? DEFAULT_CLUSTER;
|
|
20
|
+
const endpoint = config.endpoint ?? getClusterEndpoint(cluster);
|
|
21
|
+
const wsEndpoint = config.wsEndpoint ?? (config.endpoint ? getWebSocketEndpoint(endpoint) : getClusterWebSocketEndpoint(cluster));
|
|
22
|
+
const payer = config.payer ?? resolvePayerFromSecretKey(config.payerSecretKey);
|
|
23
|
+
return buildSolanaClient(endpoint, wsEndpoint, payer);
|
|
24
|
+
}
|
|
25
|
+
function resolvePayerFromSecretKey(payerSecretKey) {
|
|
26
|
+
if (!payerSecretKey) {
|
|
27
|
+
return void 0;
|
|
28
|
+
}
|
|
29
|
+
const invalidError = () => new Error(
|
|
30
|
+
"Invalid `payerSecretKey`: expected a base64-encoded 64-byte Ed25519 keypair (secret key first)."
|
|
31
|
+
);
|
|
32
|
+
let keyPairBytes;
|
|
33
|
+
try {
|
|
34
|
+
keyPairBytes = Uint8Array.from(getBase64Encoder().encode(payerSecretKey));
|
|
35
|
+
} catch {
|
|
36
|
+
throw invalidError();
|
|
37
|
+
}
|
|
38
|
+
if (keyPairBytes.length !== 64) {
|
|
39
|
+
throw invalidError();
|
|
40
|
+
}
|
|
41
|
+
const derivedKeyPair = naclModule__default.sign.keyPair.fromSeed(keyPairBytes.slice(0, 32));
|
|
42
|
+
const publicKey = keyPairBytes.slice(32);
|
|
43
|
+
if (!publicKey.every((value, index) => value === derivedKeyPair.publicKey[index])) {
|
|
44
|
+
throw invalidError();
|
|
45
|
+
}
|
|
46
|
+
const address2 = getBase58Decoder().decode(publicKey);
|
|
47
|
+
return {
|
|
48
|
+
address: address2,
|
|
49
|
+
async signTransactions(transactions, config) {
|
|
50
|
+
config?.abortSignal?.throwIfAborted();
|
|
51
|
+
return transactions.map((transaction) => ({
|
|
52
|
+
[address2]: naclModule__default.sign.detached(
|
|
53
|
+
new Uint8Array(transaction.messageBytes),
|
|
54
|
+
keyPairBytes
|
|
55
|
+
)
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
17
60
|
|
|
18
61
|
export { createSolanaClient };
|
package/dist/mobile-wallet.d.cts
CHANGED
package/dist/mobile-wallet.d.mts
CHANGED
package/dist/mobile-wallet.d.ts
CHANGED
package/dist/rpc.cjs
CHANGED
|
@@ -4,6 +4,7 @@ const clusters = require('./clusters.cjs');
|
|
|
4
4
|
const kit = require('./kit.cjs');
|
|
5
5
|
require('@solana/kit');
|
|
6
6
|
require('@solana/kit-plugin-rpc');
|
|
7
|
+
require('tweetnacl');
|
|
7
8
|
|
|
8
9
|
function createSolanaContext(config = {}) {
|
|
9
10
|
const cluster = config.cluster ?? clusters.DEFAULT_CLUSTER;
|
package/dist/rpc.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { d as SolanaConfig, e as SolanaContext } from './shared/core.
|
|
1
|
+
import { d as SolanaConfig, e as SolanaContext } from './shared/core.C0cYheiB.cjs';
|
|
2
|
+
import '@solana/kit-plugin-rpc';
|
|
2
3
|
import '@solana/kit';
|
|
3
4
|
|
|
4
5
|
declare function createSolanaContext(config?: SolanaConfig): SolanaContext;
|
package/dist/rpc.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { d as SolanaConfig, e as SolanaContext } from './shared/core.
|
|
1
|
+
import { d as SolanaConfig, e as SolanaContext } from './shared/core.C0cYheiB.mjs';
|
|
2
|
+
import '@solana/kit-plugin-rpc';
|
|
2
3
|
import '@solana/kit';
|
|
3
4
|
|
|
4
5
|
declare function createSolanaContext(config?: SolanaConfig): SolanaContext;
|
package/dist/rpc.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { d as SolanaConfig, e as SolanaContext } from './shared/core.
|
|
1
|
+
import { d as SolanaConfig, e as SolanaContext } from './shared/core.C0cYheiB.js';
|
|
2
|
+
import '@solana/kit-plugin-rpc';
|
|
2
3
|
import '@solana/kit';
|
|
3
4
|
|
|
4
5
|
declare function createSolanaContext(config?: SolanaConfig): SolanaContext;
|
package/dist/rpc.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { DEFAULT_CLUSTER, getClusterEndpoint, getWebSocketEndpoint, getClusterWe
|
|
|
2
2
|
import { createSolanaClient } from './kit.mjs';
|
|
3
3
|
import '@solana/kit';
|
|
4
4
|
import '@solana/kit-plugin-rpc';
|
|
5
|
+
import 'tweetnacl';
|
|
5
6
|
|
|
6
7
|
function createSolanaContext(config = {}) {
|
|
7
8
|
const cluster = config.cluster ?? DEFAULT_CLUSTER;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import * as _solana_kit_plugin_rpc from '@solana/kit-plugin-rpc';
|
|
1
2
|
import * as _solana_kit from '@solana/kit';
|
|
2
|
-
import { Commitment, Slot, Address, Signature } from '@solana/kit';
|
|
3
|
+
import { Commitment, Slot, TransactionSigner, Address, Signature } from '@solana/kit';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Solana cluster names. `mainnet` is Solana's official mainnet cluster name.
|
|
7
|
+
* The legacy `mainnet-beta` spelling is still accepted and redirects to the
|
|
8
|
+
* same mainnet endpoint.
|
|
9
|
+
*/
|
|
10
|
+
type SolanaCluster = "mainnet" | "mainnet-beta" | "testnet" | "devnet" | "localnet";
|
|
5
11
|
type SolanaChain = "solana:mainnet" | "solana:testnet" | "solana:devnet" | "solana:localnet";
|
|
6
12
|
interface SolanaConfig {
|
|
7
13
|
cluster?: SolanaCluster;
|
|
@@ -9,6 +15,20 @@ interface SolanaConfig {
|
|
|
9
15
|
wsEndpoint?: string;
|
|
10
16
|
commitment?: Commitment;
|
|
11
17
|
autoConnect?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Kit client signer used to pay fees and sign client-sent transactions
|
|
20
|
+
* (e.g. `useSendTransaction()`). Install one for demo/relayer flows; never
|
|
21
|
+
* ship a funded keypair to end-user browsers.
|
|
22
|
+
*/
|
|
23
|
+
payer?: TransactionSigner;
|
|
24
|
+
/**
|
|
25
|
+
* Serializable variant of `payer`: a 64-byte Ed25519 keypair encoded as
|
|
26
|
+
* base64 (secret key first). Resolved to a Kit `TransactionSigner` when the
|
|
27
|
+
* client is created. Direct Vue/core demos only; Nuxt does not forward this
|
|
28
|
+
* value through public runtime config. Dev/demos only; never ship a funded
|
|
29
|
+
* secret to production browsers.
|
|
30
|
+
*/
|
|
31
|
+
payerSecretKey?: string;
|
|
12
32
|
}
|
|
13
33
|
interface SolanaContext {
|
|
14
34
|
cluster: SolanaCluster;
|
|
@@ -116,19 +136,53 @@ interface TransactionConfirmation {
|
|
|
116
136
|
status: TransactionStatus;
|
|
117
137
|
}
|
|
118
138
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
* `connection` APIs.
|
|
125
|
-
*/
|
|
126
|
-
declare function createSolanaClient(config?: SolanaConfig): _solana_kit.Client<{
|
|
139
|
+
declare function buildSolanaClient(endpoint: string, wsEndpoint: string, payer: TransactionSigner | undefined): _solana_kit.Client<{
|
|
140
|
+
signTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
141
|
+
abortSignal?: AbortSignal;
|
|
142
|
+
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
143
|
+
payer: TransactionSigner;
|
|
127
144
|
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
145
|
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
129
|
-
|
|
146
|
+
getMinimumBalance: (space: number, config?: _solana_kit.GetMinimumBalanceConfig) => Promise<_solana_kit.Lamports>;
|
|
147
|
+
transactionPlanner: _solana_kit.TransactionPlanner;
|
|
148
|
+
planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
149
|
+
abortSignal?: AbortSignal;
|
|
150
|
+
}) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
|
|
151
|
+
planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
152
|
+
abortSignal?: AbortSignal;
|
|
153
|
+
}) => Promise<_solana_kit.TransactionPlan>;
|
|
154
|
+
signTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
155
|
+
kind: "single";
|
|
156
|
+
message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
|
|
157
|
+
planType: "transactionPlan";
|
|
158
|
+
}>, config?: {
|
|
159
|
+
abortSignal?: AbortSignal;
|
|
160
|
+
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
161
|
+
transactionPlanExecutor: _solana_kit.TransactionPlanExecutor<_solana_kit_plugin_rpc.RpcSendContext>;
|
|
162
|
+
sendTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
163
|
+
kind: "single";
|
|
164
|
+
message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
|
|
165
|
+
planType: "transactionPlan";
|
|
166
|
+
}>, config?: {
|
|
167
|
+
abortSignal?: AbortSignal;
|
|
168
|
+
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
169
|
+
sendTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
170
|
+
abortSignal?: AbortSignal;
|
|
171
|
+
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
172
|
+
airdrop: (address: Address, amount: _solana_kit.Lamports, abortSignal?: AbortSignal) => Promise<_solana_kit.Signature | undefined>;
|
|
130
173
|
}>;
|
|
131
|
-
type
|
|
174
|
+
type SolanaClientWithPayer = ReturnType<typeof buildSolanaClient>;
|
|
175
|
+
type SolanaClientWithOptionalPayer = Omit<SolanaClientWithPayer, "payer"> & {
|
|
176
|
+
payer?: TransactionSigner;
|
|
177
|
+
};
|
|
178
|
+
type SolanaConfigWithPayer = SolanaConfig & ({
|
|
179
|
+
payer: TransactionSigner;
|
|
180
|
+
} | {
|
|
181
|
+
payerSecretKey: string;
|
|
182
|
+
});
|
|
183
|
+
declare function createSolanaClient(config: SolanaConfigWithPayer): SolanaClientWithPayer;
|
|
184
|
+
declare function createSolanaClient(config?: SolanaConfig): SolanaClientWithOptionalPayer;
|
|
185
|
+
type SolanaClient = SolanaClientWithOptionalPayer;
|
|
132
186
|
|
|
133
187
|
export { createSolanaClient as n };
|
|
134
188
|
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 };
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import * as _solana_kit_plugin_rpc from '@solana/kit-plugin-rpc';
|
|
1
2
|
import * as _solana_kit from '@solana/kit';
|
|
2
|
-
import { Commitment, Slot, Address, Signature } from '@solana/kit';
|
|
3
|
+
import { Commitment, Slot, TransactionSigner, Address, Signature } from '@solana/kit';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Solana cluster names. `mainnet` is Solana's official mainnet cluster name.
|
|
7
|
+
* The legacy `mainnet-beta` spelling is still accepted and redirects to the
|
|
8
|
+
* same mainnet endpoint.
|
|
9
|
+
*/
|
|
10
|
+
type SolanaCluster = "mainnet" | "mainnet-beta" | "testnet" | "devnet" | "localnet";
|
|
5
11
|
type SolanaChain = "solana:mainnet" | "solana:testnet" | "solana:devnet" | "solana:localnet";
|
|
6
12
|
interface SolanaConfig {
|
|
7
13
|
cluster?: SolanaCluster;
|
|
@@ -9,6 +15,20 @@ interface SolanaConfig {
|
|
|
9
15
|
wsEndpoint?: string;
|
|
10
16
|
commitment?: Commitment;
|
|
11
17
|
autoConnect?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Kit client signer used to pay fees and sign client-sent transactions
|
|
20
|
+
* (e.g. `useSendTransaction()`). Install one for demo/relayer flows; never
|
|
21
|
+
* ship a funded keypair to end-user browsers.
|
|
22
|
+
*/
|
|
23
|
+
payer?: TransactionSigner;
|
|
24
|
+
/**
|
|
25
|
+
* Serializable variant of `payer`: a 64-byte Ed25519 keypair encoded as
|
|
26
|
+
* base64 (secret key first). Resolved to a Kit `TransactionSigner` when the
|
|
27
|
+
* client is created. Direct Vue/core demos only; Nuxt does not forward this
|
|
28
|
+
* value through public runtime config. Dev/demos only; never ship a funded
|
|
29
|
+
* secret to production browsers.
|
|
30
|
+
*/
|
|
31
|
+
payerSecretKey?: string;
|
|
12
32
|
}
|
|
13
33
|
interface SolanaContext {
|
|
14
34
|
cluster: SolanaCluster;
|
|
@@ -116,19 +136,53 @@ interface TransactionConfirmation {
|
|
|
116
136
|
status: TransactionStatus;
|
|
117
137
|
}
|
|
118
138
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
* `connection` APIs.
|
|
125
|
-
*/
|
|
126
|
-
declare function createSolanaClient(config?: SolanaConfig): _solana_kit.Client<{
|
|
139
|
+
declare function buildSolanaClient(endpoint: string, wsEndpoint: string, payer: TransactionSigner | undefined): _solana_kit.Client<{
|
|
140
|
+
signTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
141
|
+
abortSignal?: AbortSignal;
|
|
142
|
+
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
143
|
+
payer: TransactionSigner;
|
|
127
144
|
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
145
|
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
129
|
-
|
|
146
|
+
getMinimumBalance: (space: number, config?: _solana_kit.GetMinimumBalanceConfig) => Promise<_solana_kit.Lamports>;
|
|
147
|
+
transactionPlanner: _solana_kit.TransactionPlanner;
|
|
148
|
+
planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
149
|
+
abortSignal?: AbortSignal;
|
|
150
|
+
}) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
|
|
151
|
+
planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
152
|
+
abortSignal?: AbortSignal;
|
|
153
|
+
}) => Promise<_solana_kit.TransactionPlan>;
|
|
154
|
+
signTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
155
|
+
kind: "single";
|
|
156
|
+
message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
|
|
157
|
+
planType: "transactionPlan";
|
|
158
|
+
}>, config?: {
|
|
159
|
+
abortSignal?: AbortSignal;
|
|
160
|
+
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
161
|
+
transactionPlanExecutor: _solana_kit.TransactionPlanExecutor<_solana_kit_plugin_rpc.RpcSendContext>;
|
|
162
|
+
sendTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
163
|
+
kind: "single";
|
|
164
|
+
message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
|
|
165
|
+
planType: "transactionPlan";
|
|
166
|
+
}>, config?: {
|
|
167
|
+
abortSignal?: AbortSignal;
|
|
168
|
+
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
169
|
+
sendTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
170
|
+
abortSignal?: AbortSignal;
|
|
171
|
+
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
172
|
+
airdrop: (address: Address, amount: _solana_kit.Lamports, abortSignal?: AbortSignal) => Promise<_solana_kit.Signature | undefined>;
|
|
130
173
|
}>;
|
|
131
|
-
type
|
|
174
|
+
type SolanaClientWithPayer = ReturnType<typeof buildSolanaClient>;
|
|
175
|
+
type SolanaClientWithOptionalPayer = Omit<SolanaClientWithPayer, "payer"> & {
|
|
176
|
+
payer?: TransactionSigner;
|
|
177
|
+
};
|
|
178
|
+
type SolanaConfigWithPayer = SolanaConfig & ({
|
|
179
|
+
payer: TransactionSigner;
|
|
180
|
+
} | {
|
|
181
|
+
payerSecretKey: string;
|
|
182
|
+
});
|
|
183
|
+
declare function createSolanaClient(config: SolanaConfigWithPayer): SolanaClientWithPayer;
|
|
184
|
+
declare function createSolanaClient(config?: SolanaConfig): SolanaClientWithOptionalPayer;
|
|
185
|
+
type SolanaClient = SolanaClientWithOptionalPayer;
|
|
132
186
|
|
|
133
187
|
export { createSolanaClient as n };
|
|
134
188
|
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 };
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import * as _solana_kit_plugin_rpc from '@solana/kit-plugin-rpc';
|
|
1
2
|
import * as _solana_kit from '@solana/kit';
|
|
2
|
-
import { Commitment, Slot, Address, Signature } from '@solana/kit';
|
|
3
|
+
import { Commitment, Slot, TransactionSigner, Address, Signature } from '@solana/kit';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Solana cluster names. `mainnet` is Solana's official mainnet cluster name.
|
|
7
|
+
* The legacy `mainnet-beta` spelling is still accepted and redirects to the
|
|
8
|
+
* same mainnet endpoint.
|
|
9
|
+
*/
|
|
10
|
+
type SolanaCluster = "mainnet" | "mainnet-beta" | "testnet" | "devnet" | "localnet";
|
|
5
11
|
type SolanaChain = "solana:mainnet" | "solana:testnet" | "solana:devnet" | "solana:localnet";
|
|
6
12
|
interface SolanaConfig {
|
|
7
13
|
cluster?: SolanaCluster;
|
|
@@ -9,6 +15,20 @@ interface SolanaConfig {
|
|
|
9
15
|
wsEndpoint?: string;
|
|
10
16
|
commitment?: Commitment;
|
|
11
17
|
autoConnect?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Kit client signer used to pay fees and sign client-sent transactions
|
|
20
|
+
* (e.g. `useSendTransaction()`). Install one for demo/relayer flows; never
|
|
21
|
+
* ship a funded keypair to end-user browsers.
|
|
22
|
+
*/
|
|
23
|
+
payer?: TransactionSigner;
|
|
24
|
+
/**
|
|
25
|
+
* Serializable variant of `payer`: a 64-byte Ed25519 keypair encoded as
|
|
26
|
+
* base64 (secret key first). Resolved to a Kit `TransactionSigner` when the
|
|
27
|
+
* client is created. Direct Vue/core demos only; Nuxt does not forward this
|
|
28
|
+
* value through public runtime config. Dev/demos only; never ship a funded
|
|
29
|
+
* secret to production browsers.
|
|
30
|
+
*/
|
|
31
|
+
payerSecretKey?: string;
|
|
12
32
|
}
|
|
13
33
|
interface SolanaContext {
|
|
14
34
|
cluster: SolanaCluster;
|
|
@@ -116,19 +136,53 @@ interface TransactionConfirmation {
|
|
|
116
136
|
status: TransactionStatus;
|
|
117
137
|
}
|
|
118
138
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
* `connection` APIs.
|
|
125
|
-
*/
|
|
126
|
-
declare function createSolanaClient(config?: SolanaConfig): _solana_kit.Client<{
|
|
139
|
+
declare function buildSolanaClient(endpoint: string, wsEndpoint: string, payer: TransactionSigner | undefined): _solana_kit.Client<{
|
|
140
|
+
signTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
141
|
+
abortSignal?: AbortSignal;
|
|
142
|
+
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
143
|
+
payer: TransactionSigner;
|
|
127
144
|
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
145
|
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
129
|
-
|
|
146
|
+
getMinimumBalance: (space: number, config?: _solana_kit.GetMinimumBalanceConfig) => Promise<_solana_kit.Lamports>;
|
|
147
|
+
transactionPlanner: _solana_kit.TransactionPlanner;
|
|
148
|
+
planTransaction: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
149
|
+
abortSignal?: AbortSignal;
|
|
150
|
+
}) => Promise<_solana_kit.SingleTransactionPlan["message"]>;
|
|
151
|
+
planTransactions: (input: _solana_kit.InstructionPlanInput, config?: {
|
|
152
|
+
abortSignal?: AbortSignal;
|
|
153
|
+
}) => Promise<_solana_kit.TransactionPlan>;
|
|
154
|
+
signTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
155
|
+
kind: "single";
|
|
156
|
+
message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
|
|
157
|
+
planType: "transactionPlan";
|
|
158
|
+
}>, config?: {
|
|
159
|
+
abortSignal?: AbortSignal;
|
|
160
|
+
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSignContext>>;
|
|
161
|
+
transactionPlanExecutor: _solana_kit.TransactionPlanExecutor<_solana_kit_plugin_rpc.RpcSendContext>;
|
|
162
|
+
sendTransaction: (input: _solana_kit.InstructionPlanInput | (_solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>) | Readonly<{
|
|
163
|
+
kind: "single";
|
|
164
|
+
message: _solana_kit.TransactionMessage & _solana_kit.TransactionMessageWithFeePayer<string>;
|
|
165
|
+
planType: "transactionPlan";
|
|
166
|
+
}>, config?: {
|
|
167
|
+
abortSignal?: AbortSignal;
|
|
168
|
+
}) => Promise<_solana_kit.SuccessfulSingleTransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
169
|
+
sendTransactions: (input: _solana_kit.InstructionPlanInput | _solana_kit.TransactionPlanInput, config?: {
|
|
170
|
+
abortSignal?: AbortSignal;
|
|
171
|
+
}) => Promise<_solana_kit.TransactionPlanResult<_solana_kit_plugin_rpc.RpcSendContext>>;
|
|
172
|
+
airdrop: (address: Address, amount: _solana_kit.Lamports, abortSignal?: AbortSignal) => Promise<_solana_kit.Signature | undefined>;
|
|
130
173
|
}>;
|
|
131
|
-
type
|
|
174
|
+
type SolanaClientWithPayer = ReturnType<typeof buildSolanaClient>;
|
|
175
|
+
type SolanaClientWithOptionalPayer = Omit<SolanaClientWithPayer, "payer"> & {
|
|
176
|
+
payer?: TransactionSigner;
|
|
177
|
+
};
|
|
178
|
+
type SolanaConfigWithPayer = SolanaConfig & ({
|
|
179
|
+
payer: TransactionSigner;
|
|
180
|
+
} | {
|
|
181
|
+
payerSecretKey: string;
|
|
182
|
+
});
|
|
183
|
+
declare function createSolanaClient(config: SolanaConfigWithPayer): SolanaClientWithPayer;
|
|
184
|
+
declare function createSolanaClient(config?: SolanaConfig): SolanaClientWithOptionalPayer;
|
|
185
|
+
type SolanaClient = SolanaClientWithOptionalPayer;
|
|
132
186
|
|
|
133
187
|
export { createSolanaClient as n };
|
|
134
188
|
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 };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Address, Commitment } from '@solana/kit';
|
|
2
|
-
import { b as SolanaClient } from './shared/core.
|
|
2
|
+
import { b as SolanaClient } from './shared/core.C0cYheiB.cjs';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
|
|
4
5
|
interface TokenAccountInfo {
|
|
5
6
|
address: Address;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Address, Commitment } from '@solana/kit';
|
|
2
|
-
import { b as SolanaClient } from './shared/core.
|
|
2
|
+
import { b as SolanaClient } from './shared/core.C0cYheiB.mjs';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
|
|
4
5
|
interface TokenAccountInfo {
|
|
5
6
|
address: Address;
|
package/dist/token-accounts.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Address, Commitment } from '@solana/kit';
|
|
2
|
-
import { b as SolanaClient } from './shared/core.
|
|
2
|
+
import { b as SolanaClient } from './shared/core.C0cYheiB.js';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
|
|
4
5
|
interface TokenAccountInfo {
|
|
5
6
|
address: Address;
|
package/dist/transaction.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Signature } from '@solana/kit';
|
|
2
|
-
import { b as SolanaClient, C as ConfirmTransactionOptions, T as TransactionConfirmation, k as SolanaWallet, j as SolanaTransaction, S as SendTransactionOptions } from './shared/core.
|
|
2
|
+
import { b as SolanaClient, C as ConfirmTransactionOptions, T as TransactionConfirmation, k as SolanaWallet, j as SolanaTransaction, S as SendTransactionOptions } from './shared/core.C0cYheiB.cjs';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Sign and send a transaction through a connected wallet.
|
package/dist/transaction.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Signature } from '@solana/kit';
|
|
2
|
-
import { b as SolanaClient, C as ConfirmTransactionOptions, T as TransactionConfirmation, k as SolanaWallet, j as SolanaTransaction, S as SendTransactionOptions } from './shared/core.
|
|
2
|
+
import { b as SolanaClient, C as ConfirmTransactionOptions, T as TransactionConfirmation, k as SolanaWallet, j as SolanaTransaction, S as SendTransactionOptions } from './shared/core.C0cYheiB.mjs';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Sign and send a transaction through a connected wallet.
|
package/dist/transaction.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Signature } from '@solana/kit';
|
|
2
|
-
import { b as SolanaClient, C as ConfirmTransactionOptions, T as TransactionConfirmation, k as SolanaWallet, j as SolanaTransaction, S as SendTransactionOptions } from './shared/core.
|
|
2
|
+
import { b as SolanaClient, C as ConfirmTransactionOptions, T as TransactionConfirmation, k as SolanaWallet, j as SolanaTransaction, S as SendTransactionOptions } from './shared/core.C0cYheiB.js';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Sign and send a transaction through a connected wallet.
|
package/dist/types.d.cts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import '@solana/kit';
|
|
2
|
-
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, 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 } from './shared/core.
|
|
2
|
+
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, 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 } from './shared/core.C0cYheiB.cjs';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import '@solana/kit';
|
|
2
|
-
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, 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 } from './shared/core.
|
|
2
|
+
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, 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 } from './shared/core.C0cYheiB.mjs';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import '@solana/kit';
|
|
2
|
-
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, 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 } from './shared/core.
|
|
2
|
+
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, 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 } from './shared/core.C0cYheiB.js';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { WalletAccount, Wallet } from '@wallet-standard/base';
|
|
2
|
-
import { a as SolanaChain, l as SolanaWalletInfo, k as SolanaWallet, c as SolanaCluster } from './shared/core.
|
|
2
|
+
import { a as SolanaChain, l as SolanaWalletInfo, k as SolanaWallet, c as SolanaCluster } from './shared/core.C0cYheiB.cjs';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
import '@solana/kit';
|
|
4
5
|
|
|
5
6
|
interface AdaptSolanaWalletOptions {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { WalletAccount, Wallet } from '@wallet-standard/base';
|
|
2
|
-
import { a as SolanaChain, l as SolanaWalletInfo, k as SolanaWallet, c as SolanaCluster } from './shared/core.
|
|
2
|
+
import { a as SolanaChain, l as SolanaWalletInfo, k as SolanaWallet, c as SolanaCluster } from './shared/core.C0cYheiB.mjs';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
import '@solana/kit';
|
|
4
5
|
|
|
5
6
|
interface AdaptSolanaWalletOptions {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { WalletAccount, Wallet } from '@wallet-standard/base';
|
|
2
|
-
import { a as SolanaChain, l as SolanaWalletInfo, k as SolanaWallet, c as SolanaCluster } from './shared/core.
|
|
2
|
+
import { a as SolanaChain, l as SolanaWalletInfo, k as SolanaWallet, c as SolanaCluster } from './shared/core.C0cYheiB.js';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
import '@solana/kit';
|
|
4
5
|
|
|
5
6
|
interface AdaptSolanaWalletOptions {
|
package/dist/wallet.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { k as SolanaWallet } from './shared/core.
|
|
1
|
+
import { k as SolanaWallet } from './shared/core.C0cYheiB.cjs';
|
|
2
2
|
import { SolanaError } from './errors.cjs';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
import '@solana/kit';
|
|
4
5
|
|
|
5
6
|
type SolanaWalletErrorCode = "NO_WALLET_SELECTED" | "WALLET_NOT_CONNECTED" | "WALLET_FEATURE_UNSUPPORTED";
|
package/dist/wallet.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { k as SolanaWallet } from './shared/core.
|
|
1
|
+
import { k as SolanaWallet } from './shared/core.C0cYheiB.mjs';
|
|
2
2
|
import { SolanaError } from './errors.mjs';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
import '@solana/kit';
|
|
4
5
|
|
|
5
6
|
type SolanaWalletErrorCode = "NO_WALLET_SELECTED" | "WALLET_NOT_CONNECTED" | "WALLET_FEATURE_UNSUPPORTED";
|
package/dist/wallet.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { k as SolanaWallet } from './shared/core.
|
|
1
|
+
import { k as SolanaWallet } from './shared/core.C0cYheiB.js';
|
|
2
2
|
import { SolanaError } from './errors.js';
|
|
3
|
+
import '@solana/kit-plugin-rpc';
|
|
3
4
|
import '@solana/kit';
|
|
4
5
|
|
|
5
6
|
type SolanaWalletErrorCode = "NO_WALLET_SELECTED" | "WALLET_NOT_CONNECTED" | "WALLET_FEATURE_UNSUPPORTED";
|