@deriverse/kit

中文文档
1.0.76发布于 2026/09/06Apache-2.0TypeScriptCommonJS近 30 天下载 2052

TypeScript SDK for Deriverse on Solana. Built on @solana/kit, @deriverse/kit helps load Deriverse account, market, and client state, build Deriverse instructions, and decode account and log data.

原始使用文档
文档目录10 节
  1. Features
  2. Installation
  3. Solana Mainnet and Devnet Program IDs and Versions
  4. Mainnet
  5. Devnet
  6. Examples
  7. Development
  8. Prerequisites
  9. Setup
  10. License

Deriverse SDK

TypeScript SDK for Deriverse on Solana. Built on @solana/kit, @deriverse/kit helps load Deriverse account, market, and client state, build Deriverse instructions, and decode account and log data.

Features

  • Spot and Swap

    • Build spot order, cancel, mass-cancel, quote-replace, LP, and swap instructions
    • Query spot order books, market metadata, and client spot orders
  • Perpetuals

    • Build perpetual deposit, withdrawal, order, cancel, mass-cancel, quote-replace, seat buy/sell, leverage-change, statistics-reset, and upgrade-to-perp instructions
    • Query perpetual order books, market metadata, client orders, and positions
  • Accounts and Data

    • Discover Deriverse token, instrument, client, root, and community accounts
    • Query client balances, open orders, and account state
    • Decode Deriverse account models and transaction logs
    • Use exported Zod schemas for runtime argument validation
  • VM / Vault Mode

    • Build activation, deactivation, whitelist, withdrawal, and direct-withdraw instructions

Installation

npm install @deriverse/kit

Solana Mainnet and Devnet Program IDs and Versions

Mainnet

PROGRAM_ID=DRVSpZ2YUYYKgZP8XtLhAGtT1zYSCKzeHfb4DgRnrgqD
VERSION=1

Devnet

PROGRAM_ID=CDESjex4EDBKLwx9ZPzVbjiHEHatasb5fhSJZMzNfvw2
VERSION=7

Examples

A comprehensive example is available at deriverse/kit-example.

Development

Prerequisites

  • Node.js >=20.19.0, or a current Node.js 22+ release
  • npm
  • TypeScript is installed from dev dependencies

Setup

  1. Clone the repository:
git clone https://github.com/deriverse/kit.git
cd kit
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Run checks:
npm test
npm run lint
npm run format:check

License

Apache 2.0 License - see the LICENSE file for details.

版本与发布记录

@deriverse/kit 共发布 60 个版本,首次发布于 2025/04/05;过去 12 个月发布了 29 个版本。

版本发布日期距今
1.0.76latest2026/09/062 个月前
1.0.752026/08/202 个月前
1.0.742026/07/303 个月前
1.0.732026/07/303 个月前
1.0.722026/06/304 个月前
1.0.712026/06/234 个月前

关于 @deriverse/kit 的常见问题

@deriverse/kit 是什么?

TypeScript SDK for Deriverse on Solana. Built on @solana/kit, @deriverse/kit helps load Deriverse account, market, and client state, build Deriverse instructions, and decode account and log data.

如何安装 @deriverse/kit?

在项目目录运行 npm install @deriverse/kit,或使用 pnpm add / yarn add / bun add。

@deriverse/kit 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@deriverse/kit 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@deriverse/kit 可以商用吗?

@deriverse/kit 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@deriverse/kit 的下载量有多少?

根据 npm 官方下载统计,@deriverse/kit 在 2026/10/12 – 2026/11/10 这 30 天内被下载 2,052 次,日均约 68 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@deriverse/kit 还在维护吗?

最新版本 1.0.76 发布于 2026/09/06(2 个月前);至今共发布 60 个版本,其中过去 12 个月发布了 29 个;首次发布于 2025/04/05。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。