multiversx_sdk/data/transaction/get_transaction_response.rs
1use serde::{Deserialize, Serialize};
2
3use super::api_transaction_result::ApiTransactionResult;
4
5/// Follows the format of the data field of a get transaction response.
6///
7/// Corresponds to [`GetTransactionResponseData`](https://github.com/multiversx/mx-chain-proxy-go/blob/master/data/transaction.go) in mx-chain-proxy-go.
8#[derive(Debug, Clone, Serialize, Deserialize)]
9pub struct GetTransactionResponseData {
10 pub transaction: ApiTransactionResult,
11}
12
13/// Defines a response from the node holding the transaction sent from the chain.
14///
15/// Corresponds to [`GetTransactionResponse`](https://github.com/multiversx/mx-chain-proxy-go/blob/master/data/transaction.go) in mx-chain-proxy-go.
16#[derive(Debug, Clone, Serialize, Deserialize)]
17pub struct GetTransactionResponse {
18 #[serde(default)]
19 pub error: String,
20 pub code: String,
21 pub data: Option<GetTransactionResponseData>,
22}