Skip to main content

ark_rest/models/
get_vtxos_request.rs

1/*
2 * Ark API
3 *
4 * Combined Ark Service, Indexer, Admin, Signer Manager, and Wallet API
5 *
6 * The version of the OpenAPI document: 1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::Deserialize;
13use serde::Serialize;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GetVtxosRequest {
17    /// Include only vtxos with last update after the given unix time in milliseconds. A value of 0
18    /// means no lower bound.
19    #[serde(rename = "after", skip_serializing_if = "Option::is_none")]
20    pub after: Option<String>,
21    /// Include only vtxos with last update before the given unix time in milliseconds, greater
22    /// value than the after when specified. A value of 0 means no upper bound.
23    #[serde(rename = "before", skip_serializing_if = "Option::is_none")]
24    pub before: Option<String>,
25    /// Or specify a list of vtxo outpoints. The 2 filters are mutually exclusive.
26    #[serde(rename = "outpoints", skip_serializing_if = "Option::is_none")]
27    pub outpoints: Option<Vec<String>>,
28    #[serde(rename = "page", skip_serializing_if = "Option::is_none")]
29    pub page: Option<models::IndexerPageRequest>,
30    /// Include only spent vtxos that are not finalized.
31    #[serde(rename = "pendingOnly", skip_serializing_if = "Option::is_none")]
32    pub pending_only: Option<bool>,
33    /// Retrieve only recoverable vtxos (notes, subdust or swept vtxos). The 3 filters are mutually
34    /// exclusive,
35    #[serde(rename = "recoverableOnly", skip_serializing_if = "Option::is_none")]
36    pub recoverable_only: Option<bool>,
37    /// Either specify a list of vtxo scripts.
38    #[serde(rename = "scripts", skip_serializing_if = "Option::is_none")]
39    pub scripts: Option<Vec<String>>,
40    /// Retrieve only spendable vtxos
41    #[serde(rename = "spendableOnly", skip_serializing_if = "Option::is_none")]
42    pub spendable_only: Option<bool>,
43    /// Retrieve only spent vtxos.
44    #[serde(rename = "spentOnly", skip_serializing_if = "Option::is_none")]
45    pub spent_only: Option<bool>,
46}
47
48impl GetVtxosRequest {
49    pub fn new() -> GetVtxosRequest {
50        GetVtxosRequest {
51            after: None,
52            before: None,
53            outpoints: None,
54            page: None,
55            pending_only: None,
56            recoverable_only: None,
57            scripts: None,
58            spendable_only: None,
59            spent_only: None,
60        }
61    }
62}