# @solana/rpc-spec-types

> Shared generic JSON RPC specifications

Latest version **8.3.0** (published 2026-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @solana/rpc-spec-types
pnpm add @solana/rpc-spec-types
yarn add @solana/rpc-spec-types
bun add @solana/rpc-spec-types
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 8.3.0 |
| Published | 2026-09-09 |
| First published | 2024-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20.18.0 |
| Dependencies | 1 |
| Unpacked size | 217.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 695 |
| Author | Solana Labs Maintainers |
| Maintainers | solana-devs |
| Keywords | blockchain, solana, web3 |

## Links

- npm: https://www.npmjs.com/package/@solana/rpc-spec-types
- Repository: https://github.com/anza-xyz/kit
- Homepage: https://www.solanakit.com/api#solanarpc-spec-types
- Issues: https://github.com/anza-xyz/kit/issues
- npm.io page: https://npm.io/package/@solana/rpc-spec-types

## Dependencies (1)

- [@solana/errors](https://npm.io/package/@solana/errors.md) 8.3.0

## Recent versions

- 8.3.0 (latest) — 2026-09-09
- 8.4.0-canary-20260924083259 (canary) — 2026-09-24
- 5.1.0-experimental-20251205104522 (experimental) — 2025-12-05
- 4.0.0 (4x) — 2025-10-08
- 3.0.3 (3x) — 2025-09-11
- 2.0.0 (next) — 2024-11-07
- 2.0.0-rc.4 (rc) — 2024-11-05
- 2.0.0-preview.4.20240731091009.c2717fc498afa3228c8f8b01600a575989afae99 (preview) — 2024-07-31
- 2.0.0-preview.4 (tp4) — 2024-07-02
- 2.0.0-preview.3 (tp3) — 2024-04-25
- 2.0.0-preview.2 (tp2) — 2024-03-19
- 8.4.0-canary-20260923083123 — 2026-09-23
- 8.4.0-canary-20260922155338 — 2026-09-22
- 8.4.0-canary-20260922151509 — 2026-09-22
- 8.4.0-canary-20260922084122 — 2026-09-22
- … 1992 more at https://npm.io/package/@solana/rpc-spec-types/versions

## README

[![npm][npm-image]][npm-url]
[![npm-downloads][npm-downloads-image]][npm-url]
<br />
[![code-style-prettier][code-style-prettier-image]][code-style-prettier-url]

[code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
[code-style-prettier-url]: https://github.com/prettier/prettier
[npm-downloads-image]: https://img.shields.io/npm/dm/@solana/rpc-spec-types?style=flat
[npm-image]: https://img.shields.io/npm/v/@solana/rpc-spec-types?style=flat
[npm-url]: https://www.npmjs.com/package/@solana/rpc-spec-types

# @solana/rpc-spec-types

This package contains core types that can be used on both RPC and RPC Subscriptions specifications. 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).

## Types

### `RpcRequest`

An object that describes the elements of a RPC or RPC Subscriptions request. It consists of the following properties:

- `methodName`: The name of the RPC method or subscription requested.
- `params`: The parameters to be passed to the RPC server.

### `RpcRequestTransformer`

A function that accepts a `RpcRequest` and returns another `RpcRequest`. This allows the `RpcApi` to transform the request before it is sent to the RPC server.

### `RpcResponse`

A type that represents the response from a RPC server. This could be any sort of data which is why `RpcResponse` defaults to `unknown`. You may use a type parameter to specify the shape of the response — e.g. `RpcResponse<{ result: number }>`.

### `RpcResponseTransformer`

A function that accepts a `RpcResponse` and returns another `RpcResponse`. This allows the `RpcApi` to transform the response before it is returned to the caller.

---
_Source: https://npm.io/package/@solana/rpc-spec-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
