pub struct ProgramIdl {
pub name: &'static str,
pub version: &'static str,
pub description: &'static str,
pub instructions: &'static [IdlInstructionDescriptor],
pub accounts: &'static [LayoutManifest],
pub events: &'static [EventDescriptor],
pub fingerprints: &'static [([u8; 8], &'static str)],
}Expand description
A public-facing IDL for a Hopper program.
Contains only what external consumers (clients, explorers, SDKs) need. Does NOT contain internal policy logic, migration planner hints, trust internals, or unsafe metadata.
Generated from (and strictly a subset of) ProgramManifest.
Fields§
§name: &'static strProgram name.
version: &'static strProgram version string.
description: &'static strProgram description.
instructions: &'static [IdlInstructionDescriptor]Instructions with args, accounts, PDA hints.
accounts: &'static [LayoutManifest]Account layout summaries (name, disc, version, layout_id, size, fields).
events: &'static [EventDescriptor]Event descriptors.
fingerprints: &'static [([u8; 8], &'static str)]Optional layout_id fingerprints per account.
Implementations§
Source§impl ProgramIdl
impl ProgramIdl
Sourcepub const fn instruction_count(&self) -> usize
pub const fn instruction_count(&self) -> usize
Number of instructions.
Sourcepub const fn account_count(&self) -> usize
pub const fn account_count(&self) -> usize
Number of account types.
Sourcepub fn find_instruction(&self, name: &str) -> Option<&IdlInstructionDescriptor>
pub fn find_instruction(&self, name: &str) -> Option<&IdlInstructionDescriptor>
Find an instruction by name.
Sourcepub fn find_account(&self, name: &str) -> Option<&LayoutManifest>
pub fn find_account(&self, name: &str) -> Option<&LayoutManifest>
Find an account layout by name.
Trait Implementations§
Source§impl Clone for ProgramIdl
impl Clone for ProgramIdl
Source§fn clone(&self) -> ProgramIdl
fn clone(&self) -> ProgramIdl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Display for ProgramIdl
impl Display for ProgramIdl
impl Copy for ProgramIdl
Auto Trait Implementations§
impl Freeze for ProgramIdl
impl RefUnwindSafe for ProgramIdl
impl Send for ProgramIdl
impl Sync for ProgramIdl
impl Unpin for ProgramIdl
impl UnsafeUnpin for ProgramIdl
impl UnwindSafe for ProgramIdl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more