1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
/*
* CryptoAPIs
*
* Crypto APIs is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockchain applications. Crypto APIs provides unified endpoints and data, raw data, automatic tokens and coins forwardings, callback functionalities, and much more.
*
* The version of the OpenAPI document: 2021-03-20
* Contact: developers@cryptoapis.io
* Generated by: https://openapi-generator.tech
*/
/// DecodeRawTransactionHexRis : Represents the specific transaction data according to the blockchain
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DecodeRawTransactionHexRis {
/// Represents the locktime on the transaction on the specific blockchain, i.e. the blockheight at which the transaction is valid.
#[serde(rename = "locktime")]
pub locktime: i32,
/// Represents the same as transactionId for account-based protocols like Ethereum, while it could be different in UTXO-based protocols like Bitcoin. E.g., in UTXO-based protocols hash is different from transactionId for SegWit transactions.
#[serde(rename = "transactionHash")]
pub transaction_hash: String,
/// Represents the virtual size of this transaction.
#[serde(rename = "vSize")]
pub v_size: i32,
/// Represents the transaction version number.
#[serde(rename = "version")]
pub version: i32,
/// Represents the Inputs of the transaction
#[serde(rename = "vin")]
pub vin: Vec<crate::models::DecodeRawTransactionHexRiszVin>,
/// Represents the Inputs of the transaction
#[serde(rename = "vout")]
pub vout: Vec<crate::models::DecodeRawTransactionHexRiszVout>,
/// Represents the size of a block, measured in weight units and including the segwit discount.
#[serde(rename = "weight", skip_serializing_if = "Option::is_none")]
pub weight: Option<i32>,
/// Defines the approximate fee value. When isConfirmed is True - Defines the amount of the transaction fee When isConfirmed is False - For ETH-based blockchains this attribute represents the max fee value.
#[serde(rename = "approximateFee", skip_serializing_if = "Option::is_none")]
pub approximate_fee: Option<String>,
/// Defines the approximate minimum fee that is required for the transaction.
#[serde(rename = "approximateMinimumRequiredFee", skip_serializing_if = "Option::is_none")]
pub approximate_minimum_required_fee: Option<String>,
/// Represents the amount of gas used by this specific transaction alone.
#[serde(rename = "gasLimit")]
pub gas_limit: String,
/// Represents the amount of gas paid for the data in the transaction.
#[serde(rename = "gasPaidForData", skip_serializing_if = "Option::is_none")]
pub gas_paid_for_data: Option<String>,
/// Represents the price offered to the miner to purchase this amount of gas.
#[serde(rename = "gasPrice", skip_serializing_if = "Option::is_none")]
pub gas_price: Option<String>,
/// Represents additional information that is required for the transaction.
#[serde(rename = "inputData", skip_serializing_if = "Option::is_none")]
pub input_data: Option<String>,
/// Defines the maximum amount that customer is willing to pay per unit of gas to get his transaction included in a block.
#[serde(rename = "maxFeePerGas", skip_serializing_if = "Option::is_none")]
pub max_fee_per_gas: Option<String>,
/// Represents determined by the user value that is paid directly to miners.
#[serde(rename = "maxFeePriorityPerGas", skip_serializing_if = "Option::is_none")]
pub max_fee_priority_per_gas: Option<String>,
/// Represents the sequential running number for an address, starting from 0 for the first transaction. E.g., if the nonce of a transaction is 10, it would be the 11th transaction sent from the sender's address.
#[serde(rename = "nonce")]
pub nonce: i32,
/// Represents output of an ECDSA signature.
#[serde(rename = "r", skip_serializing_if = "Option::is_none")]
pub r: Option<String>,
/// The address which receives this transaction. In UTXO-based protocols like Bitcoin there could be several senders while in account-based protocols like Ethereum there is always only one recipient.
#[serde(rename = "recipient")]
pub recipient: String,
/// Represents output of an ECDSA signature.
#[serde(rename = "s", skip_serializing_if = "Option::is_none")]
pub s: Option<String>,
/// Represents the address which sends this transaction. In UTXO-based protocols like Bitcoin there could be several senders while in account-based protocols like Ethereum there is always only one sender.
#[serde(rename = "sender")]
pub sender: String,
/// Specifies the transaction type as one from three options: if response returns a `\"0\"` it means the raw transaction includes legacy transaction data, if it is `\"1\"` - includes access lists for EIP2930, and if it is `\"2\"` - EIP1559 data.
#[serde(rename = "type")]
pub _type: i32,
/// Defines the the recovery id.
#[serde(rename = "v", skip_serializing_if = "Option::is_none")]
pub v: Option<String>,
/// Represents the sent/received amount.
#[serde(rename = "value", skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// Represents a block height after which the transaction will expire.
#[serde(rename = "expiryHeight")]
pub expiry_height: i32,
/// \"Overwinter\" is the network upgrade for the Zcash blockchain.
#[serde(rename = "overwintered")]
pub overwintered: bool,
/// Defines if the transaction includes sapling or not.
#[serde(rename = "saplinged")]
pub saplinged: bool,
/// Defines the transaction value balance.
#[serde(rename = "valueBalance")]
pub value_balance: String,
/// Represents the transaction version group ID
#[serde(rename = "versionGroupId")]
pub version_group_id: String,
}
impl DecodeRawTransactionHexRis {
/// Represents the specific transaction data according to the blockchain
pub fn new(locktime: i32, transaction_hash: String, v_size: i32, version: i32, vin: Vec<crate::models::DecodeRawTransactionHexRiszVin>, vout: Vec<crate::models::DecodeRawTransactionHexRiszVout>, gas_limit: String, nonce: i32, recipient: String, sender: String, _type: i32, expiry_height: i32, overwintered: bool, saplinged: bool, value_balance: String, version_group_id: String) -> DecodeRawTransactionHexRis {
DecodeRawTransactionHexRis {
locktime,
transaction_hash,
v_size,
version,
vin,
vout,
weight: None,
approximate_fee: None,
approximate_minimum_required_fee: None,
gas_limit,
gas_paid_for_data: None,
gas_price: None,
input_data: None,
max_fee_per_gas: None,
max_fee_priority_per_gas: None,
nonce,
r: None,
recipient,
s: None,
sender,
_type,
v: None,
value: None,
expiry_height,
overwintered,
saplinged,
value_balance,
version_group_id,
}
}
}