Skip to main content

OptionContract

Type Alias OptionContract 

Source
pub type OptionContract = Singleton<OptionInfo>;

Aliased Type§

pub struct OptionContract {
    pub coin: Coin,
    pub proof: Proof,
    pub info: OptionInfo,
}

Fields§

§coin: Coin

The coin that this [Singleton] represents. Its puzzle hash should match the singleton outer puzzle hash.

§proof: Proof

The proof is needed by the singleton puzzle to prove that this coin is a legitimate singleton. It’s typically obtained by looking up and parsing the parent coin.

Note that while the proof will be a [LineageProof] for most coins, for the first singleton in the lineage it will be an EveProof instead. However, the eve coin is typically unhinted and spent in the same transaction as it was created, so this is not relevant for database storage or syncing unspent coins.

§info: OptionInfo

The information needed to construct the outer puzzle.