|
@@ -48,7 +48,10 @@ fn main() {
|
|
|
// Create the deposit for 110 BTC
|
|
// Create the deposit for 110 BTC
|
|
|
// Clear inputs are visible to everyone on the network
|
|
// Clear inputs are visible to everyone on the network
|
|
|
let builder = tx::TransactionBuilder {
|
|
let builder = tx::TransactionBuilder {
|
|
|
- clear_inputs: vec![tx::TransactionBuilderClearInputInfo { value: 110, signature_secret: cashier_secret }],
|
|
|
|
|
|
|
+ clear_inputs: vec![tx::TransactionBuilderClearInputInfo {
|
|
|
|
|
+ value: 110,
|
|
|
|
|
+ signature_secret: cashier_secret,
|
|
|
|
|
+ }],
|
|
|
inputs: vec![],
|
|
inputs: vec![],
|
|
|
outputs: vec![tx::TransactionBuilderOutputInfo { value: 110, public }],
|
|
outputs: vec![tx::TransactionBuilderOutputInfo { value: 110, public }],
|
|
|
};
|
|
};
|
|
@@ -158,7 +161,10 @@ fn main() {
|
|
|
}],
|
|
}],
|
|
|
// We can add more outputs to this list.
|
|
// We can add more outputs to this list.
|
|
|
// The only constraint is that sum(value in) == sum(value out)
|
|
// The only constraint is that sum(value in) == sum(value out)
|
|
|
- outputs: vec![tx::TransactionBuilderOutputInfo { value: 110, public: public2 }],
|
|
|
|
|
|
|
+ outputs: vec![tx::TransactionBuilderOutputInfo {
|
|
|
|
|
+ value: 110,
|
|
|
|
|
+ public: public2,
|
|
|
|
|
+ }],
|
|
|
};
|
|
};
|
|
|
// Build the tx
|
|
// Build the tx
|
|
|
let mut tx_data = vec![];
|
|
let mut tx_data = vec![];
|
|
@@ -172,4 +178,3 @@ fn main() {
|
|
|
assert!(tx.verify(&mint_pvk, &spend_pvk));
|
|
assert!(tx.verify(&mint_pvk, &spend_pvk));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|