@solana/plugin-interfaces 0.0.0 → 6.1.0-canary-20260216194225

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/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2025 Anza Technology, Inc
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,173 @@
1
+ [![npm][npm-image]][npm-url]
2
+ [![npm-downloads][npm-downloads-image]][npm-url]
3
+ <br />
4
+ [![code-style-prettier][code-style-prettier-image]][code-style-prettier-url]
5
+
6
+ [code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
7
+ [code-style-prettier-url]: https://github.com/prettier/prettier
8
+ [npm-downloads-image]: https://img.shields.io/npm/dm/@solana/plugin-interfaces?style=flat
9
+ [npm-image]: https://img.shields.io/npm/v/@solana/plugin-interfaces?style=flat
10
+ [npm-url]: https://www.npmjs.com/package/@solana/plugin-interfaces
11
+
12
+ # @solana/plugin-interfaces
13
+
14
+ This package defines common TypeScript interfaces for features that Kit plugins can provide or require. It can be used standalone, but it is also exported as part of Kit [`@solana/kit`](https://github.com/anza-xyz/kit/tree/main/packages/kit).
15
+
16
+ ## Overview
17
+
18
+ When building Solana applications, different environments require different capabilities. A browser wallet might support signing but not RPC calls. A testing environment might support airdrops. A full client might support everything.
19
+
20
+ These interfaces serve two purposes:
21
+
22
+ - **Plugins can provide capabilities**: A plugin can implement these interfaces to add features to a client (e.g., a plugin that adds airdrop support implements `ClientWithAirdrop`).
23
+ - **Plugins can require capabilities**: A plugin can declare which capabilities it needs from the client to function (e.g., a token plugin might require `ClientWithRpc` to fetch account data).
24
+
25
+ This enables a composable plugin architecture where plugins can build on top of each other's capabilities.
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ npm install @solana/plugin-interfaces
31
+ ```
32
+
33
+ ## Interfaces
34
+
35
+ ### `ClientWithPayer`
36
+
37
+ Represents a client that provides a default transaction payer.
38
+
39
+ ```ts
40
+ import { ClientWithPayer } from '@solana/plugin-interfaces';
41
+
42
+ function memoPlugin() {
43
+ return <T extends ClientWithPayer>(client: T) => ({
44
+ ...client,
45
+ sendMemo: (message: string) => {
46
+ // Use client.payer as the fee payer for the memo transaction
47
+ const feePayer = client.payer;
48
+ // ...
49
+ },
50
+ });
51
+ }
52
+ ```
53
+
54
+ ### `ClientWithAirdrop`
55
+
56
+ Represents a client that can request SOL airdrops (typically on devnet/testnet). The airdrop succeeds when the promise resolves. Some implementations (e.g., LiteSVM) update balances directly without a transaction, so no signature is returned in those cases.
57
+
58
+ ```ts
59
+ import { ClientWithAirdrop, ClientWithPayer } from '@solana/plugin-interfaces';
60
+
61
+ function faucetPlugin() {
62
+ return <T extends ClientWithAirdrop & ClientWithPayer>(client: T) => ({
63
+ ...client,
64
+ fundMyself: async (amount: Lamports) => {
65
+ await client.airdrop(client.payer.address, amount);
66
+ },
67
+ });
68
+ }
69
+ ```
70
+
71
+ ### `ClientWithRpc<TRpcMethods>`
72
+
73
+ Represents a client with access to a Solana RPC endpoint.
74
+
75
+ ```ts
76
+ import { ClientWithRpc } from '@solana/plugin-interfaces';
77
+ import { GetBalanceApi } from '@solana/rpc-api';
78
+
79
+ function balancePlugin() {
80
+ return <T extends ClientWithRpc<GetBalanceApi>>(client: T) => ({
81
+ ...client,
82
+ getBalance: async (address: Address): Promise<Lamports> => {
83
+ const { value } = await client.rpc.getBalance(address).send();
84
+ return value;
85
+ },
86
+ });
87
+ }
88
+ ```
89
+
90
+ ### `ClientWithRpcSubscriptions<TRpcSubscriptionsMethods>`
91
+
92
+ Represents a client that provides access to Solana RPC subscriptions for real-time notifications such as account changes, slot updates, and transaction confirmations.
93
+
94
+ ```ts
95
+ import { ClientWithRpcSubscriptions } from '@solana/plugin-interfaces';
96
+ import { AccountNotificationsApi } from '@solana/rpc-subscriptions-api';
97
+
98
+ function accountWatcherPlugin() {
99
+ return <T extends ClientWithRpcSubscriptions<AccountNotificationsApi>>(client: T) => ({
100
+ ...client,
101
+ onAccountChange: async (address: Address, callback: (lamports: Lamports) => void) => {
102
+ const subscription = await client.rpcSubscriptions.accountNotifications(address).subscribe();
103
+ for await (const notification of subscription) {
104
+ callback(notification.value.lamports);
105
+ }
106
+ },
107
+ });
108
+ }
109
+ ```
110
+
111
+ ### `ClientWithTransactionPlanning`
112
+
113
+ Represents a client that can convert instructions or instruction plans into transaction plans.
114
+
115
+ ```ts
116
+ import { flattenTransactionPlan } from '@solana/instruction-plans';
117
+ import { ClientWithTransactionPlanning } from '@solana/plugin-interfaces';
118
+
119
+ function transactionCounterPlugin() {
120
+ return <T extends ClientWithTransactionPlanning>(client: T) => ({
121
+ ...client,
122
+ countTransactions: async (instructions: IInstruction[]) => {
123
+ const plan = await client.planTransactions(instructions);
124
+ return flattenTransactionPlan(plan).length;
125
+ },
126
+ });
127
+ }
128
+ ```
129
+
130
+ ### `ClientWithTransactionSending`
131
+
132
+ Represents a client that can send transactions to the Solana network. It supports flexible input formats including instructions, instruction plans, transaction messages, or transaction plans.
133
+
134
+ ```ts
135
+ import { ClientWithPayer, ClientWithTransactionSending } from '@solana/plugin-interfaces';
136
+
137
+ function transferPlugin() {
138
+ return <T extends ClientWithPayer & ClientWithTransactionSending>(client: T) => ({
139
+ ...client,
140
+ transfer: async (recipient: Address, amount: Lamports) => {
141
+ const instruction = getTransferSolInstruction({
142
+ source: client.payer,
143
+ destination: recipient,
144
+ amount,
145
+ });
146
+ const result = await client.sendTransaction(instruction);
147
+ return result.context.signature;
148
+ },
149
+ });
150
+ }
151
+ ```
152
+
153
+ ## Combining Interfaces
154
+
155
+ Use TypeScript intersection types to require multiple capabilities from the client:
156
+
157
+ ```ts
158
+ import { ClientWithPayer, ClientWithRpc, ClientWithTransactionSending } from '@solana/plugin-interfaces';
159
+ import { GetAccountInfoApi } from '@solana/rpc-api';
160
+
161
+ function tokenTransferPlugin() {
162
+ return <T extends ClientWithPayer & ClientWithRpc<GetAccountInfoApi> & ClientWithTransactionSending>(
163
+ client: T,
164
+ ) => ({
165
+ ...client,
166
+ transferToken: async (mint: Address, recipient: Address, amount: bigint) => {
167
+ // Use client.rpc to fetch token accounts
168
+ // Use client.payer as the token owner
169
+ // Use client.sendTransaction to execute the transfer
170
+ },
171
+ });
172
+ }
173
+ ```
@@ -0,0 +1,34 @@
1
+ import { Address } from '@solana/addresses';
2
+ import { Signature } from '@solana/keys';
3
+ import { Lamports } from '@solana/rpc-types';
4
+ /**
5
+ * Represents a client that can request airdrops of SOL to a specified address.
6
+ *
7
+ * The airdrop capability is typically available on test networks (devnet, testnet)
8
+ * and local validators. It allows funding accounts with SOL for testing purposes.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * async function fundAccount(client: ClientWithAirdrop, address: Address) {
13
+ * const signature = await client.airdrop(address, lamports(1_000_000_000n));
14
+ * console.log(`Airdrop confirmed: ${signature ?? '[no signature]'}`);
15
+ * }
16
+ * ```
17
+ */
18
+ export type ClientWithAirdrop = {
19
+ /**
20
+ * Requests an airdrop of SOL to the specified address.
21
+ *
22
+ * The returned promise resolves when the airdrop succeeds and rejects on failure.
23
+ * Some implementations (e.g., LiteSVM) update account balances directly without
24
+ * sending a transaction, in which case no signature is returned.
25
+ *
26
+ * @param address - The address to receive the airdrop.
27
+ * @param amount - The amount of lamports to airdrop.
28
+ * @param abortSignal - An optional signal to abort the airdrop request.
29
+ * @returns A promise resolving to the transaction signature if the airdrop was
30
+ * performed via a transaction, or `undefined` if no transaction was used.
31
+ */
32
+ airdrop: (address: Address, amount: Lamports, abortSignal?: AbortSignal) => Promise<Signature | undefined>;
33
+ };
34
+ //# sourceMappingURL=airdrop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"airdrop.d.ts","sourceRoot":"","sources":["../../src/airdrop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B;;;;;;;;;;;;OAYG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;CAC9G,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This package defines common TypeScript interfaces for features that Kit plugins
3
+ * can provide or require. It can be used standalone, but it is also exported as part
4
+ * of Kit [`@solana/kit`](https://github.com/anza-xyz/kit/tree/main/packages/kit).
5
+ *
6
+ * @packageDocumentation
7
+ */
8
+ export * from './airdrop';
9
+ export * from './instruction-plans';
10
+ export * from './payer';
11
+ export * from './rpc';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
@@ -0,0 +1,104 @@
1
+ import type { InstructionPlanInput, SingleTransactionPlan, SuccessfulSingleTransactionPlanResult, TransactionPlan, TransactionPlanInput, TransactionPlanResult } from '@solana/instruction-plans';
2
+ type Config = {
3
+ abortSignal?: AbortSignal;
4
+ };
5
+ /**
6
+ * Represents a client that can plan transactions from instruction inputs.
7
+ *
8
+ * Transaction planning converts high-level instruction plans into concrete
9
+ * transaction messages, handling concerns like blockhash fetching, transaction
10
+ * splitting for size limits, and instruction ordering.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * async function prepareTransfer(client: ClientWithTransactionPlanning) {
15
+ * const instructions = [createTransferInstruction(...)];
16
+ *
17
+ * // Plan a single transaction
18
+ * const message = await client.planTransaction(instructions);
19
+ *
20
+ * // Or plan potentially multiple transactions if needed
21
+ * const plan = await client.planTransactions(instructions);
22
+ * }
23
+ * ```
24
+ */
25
+ export type ClientWithTransactionPlanning = {
26
+ /**
27
+ * Plans a single transaction from the given instruction input.
28
+ *
29
+ * Use this when you expect all instructions to fit in a single transaction.
30
+ *
31
+ * @param input - The instruction plan input (instructions or instruction plans).
32
+ * @param config - Optional configuration including an abort signal.
33
+ * @returns A promise resolving to the planned transaction message.
34
+ *
35
+ * @see {@link InstructionPlanInput}
36
+ */
37
+ planTransaction: (input: InstructionPlanInput, config?: Config) => Promise<SingleTransactionPlan['message']>;
38
+ /**
39
+ * Plans one or more transactions from the given instruction input.
40
+ *
41
+ * Use this when instructions might need to be split across multiple
42
+ * transactions due to size limits.
43
+ *
44
+ * @param input - The instruction plan input (instructions or instruction plans).
45
+ * @param config - Optional configuration including an abort signal.
46
+ * @returns A promise resolving to the full transaction plan.
47
+ *
48
+ * @see {@link InstructionPlanInput}
49
+ */
50
+ planTransactions: (input: InstructionPlanInput, config?: Config) => Promise<TransactionPlan>;
51
+ };
52
+ /**
53
+ * Represents a client that can send transactions to the Solana network.
54
+ *
55
+ * Transaction sending handles signing, submission, and confirmation of
56
+ * transactions. It supports flexible input formats including instructions,
57
+ * instruction plans, transaction messages or transaction plans.
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * async function executeTransfer(client: ClientWithTransactionSending) {
62
+ * const instructions = [createTransferInstruction(...)];
63
+ *
64
+ * // Send a single transaction
65
+ * const result = await client.sendTransaction(instructions);
66
+ * console.log(`Transaction confirmed: ${result.context.signature}`);
67
+ *
68
+ * // Or send potentially multiple transactions
69
+ * const results = await client.sendTransactions(instructions);
70
+ * }
71
+ * ```
72
+ */
73
+ export type ClientWithTransactionSending = {
74
+ /**
75
+ * Sends a single transaction to the network.
76
+ *
77
+ * Accepts flexible input: instructions, instruction plans, a single
78
+ * transaction message or a single transaction plan.
79
+ *
80
+ * @param input - Instructions, a transaction plan, or a transaction message.
81
+ * @param config - Optional configuration including an abort signal.
82
+ * @returns A promise resolving to the successful transaction result.
83
+ *
84
+ * @see {@link InstructionPlanInput}
85
+ * @see {@link SingleTransactionPlan}
86
+ */
87
+ sendTransaction: (input: InstructionPlanInput | SingleTransactionPlan | SingleTransactionPlan['message'], config?: Config) => Promise<SuccessfulSingleTransactionPlanResult>;
88
+ /**
89
+ * Sends one or more transactions to the network.
90
+ *
91
+ * Accepts flexible input: instructions, instruction plans, transaction messages
92
+ * or transaction plans.
93
+ *
94
+ * @param input - Any instruction or a transaction plan input.
95
+ * @param config - Optional configuration including an abort signal.
96
+ * @returns A promise resolving to the results for all transactions.
97
+ *
98
+ * @see {@link InstructionPlanInput}
99
+ * @see {@link TransactionPlanInput}
100
+ */
101
+ sendTransactions: (input: InstructionPlanInput | TransactionPlanInput, config?: Config) => Promise<TransactionPlanResult>;
102
+ };
103
+ export {};
104
+ //# sourceMappingURL=instruction-plans.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instruction-plans.d.ts","sourceRoot":"","sources":["../../src/instruction-plans.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,oBAAoB,EACpB,qBAAqB,EACrB,qCAAqC,EACrC,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,MAAM,GAAG;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,6BAA6B,GAAG;IACxC;;;;;;;;;;OAUG;IACH,eAAe,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAC;IAE7G;;;;;;;;;;;OAWG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;CAChG,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACvC;;;;;;;;;;;;OAYG;IACH,eAAe,EAAE,CACb,KAAK,EAAE,oBAAoB,GAAG,qBAAqB,GAAG,qBAAqB,CAAC,SAAS,CAAC,EACtF,MAAM,CAAC,EAAE,MAAM,KACd,OAAO,CAAC,qCAAqC,CAAC,CAAC;IAEpD;;;;;;;;;;;;OAYG;IACH,gBAAgB,EAAE,CACd,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,EAClD,MAAM,CAAC,EAAE,MAAM,KACd,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACvC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { TransactionSigner } from '@solana/signers';
2
+ /**
3
+ * Represents a client that provides a default transaction payer.
4
+ *
5
+ * The payer is a {@link TransactionSigner} used to sign and pay for transactions.
6
+ * Clients implementing this interface can automatically fund transactions
7
+ * without requiring callers to specify a fee payer explicitly.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * function createTransfer(client: ClientWithPayer, recipient: Address, amount: Lamports) {
12
+ * const feePayer = client.payer;
13
+ * // Use feePayer.address as the transaction fee payer
14
+ * }
15
+ * ```
16
+ */
17
+ export type ClientWithPayer = {
18
+ payer: TransactionSigner;
19
+ };
20
+ //# sourceMappingURL=payer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payer.d.ts","sourceRoot":"","sources":["../../src/payer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,eAAe,GAAG;IAAE,KAAK,EAAE,iBAAiB,CAAA;CAAE,CAAC"}
@@ -0,0 +1,53 @@
1
+ import type { Rpc } from '@solana/rpc-spec';
2
+ import type { RpcSubscriptions } from '@solana/rpc-subscriptions-spec';
3
+ /**
4
+ * Represents a client that provides access to a Solana RPC endpoint.
5
+ *
6
+ * The RPC interface allows making JSON-RPC calls to a Solana validator,
7
+ * such as fetching account data, sending transactions, and querying blockchain state.
8
+ *
9
+ * @typeParam TRpcMethods - The RPC methods available on this client. Use specific
10
+ * method types from `@solana/rpc-api` for the Solana JSON-RPC API.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { SolanaRpcApi } from '@solana/rpc-api';
15
+ *
16
+ * async function getBalance(client: ClientWithRpc<SolanaRpcApi>, address: Address) {
17
+ * const { value: balance } = await client.rpc.getBalance(address).send();
18
+ * return balance;
19
+ * }
20
+ * ```
21
+ */
22
+ export type ClientWithRpc<TRpcMethods> = {
23
+ rpc: Rpc<TRpcMethods>;
24
+ };
25
+ /**
26
+ * Represents a client that provides access to Solana RPC subscriptions.
27
+ *
28
+ * RPC subscriptions enable real-time notifications from the Solana validator,
29
+ * such as account changes, slot updates, and transaction confirmations.
30
+ *
31
+ * @typeParam TRpcSubscriptionsMethods - The subscription methods available on this client.
32
+ * Use specific method types from `@solana/rpc-subscriptions-api` for the Solana
33
+ * subscription API.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * import { SolanaRpcSubscriptionsApi } from '@solana/rpc-subscriptions-api';
38
+ *
39
+ * async function subscribeToAccount(
40
+ * client: ClientWithRpcSubscriptions<SolanaRpcSubscriptionsApi>,
41
+ * address: Address,
42
+ * ) {
43
+ * const subscription = await client.rpcSubscriptions.accountNotifications(address).subscribe();
44
+ * for await (const notification of subscription) {
45
+ * console.log('Account changed:', notification);
46
+ * }
47
+ * }
48
+ * ```
49
+ */
50
+ export type ClientWithRpcSubscriptions<TRpcSubscriptionsMethods> = {
51
+ rpcSubscriptions: RpcSubscriptions<TRpcSubscriptionsMethods>;
52
+ };
53
+ //# sourceMappingURL=rpc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,aAAa,CAAC,WAAW,IAAI;IAAE,GAAG,EAAE,GAAG,CAAC,WAAW,CAAC,CAAA;CAAE,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,0BAA0B,CAAC,wBAAwB,IAAI;IAC/D,gBAAgB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;CAChE,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,60 @@
1
1
  {
2
2
  "name": "@solana/plugin-interfaces",
3
- "version": "0.0.0",
4
- "description": "",
5
- "license": "ISC",
6
- "author": "",
3
+ "version": "6.1.0-canary-20260216194225",
4
+ "description": "TypeScript interfaces for building pluggable Solana clients",
5
+ "homepage": "https://www.solanakit.com/api#solanaplugin-interfaces",
6
+ "types": "./dist/types/index.d.ts",
7
7
  "type": "commonjs",
8
- "main": "index.js",
8
+ "files": [
9
+ "./dist/"
10
+ ],
11
+ "sideEffects": false,
12
+ "keywords": [
13
+ "blockchain",
14
+ "solana",
15
+ "web3"
16
+ ],
17
+ "author": "Solana Labs Maintainers <maintainers@solanalabs.com>",
18
+ "license": "MIT",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/anza-xyz/kit"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/anza-xyz/kit/issues"
25
+ },
26
+ "browserslist": [
27
+ "supports bigint and not dead",
28
+ "maintained node versions"
29
+ ],
30
+ "dependencies": {
31
+ "@solana/addresses": "6.1.0-canary-20260216194225",
32
+ "@solana/instruction-plans": "6.1.0-canary-20260216194225",
33
+ "@solana/keys": "6.1.0-canary-20260216194225",
34
+ "@solana/rpc-spec": "6.1.0-canary-20260216194225",
35
+ "@solana/rpc-subscriptions-spec": "6.1.0-canary-20260216194225",
36
+ "@solana/rpc-types": "6.1.0-canary-20260216194225",
37
+ "@solana/signers": "6.1.0-canary-20260216194225"
38
+ },
39
+ "peerDependencies": {
40
+ "typescript": "^5.0.0"
41
+ },
42
+ "peerDependenciesMeta": {
43
+ "typescript": {
44
+ "optional": true
45
+ }
46
+ },
47
+ "engines": {
48
+ "node": ">=20.18.0"
49
+ },
9
50
  "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1"
51
+ "compile:docs": "typedoc",
52
+ "compile:typedefs": "tsc -p ./tsconfig.declarations.json",
53
+ "publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || (pnpm publish --tag ${PUBLISH_TAG:-canary} --access public --no-git-checks && (([ -n \"${GITHUB_OUTPUT:-}\" ] && echo 'published=true' >> \"$GITHUB_OUTPUT\") || true) && (([ \"$PUBLISH_TAG\" != \"canary\" ] && ../build-scripts/maybe-tag-latest.ts --token \"$GITHUB_TOKEN\" $npm_package_name@$npm_package_version) || true))",
54
+ "publish-packages": "pnpm prepublishOnly && pnpm publish-impl",
55
+ "style:fix": "pnpm eslint --fix src && pnpm prettier --log-level warn --ignore-unknown --write ./*",
56
+ "test:lint": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-lint.config.js --rootDir . --silent",
57
+ "test:prettier": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-prettier.config.js --rootDir . --silent",
58
+ "test:typecheck": "tsc --noEmit"
11
59
  }
12
- }
60
+ }