MedievalVault

Type Alias MedievalVault 

Source
pub type MedievalVault = Singleton<MedievalVaultInfo>;

Aliased Type§

pub struct MedievalVault {
    pub coin: Coin,
    pub proof: Proof,
    pub info: MedievalVaultInfo,
}

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

The information needed to construct the outer puzzle.

Implementations§

Source§

impl MedievalVault

Source

pub fn from_launcher_spend( ctx: &mut SpendContext, launcher_spend: &CoinSpend, ) -> Result<Option<Self>, DriverError>

Source

pub fn child(&self, new_m: usize, new_public_key_list: Vec<PublicKey>) -> Self

Source

pub fn from_parent_spend( ctx: &mut SpendContext, parent_spend: &CoinSpend, ) -> Result<Option<Self>, DriverError>

Source

pub fn delegated_conditions( conditions: Conditions, coin_id: Bytes32, genesis_challenge: NodePtr, ) -> Conditions

Source

pub fn spend_sunsafe( self, ctx: &mut SpendContext, used_pubkeys: &[PublicKey], delegated_puzzle: NodePtr, delegated_solution: NodePtr, ) -> Result<(), DriverError>

Source

pub fn spend( self, ctx: &mut SpendContext, used_pubkeys: &[PublicKey], conditions: Conditions, genesis_challenge: Bytes32, ) -> Result<(), DriverError>

Source

pub fn rekey_create_coin_unsafe( ctx: &mut SpendContext, launcher_id: Bytes32, new_m: usize, new_pubkeys: Vec<PublicKey>, ) -> Result<Conditions, DriverError>

Source

pub fn delegated_puzzle_for_rekey( ctx: &mut SpendContext, launcher_id: Bytes32, new_m: usize, new_pubkeys: Vec<PublicKey>, coin_id: Bytes32, genesis_challenge: Bytes32, ) -> Result<NodePtr, DriverError>

Source

pub fn delegated_puzzle_for_flexible_send_message<M>( ctx: &mut SpendContext, message: M, receiver_launcher_id: Bytes32, my_coin: Coin, my_info: &MedievalVaultInfo, genesis_challenge: Bytes32, ) -> Result<NodePtr, DriverError>
where M: ToClvm<Allocator>,