| Crates.io | nitrogen-instruction-builder |
| lib.rs | nitrogen-instruction-builder |
| version | 0.1.3 |
| created_at | 2025-10-23 21:43:39.544074+00 |
| updated_at | 2025-11-22 20:04:54.265715+00 |
| description | Solana instruction builder for nitrogen IDL encoder framework |
| homepage | |
| repository | https://github.com/carteraMesh/nitrogen |
| max_upload_size | |
| id | 1897726 |
| size | 25,091 |
Lightweight builder utilities for Solana Instructions.
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).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();