update extended example
@@ -49,36 +49,36 @@ async fn main() -> Result<()> {
let mut outputs: Vec<Output> = Vec::new();
// most simple output
- outputs.push(Output::Extended(
- ExtendedOutputBuilder::new(1_000_000)
- .add_unlock_condition(UnlockCondition::Address(AddressUnlockCondition::new(address)))
- .finish()?,
- ));
- // with metadata feature block
- outputs.push(Output::Extended(
- ExtendedOutputBuilder::new(1_000_000)
- .add_unlock_condition(UnlockCondition::Address(AddressUnlockCondition::new(address)))
- .add_feature_block(FeatureBlock::Metadata(MetadataFeatureBlock::new(vec![13, 37])?))
- .finish()?,
- ));
- // with dust deposit return
// outputs.push(Output::Extended(
// ExtendedOutputBuilder::new(1_000_000)
// .add_unlock_condition(UnlockCondition::Address(AddressUnlockCondition::new(address)))
- // .add_unlock_condition(UnlockCondition::DustDepositReturn(DustDepositReturnUnlockCondition::new(address,
- // 1_000_000)?)) .finish()?,
+ // .finish()?,
+ // ));
+ // // with metadata feature block
+ // outputs.push(Output::Extended(
+ // ExtendedOutputBuilder::new(1_000_000)
+ // .add_unlock_condition(UnlockCondition::Address(AddressUnlockCondition::new(address)))
+ // .add_feature_block(FeatureBlock::Metadata(MetadataFeatureBlock::new(vec![13, 37])?))
+ // .finish()?,
// ));
// with dust deposit return
outputs.push(Output::Extended(
- ExtendedOutputBuilder::new(1_000_000)
+ ExtendedOutputBuilder::new(2_000_000)
.add_unlock_condition(UnlockCondition::Address(AddressUnlockCondition::new(address)))
- .add_unlock_condition(UnlockCondition::Expiration(ExpirationUnlockCondition::new(
- address,
- MilestoneIndex::new(400),
- 0,
- )))
- .finish()?,
+ .add_unlock_condition(UnlockCondition::DustDepositReturn(DustDepositReturnUnlockCondition::new(address,
+ 1_000_000)?)) .finish()?,
));
+ // with dust expiration
+ // outputs.push(Output::Extended(
+ // ExtendedOutputBuilder::new(1_000_000)
+ // .add_unlock_condition(UnlockCondition::Address(AddressUnlockCondition::new(address)))
+ // .add_unlock_condition(UnlockCondition::Expiration(ExpirationUnlockCondition::new(
+ // address,
+ // MilestoneIndex::new(400),
+ // 0,
+ // )))
+ // .finish()?,
+ // ));
let message = iota
.message()
