Vault

Type Alias Vault 

Source
pub type Vault = Singleton<VaultInfo>;

Aliased Type§

pub struct Vault {
    pub coin: Coin,
    pub proof: Proof,
    pub info: VaultInfo,
}

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: VaultInfo

The information needed to construct the outer puzzle.

Implementations§

Source§

impl Vault

Source

pub fn child(&self, custody_hash: TreeHash, amount: u64) -> Self

Source

pub fn spend( &self, ctx: &mut SpendContext, spend: &MipsSpend, ) -> Result<(), DriverError>