Skip to main content

parse_metadata

Function parse_metadata 

Source
pub fn parse_metadata(
    ctx: &mut SpendContext,
    launcher_solution: &Program,
) -> Result<OptionMetadata>
Expand description

Recover an option’s OptionMetadata (expiry seconds + strike type) from the launcher coin’s solution, which the caller fetched from a node/indexer.

The launcher solution carries the option’s key-value metadata; this decodes it into the caller-owned SpendContext. Network-free: the caller supplies the serialized solution.