Expand description
Utility functions for the Lightcone Pinocchio SDK.
This module provides helper functions for ATA derivation, validation, and string serialization.
Structs§
- Outcome
Metadata Input - Outcome metadata for conditional token creation.
Functions§
- checked_
add_ u64 - Add two u64 values and check for overflow.
- checked_
div_ u64 - Divide two u64 values and check for division by zero.
- checked_
mul_ u64 - Multiply two u64 values and check for overflow.
- checked_
sub_ u64 - Subtract two u64 values and check for underflow.
- deserialize_
string - Deserialize a string with a u16 length prefix.
- get_
associated_ token_ address - Get the Associated Token Address for a wallet and mint.
- get_
conditional_ token_ ata - Get the ATA for a conditional token (using Token-2022).
- get_
deposit_ token_ ata - Get the ATA for a deposit token (using SPL Token).
- serialize_
outcome_ metadata - Serialize outcome metadata for the add_deposit_mint instruction.
- serialize_
string - Serialize a string with a u16 length prefix.
- validate_
32_ bytes - Validate that a buffer is exactly 32 bytes.
- validate_
outcome_ count - Validate that the number of outcomes is within the allowed range.
- validate_
outcome_ index - Validate that an outcome index is valid for the given number of outcomes.