anchor-utils 0.1.0

Utility functions and helpers for Anchor framework development
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 86.29 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.27 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 54s Average build duration of successful builds.
  • all releases: 54s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • macalinao/testsvm
    3 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • macalinao

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.