(
network: Network,
depositor_public_key: &PublicKey,
connector_z: &ConnectorZ,
input_0: Input,
)
| 71 | } |
| 72 | |
| 73 | pub fn new_for_validation( |
| 74 | network: Network, |
| 75 | depositor_public_key: &PublicKey, |
| 76 | connector_z: &ConnectorZ, |
| 77 | input_0: Input, |
| 78 | ) -> Self { |
| 79 | let input_0_leaf = 0; |
| 80 | let _input_0 = connector_z.generate_taproot_leaf_tx_in(input_0_leaf, &input_0); |
| 81 | |
| 82 | let total_output_amount = input_0.amount - Amount::from_sat(MIN_RELAY_FEE_PEG_IN_REFUND); |
| 83 | |
| 84 | let _output_0 = TxOut { |
| 85 | value: total_output_amount, |
| 86 | script_pubkey: generate_pay_to_pubkey_script_address(network, depositor_public_key) |
| 87 | .script_pubkey(), |
| 88 | }; |
| 89 | |
| 90 | PegInRefundTransaction { |
| 91 | tx: Transaction { |
| 92 | version: bitcoin::transaction::Version(2), |
| 93 | lock_time: absolute::LockTime::ZERO, |
| 94 | input: vec![_input_0], |
| 95 | output: vec![_output_0], |
| 96 | }, |
| 97 | prev_outs: vec![TxOut { |
| 98 | value: input_0.amount, |
| 99 | script_pubkey: connector_z.generate_taproot_address().script_pubkey(), |
| 100 | }], |
| 101 | prev_scripts: vec![connector_z.generate_taproot_leaf_script(input_0_leaf)], |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | fn sign_input_0(&mut self, context: &DepositorContext, connector_z: &ConnectorZ) { |
| 106 | pre_sign_taproot_input_default( |
nothing calls this directly
no test coverage detected