nitrogen-instruction-builder

Crates.ionitrogen-instruction-builder
lib.rsnitrogen-instruction-builder
version0.1.3
created_at2025-10-23 21:43:39.544074+00
updated_at2025-11-22 20:04:54.265715+00
descriptionSolana instruction builder for nitrogen IDL encoder framework
homepage
repositoryhttps://github.com/carteraMesh/nitrogen
max_upload_size
id1897726
size25,091
Douglas Chimento (dougEfresh)

documentation

README

nitrogen instruction builder

Crates.io CI

Lightweight builder utilities for Solana Instructions.

Features

  • InstructionBuilder - Minimal builder for Solana instructions with Borsh-serialized data. Similar to anchor-client but lighter. Part of the nitrogen framework that converts Solana IDLs to pure Rust code (no macros).

Usage

use nitrogen_instruction_builder::InstructionBuilder;
use solana_instruction::AccountMeta;
use solana_pubkey::Pubkey;
use borsh::BorshSerialize;

#[derive(BorshSerialize)]
struct MyParams {
    amount: u64,
}

const PROGRAM_ID: Pubkey = solana_pubkey::pubkey!("So11111111111111111111111111111111111111112");
// Build a single instruction
let ix = InstructionBuilder::builder()
    .program_id(PROGRAM_ID)
    .accounts(vec![AccountMeta::new(account, true)])
    .params(MyParams { amount: 100 })
    .build()
    .instruction();

Commit count: 0

cargo fmt