Skip to main content

Crate pinsteel

Crate pinsteel 

Source

Re-exports§

pub extern crate alloc;

Modules§

macros

Macros§

account
error
event
Declare a log-gable event struct.
impl_to_bytes
Returns a raw slice of the account’s bytes.
impl_to_bytes_mut
Returns a mutable raw slice of the account’s bytes.
instruction

Structs§

CloseProgramAccount
Close a program account
CreateProgramAccount
Create a new program account.
EmitEvent
Log an event by making a self-CPI that can be subscribed to by clients.
ResizeProgramAccount
Resize existing program account.
Validation
Build dynamic validation rules for AccountInfo

Constants§

EMIT_EVENT_DISCRIMINATOR
Fixed discriminator for the EmitEvent instruction.
ERROR_INVALID_UTF8
ERROR_STRING_TOO_LONG
HASH_LENGTH
MAX_CPI_INSTRUCTION_DATA_LEN
SYSVAR_PROGRAM_ID

Traits§

Account
AccountDeserialize
AccountHeaderDeserialize
where the former resolves the type of the latter (e.g. merkle trees with a generic size const). This trait parses a header type from the first N bytes of some data, and returns the remaining bytes, which are then available for further processing.
AccountValidation
AsAccount
Performs:
Discriminator
Instruction
InstructionDeserialize
InstructionHeaderDeserialize
Loggable
Supports logging.

Functions§

bytes_to_string
Converts a fixed-size byte array into a String, handling null termination.
hash
hash_into
hash_ref
hashv
parse_instruction
Parses an instruction from the instruction data.
parse_pubkey
parse_u32
parse_u64
string_to_bytes
Converts a string into a fixed-size byte array of length N.
trace
Logs the call trace and returns the error.