Skip to main content

multiversx_sdk/data/transaction/
transaction_response_data.rs

1use serde::{Deserialize, Serialize};
2
3/// Represents the format of the data field of a transaction response.
4///
5/// Corresponds to [`TransactionResponseData`](https://github.com/multiversx/mx-chain-proxy-go/blob/master/data/transaction.go) in mx-chain-proxy-go.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(rename_all = "camelCase")]
8pub struct TransactionResponseData {
9    pub tx_hash: String,
10}
11
12/// Response envelope holding the resulting transaction hash.
13///
14/// Corresponds to [`ResponseTransaction`](https://github.com/multiversx/mx-chain-proxy-go/blob/master/data/transaction.go) in mx-chain-proxy-go.
15#[derive(Debug, Clone, Serialize, Deserialize)]
16pub struct ResponseTransaction {
17    pub error: String,
18    pub code: String,
19    pub data: Option<TransactionResponseData>,
20}