btcpay_client/models/
create_on_chain_transaction_request.rs

1/*
2 * BTCPay Greenfield API
3 *
4 * A full API to use your BTCPay Server
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct CreateOnChainTransactionRequest {
16    /// What and where to send money
17    #[serde(rename = "destinations", skip_serializing_if = "Option::is_none")]
18    pub destinations: Option<Vec<crate::models::CreateOnChainTransactionRequestDestination>>,
19    /// Transaction fee.
20    #[serde(rename = "feerate", skip_serializing_if = "Option::is_none")]
21    pub feerate: Option<f32>,
22    /// Whether to attempt to do a BIP78 payjoin if one of the destinations is a BIP21 with payjoin enabled
23    #[serde(rename = "proceedWithPayjoin", skip_serializing_if = "Option::is_none")]
24    pub proceed_with_payjoin: Option<bool>,
25    /// Whether to broadcast the transaction after creating it or to simply return the transaction in hex format.
26    #[serde(rename = "proceedWithBroadcast", skip_serializing_if = "Option::is_none")]
27    pub proceed_with_broadcast: Option<bool>,
28    /// 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).
29    #[serde(rename = "noChange", skip_serializing_if = "Option::is_none")]
30    pub no_change: Option<bool>,
31    /// Whether to enable RBF for the transaction. Leave blank to have it random (beneficial to privacy)
32    #[serde(rename = "rbf", skip_serializing_if = "Option::is_none")]
33    pub rbf: Option<bool>,
34    /// Whether to exclude unconfirmed UTXOs from the transaction.
35    #[serde(rename = "excludeUnconfirmed", skip_serializing_if = "Option::is_none")]
36    pub exclude_unconfirmed: Option<bool>,
37    /// Restrict the creation of the transactions from the outpoints provided ONLY (coin selection)
38    #[serde(rename = "selectedInputs", skip_serializing_if = "Option::is_none")]
39    pub selected_inputs: Option<Vec<String>>,
40}
41
42impl CreateOnChainTransactionRequest {
43    pub fn new() -> CreateOnChainTransactionRequest {
44        CreateOnChainTransactionRequest {
45            destinations: None,
46            feerate: None,
47            proceed_with_payjoin: None,
48            proceed_with_broadcast: None,
49            no_change: None,
50            rbf: None,
51            exclude_unconfirmed: None,
52            selected_inputs: None,
53        }
54    }
55}
56
57