Struct chia_sdk_driver::IntermediateLauncher
source · pub struct IntermediateLauncher { /* private fields */ }
Expand description
An intermediate launcher is a coin that is created prior to the actual launcher coin. In this case, it automatically creates the launcher coin upon being spent.
The purpose of this is to allow multiple launcher coins to be created from a single parent. Without an intermediate launcher, they would all have the same coin id.
Implementations§
source§impl IntermediateLauncher
impl IntermediateLauncher
sourcepub fn new(
parent_coin_id: Bytes32,
mint_number: usize,
mint_total: usize,
) -> Self
pub fn new( parent_coin_id: Bytes32, mint_number: usize, mint_total: usize, ) -> Self
Create a new intermediate launcher with the given index. This makes the puzzle hash, and therefore coin id, unique.
sourcepub fn intermediate_coin(&self) -> Coin
pub fn intermediate_coin(&self) -> Coin
The intermediate coin that will be created when the parent is spent.
sourcepub fn launcher_coin(&self) -> Coin
pub fn launcher_coin(&self) -> Coin
The singleton launcher coin that will be created when the intermediate coin is spent.
sourcepub fn create(self, ctx: &mut SpendContext) -> Result<Launcher, DriverError>
pub fn create(self, ctx: &mut SpendContext) -> Result<Launcher, DriverError>
Spends the intermediate coin to create the launcher coin.
Trait Implementations§
source§impl Clone for IntermediateLauncher
impl Clone for IntermediateLauncher
source§fn clone(&self) -> IntermediateLauncher
fn clone(&self) -> IntermediateLauncher
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for IntermediateLauncher
impl Debug for IntermediateLauncher
source§impl PartialEq for IntermediateLauncher
impl PartialEq for IntermediateLauncher
impl Copy for IntermediateLauncher
impl Eq for IntermediateLauncher
impl StructuralPartialEq for IntermediateLauncher
Auto Trait Implementations§
impl Freeze for IntermediateLauncher
impl RefUnwindSafe for IntermediateLauncher
impl Send for IntermediateLauncher
impl Sync for IntermediateLauncher
impl Unpin for IntermediateLauncher
impl UnwindSafe for IntermediateLauncher
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)