anchor-utils 0.1.0

Utility functions and helpers for Anchor framework development
Documentation

anchor-utils

Crates.io Documentation

Utility functions for working with Anchor programs in Solana.

Features

  • anchor_instruction - Helper function to create Solana instructions from Anchor's generated declare_program! client structs

Usage

use anchor_utils::anchor_instruction;
use anchor_lang::{InstructionData, ToAccountMetas};

// Create an instruction using Anchor's generated types
let instruction = anchor_instruction(
    program_id,
    accounts_struct, // implements ToAccountMetas
    instruction_data // implements InstructionData
);

License

Copyright (c) 2025 Ian Macalinao. Licensed under the Apache License, Version 2.0.