Skip to main content

Crate pinocchio_util

Crate pinocchio_util 

Source

Traits§

AccountUpdates
Generate an enum and associated function for updating fields on an account struct.
Context
Build an instruction context with both accounts and instruction data
DataLen
Get the length of an account’s data.
Validate
Validate surface level account attributes like keys, data length, and more.

Functions§

load
Load an immutable reference to an account’s data as an arbitrary type. This requires that the provided type implements the DataLen trait so there’s assurance that no out of bounds access will occur.
load_discriminator
Extract an account’s discriminator. This is useful if working with Anchor programs, and you need to validate that a provided account is of a specific type.
load_mut
Load a mutable reference to an account’s data as an arbitrary type. This requires that the provided type implements the DataLen trait so there’s assurance that no out of bounds access will occur.