star_frame 0.29.0

A high performance Solana framework for building fast, scalable, and secure smart contracts.
Documentation
//! Commonly used types and traits: `use star_frame::prelude::*`.

#[cfg(all(feature = "idl", not(target_os = "solana")))]
pub use crate::idl::{
    seed_const, seed_path, AccountSetToIdl, AccountToIdl, InstructionSetToIdl, InstructionToIdl,
    ProgramToIdl, TypeToIdl,
};
#[cfg(all(feature = "idl", not(target_os = "solana")))]
pub use star_frame_idl::{NodeToJson, ProgramNode};

#[cfg(all(feature = "test_helpers", not(target_os = "solana")))]
pub use crate::unsize::{NewByteSet, TestByteSet};

pub use crate::{
    account_set::prelude::*,
    align1::Align1,
    bail, borsh_with_bytemuck,
    client::{
        DeserializeAccount as _, DeserializeBorshAccount as _, DeserializeType as _,
        FindProgramAddress as _, MakeInstruction as _, SerializeAccount as _,
        SerializeBorshAccount as _, SerializeType as _,
    },
    context::Context,
    cpi::MakeCpi as _,
    create_unit_system,
    data_types::{
        ClockExt, GetKeyFor as _, GetOptionalKeyFor as _, KeyFor, OptionalKeyFor, OptionalPubkey,
        PackedValue, SetKeyFor as _, UnitVal,
    },
    ensure, ensure_eq, ensure_ne, error,
    errors::{star_frame_error, Error, ErrorInfo as _},
    instruction::{
        star_frame_instruction, InstructionArgs, InstructionDiscriminant as _, InstructionSet,
        StarFrameInstruction,
    },
    program::{system::System, StarFrameProgram},
    pubkey,
    unsize::prelude::*,
    util::{borsh_bytemuck, FastPubkeyEq as _},
    Result,
};

// ensure derive macros are in scope
pub use star_frame_proc::{zero_copy, InstructionToIdl, TypeToIdl};

// Solana stuff
pub use pinocchio::{
    account_info::AccountInfo, instruction::AccountMeta as PinocchioAccountMeta, msg,
    program_error::ProgramError, ProgramResult,
};
pub use solana_instruction::AccountMeta;
pub use solana_pubkey::Pubkey;

// bytemuck
pub use bytemuck::{CheckedBitPattern, NoUninit, Pod, Zeroable};

pub use borsh::{self, BorshDeserialize, BorshSerialize};

pub use std::fmt::Debug;