pub struct PartyParams {
pub fund_pubkey: PublicKey,
pub change_script_pubkey: ScriptBuf,
pub change_serial_id: u64,
pub payout_script_pubkey: ScriptBuf,
pub payout_serial_id: u64,
pub inputs: Vec<TxInputInfo>,
pub dlc_inputs: Vec<DlcInputInfo>,
pub input_amount: Amount,
pub collateral: Amount,
}Expand description
Contains the parameters required for creating DLC transactions for a single party. Specifically these are the common fields between Offer and Accept messages.
Fields§
§fund_pubkey: PublicKeyThe public key for the fund multisig script
change_script_pubkey: ScriptBufAn address to receive change
change_serial_id: u64Id used to order fund outputs
payout_script_pubkey: ScriptBufAn address to receive the outcome amount
payout_serial_id: u64Id used to order CET outputs
inputs: Vec<TxInputInfo>A list of inputs to fund the contract
dlc_inputs: Vec<DlcInputInfo>A list of dlc inputs to be used
input_amount: AmountThe sum of the inputs values.
collateral: AmountThe collateral put in the contract by the party
Implementations§
Source§impl PartyParams
impl PartyParams
Sourcepub fn get_change_output_and_fees(
&self,
total_collateral: Amount,
fee_rate_per_vb: u64,
extra_fee: Amount,
) -> Result<(TxOut, Amount, Amount), Error>
pub fn get_change_output_and_fees( &self, total_collateral: Amount, fee_rate_per_vb: u64, extra_fee: Amount, ) -> Result<(TxOut, Amount, Amount), Error>
Returns the change output for a single party as well as the fees that they are required to pay for the fund transaction and the cet or refund transaction. The change output value already accounts for the required fees. If input amount (sum of all input values) is lower than the sum of the collateral plus the required fees, an error is returned.
Trait Implementations§
Source§impl Clone for PartyParams
impl Clone for PartyParams
Source§fn clone(&self) -> PartyParams
fn clone(&self) -> PartyParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more