🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

solgen

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solgen

A TypeScript SDK generator for Solana IDL - Automatically generates type definitions, account interfaces, and instruction builders

0.1.3
latest
npm
Version published
Weekly downloads
5
66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Solgen

Solgen 是一个强大的 Solana IDL 到 TypeScript SDK 的代码生成器。它能自动将 Solana IDL 转换为类型安全的 TypeScript SDK,显著提升开发效率。

solgen ./idl/your_program_idl.json

主要特性

  • 🔄 自动生成完整的 TypeScript 类型定义
  • 🏗️ 生成智能合约交互所需的所有接口
    • Args 参数接口
    • Accounts 账户接口
    • Layout 布局定义
  • 🛠️ 自动生成指令构建函数
    • 处理 account metas (签名、可写权限等)
    • 内置序列化逻辑
    • 生成标准化的 TransactionInstruction
  • ✨ 类型安全,降低开发错误
  • 📦 零配置,即开即用

为什么选择 Solgen?

  • 避免重复编写模板代码
  • 确保类型安全,提供完整的 TypeScript 支持
  • 大幅减少人为错误
  • 简化维护工作
  • 标准化的代码输出

Keywords

solana

FAQs

Package last updated on 19 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts