multiversx_sdk/data/transaction/transaction_status.rs
1use serde::{Deserialize, Serialize};
2
3/// Defines a response from the node holding the transaction status.
4///
5/// Corresponds to [`ResponseTxStatus`](https://github.com/multiversx/mx-chain-proxy-go/blob/master/data/transaction.go) in mx-chain-proxy-go.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct ResponseTxStatus {
8 pub status: String,
9}
10
11/// Response envelope for the `/transaction/{hash}/status` endpoint.
12/// The proxy constructs the data field inline; there is no named wrapper type in mx-chain-proxy-go.
13#[derive(Debug, Clone, Serialize, Deserialize)]
14pub struct TransactionStatus {
15 pub error: String,
16 pub code: String,
17 pub data: Option<ResponseTxStatus>,
18}