pub struct SpendContext {
pub allocator: Allocator,
/* private fields */
}Expand description
Fields§
§allocator: AllocatorImplementations§
source§impl SpendContext
impl SpendContext
pub fn delegation_layer_puzzle(&mut self) -> Result<NodePtr, DriverError>
source§impl SpendContext
impl SpendContext
pub fn delegated_writer_filter(&mut self) -> Result<NodePtr, DriverError>
source§impl SpendContext
impl SpendContext
pub fn new() -> Self
pub fn iter(&self) -> impl Iterator<Item = &CoinSpend>
sourcepub fn take(&mut self) -> Vec<CoinSpend>
pub fn take(&mut self) -> Vec<CoinSpend>
Remove all of the CoinSpend that have been collected so far.
sourcepub fn alloc<T>(&mut self, value: &T) -> Result<NodePtr, DriverError>
pub fn alloc<T>(&mut self, value: &T) -> Result<NodePtr, DriverError>
Allocate a new node and return its pointer.
sourcepub fn extract<T>(&self, ptr: NodePtr) -> Result<T, DriverError>
pub fn extract<T>(&self, ptr: NodePtr) -> Result<T, DriverError>
Extract a value from a node pointer.
sourcepub fn run(
&mut self,
puzzle: NodePtr,
solution: NodePtr,
) -> Result<NodePtr, DriverError>
pub fn run( &mut self, puzzle: NodePtr, solution: NodePtr, ) -> Result<NodePtr, DriverError>
Run a puzzle with a solution and return the result.
sourcepub fn serialize<T>(&mut self, value: &T) -> Result<Program, DriverError>
pub fn serialize<T>(&mut self, value: &T) -> Result<Program, DriverError>
Serialize a value and return a Program.
sourcepub fn standard_puzzle(&mut self) -> Result<NodePtr, DriverError>
pub fn standard_puzzle(&mut self) -> Result<NodePtr, DriverError>
Allocate the standard puzzle and return its pointer.
sourcepub fn cat_puzzle(&mut self) -> Result<NodePtr, DriverError>
pub fn cat_puzzle(&mut self) -> Result<NodePtr, DriverError>
Allocate the CAT puzzle and return its pointer.
sourcepub fn did_inner_puzzle(&mut self) -> Result<NodePtr, DriverError>
pub fn did_inner_puzzle(&mut self) -> Result<NodePtr, DriverError>
Allocate the DID inner puzzle and return its pointer.
sourcepub fn nft_intermediate_launcher(&mut self) -> Result<NodePtr, DriverError>
pub fn nft_intermediate_launcher(&mut self) -> Result<NodePtr, DriverError>
Allocate the NFT intermediate launcher puzzle and return its pointer.
sourcepub fn nft_royalty_transfer(&mut self) -> Result<NodePtr, DriverError>
pub fn nft_royalty_transfer(&mut self) -> Result<NodePtr, DriverError>
Allocate the NFT royalty transfer puzzle and return its pointer.
sourcepub fn nft_metadata_updater(&mut self) -> Result<NodePtr, DriverError>
pub fn nft_metadata_updater(&mut self) -> Result<NodePtr, DriverError>
Allocate the NFT metadata updater puzzle and return its pointer.
sourcepub fn nft_ownership_layer(&mut self) -> Result<NodePtr, DriverError>
pub fn nft_ownership_layer(&mut self) -> Result<NodePtr, DriverError>
Allocate the NFT ownership layer puzzle and return its pointer.
sourcepub fn nft_state_layer(&mut self) -> Result<NodePtr, DriverError>
pub fn nft_state_layer(&mut self) -> Result<NodePtr, DriverError>
Allocate the NFT state layer puzzle and return its pointer.
sourcepub fn singleton_top_layer(&mut self) -> Result<NodePtr, DriverError>
pub fn singleton_top_layer(&mut self) -> Result<NodePtr, DriverError>
Allocate the singleton top layer puzzle and return its pointer.
sourcepub fn singleton_launcher(&mut self) -> Result<NodePtr, DriverError>
pub fn singleton_launcher(&mut self) -> Result<NodePtr, DriverError>
Allocate the singleton launcher puzzle and return its pointer.
sourcepub fn everything_with_signature_tail_puzzle(
&mut self,
) -> Result<NodePtr, DriverError>
pub fn everything_with_signature_tail_puzzle( &mut self, ) -> Result<NodePtr, DriverError>
Allocate the multi-issuance TAIL puzzle and return its pointer.
sourcepub fn genesis_by_coin_id_tail_puzzle(&mut self) -> Result<NodePtr, DriverError>
pub fn genesis_by_coin_id_tail_puzzle(&mut self) -> Result<NodePtr, DriverError>
Allocate the single-issuance TAIL puzzle and return its pointer.
sourcepub fn settlement_payments_puzzle(&mut self) -> Result<NodePtr, DriverError>
pub fn settlement_payments_puzzle(&mut self) -> Result<NodePtr, DriverError>
Allocate the settlement payments puzzle and return its pointer.
sourcepub fn p2_delegated_conditions_puzzle(&mut self) -> Result<NodePtr, DriverError>
pub fn p2_delegated_conditions_puzzle(&mut self) -> Result<NodePtr, DriverError>
Allocate the p2 delegated conditions puzzle and return its pointer.
sourcepub fn p2_one_of_many_puzzle(&mut self) -> Result<NodePtr, DriverError>
pub fn p2_one_of_many_puzzle(&mut self) -> Result<NodePtr, DriverError>
Allocate the p2 one of many puzzle and return its pointer.
sourcepub fn p2_singleton_puzzle(&mut self) -> Result<NodePtr, DriverError>
pub fn p2_singleton_puzzle(&mut self) -> Result<NodePtr, DriverError>
Allocate the p2 singleton puzzle and return its pointer.
sourcepub fn p2_delegated_singleton_puzzle(&mut self) -> Result<NodePtr, DriverError>
pub fn p2_delegated_singleton_puzzle(&mut self) -> Result<NodePtr, DriverError>
Allocate the p2 delegated singleton puzzle and return its pointer.
sourcepub fn preload(&mut self, puzzle_hash: TreeHash, ptr: NodePtr)
pub fn preload(&mut self, puzzle_hash: TreeHash, ptr: NodePtr)
Preload a puzzle into the cache.
sourcepub fn get_puzzle(&self, puzzle_hash: &TreeHash) -> Option<NodePtr>
pub fn get_puzzle(&self, puzzle_hash: &TreeHash) -> Option<NodePtr>
Checks whether a puzzle is in the cache.