btcpay-client 0.1.0

A client library for BTCPay Server.
Documentation
/*
 * BTCPay Greenfield API
 *
 * A full API to use your BTCPay Server
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateOnChainTransactionRequest {
    /// What and where to send money
    #[serde(rename = "destinations", skip_serializing_if = "Option::is_none")]
    pub destinations: Option<Vec<crate::models::CreateOnChainTransactionRequestDestination>>,
    /// Transaction fee.
    #[serde(rename = "feerate", skip_serializing_if = "Option::is_none")]
    pub feerate: Option<f32>,
    /// Whether to attempt to do a BIP78 payjoin if one of the destinations is a BIP21 with payjoin enabled
    #[serde(rename = "proceedWithPayjoin", skip_serializing_if = "Option::is_none")]
    pub proceed_with_payjoin: Option<bool>,
    /// Whether to broadcast the transaction after creating it or to simply return the transaction in hex format.
    #[serde(rename = "proceedWithBroadcast", skip_serializing_if = "Option::is_none")]
    pub proceed_with_broadcast: Option<bool>,
    /// Whether to send all the spent coins to the destinations (THIS CAN COST YOU SIGNIFICANT AMOUNTS OF MONEY, LEAVE FALSE UNLESS YOU KNOW WHAT YOU ARE DOING).
    #[serde(rename = "noChange", skip_serializing_if = "Option::is_none")]
    pub no_change: Option<bool>,
    /// Whether to enable RBF for the transaction. Leave blank to have it random (beneficial to privacy)
    #[serde(rename = "rbf", skip_serializing_if = "Option::is_none")]
    pub rbf: Option<bool>,
    /// Whether to exclude unconfirmed UTXOs from the transaction.
    #[serde(rename = "excludeUnconfirmed", skip_serializing_if = "Option::is_none")]
    pub exclude_unconfirmed: Option<bool>,
    /// Restrict the creation of the transactions from the outpoints provided ONLY (coin selection)
    #[serde(rename = "selectedInputs", skip_serializing_if = "Option::is_none")]
    pub selected_inputs: Option<Vec<String>>,
}

impl CreateOnChainTransactionRequest {
    pub fn new() -> CreateOnChainTransactionRequest {
        CreateOnChainTransactionRequest {
            destinations: None,
            feerate: None,
            proceed_with_payjoin: None,
            proceed_with_broadcast: None,
            no_change: None,
            rbf: None,
            exclude_unconfirmed: None,
            selected_inputs: None,
        }
    }
}