Skip to main content

multiversx_sdk/data/transaction/
multiple_transactions.rs

1use std::collections::HashMap;
2
3use serde::{Deserialize, Serialize};
4
5/// Holds the data which is returned when sending a bulk of transactions.
6///
7/// Corresponds to [`MultipleTransactionsResponseData`](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 MultipleTransactionsResponseData {
10    #[serde(rename = "txsSent")]
11    pub num_of_sent_txs: u64,
12    #[serde(rename = "txsHashes")]
13    pub txs_hashes: HashMap<u64, String>,
14}
15
16/// Defines a response from the node holding the number of transactions sent to the chain.
17///
18/// Corresponds to [`ResponseMultipleTransactions`](https://github.com/multiversx/mx-chain-proxy-go/blob/master/data/transaction.go) in mx-chain-proxy-go.
19#[derive(Debug, Clone, Serialize, Deserialize)]
20pub struct ResponseMultipleTransactions {
21    pub error: String,
22    pub code: String,
23    pub data: Option<MultipleTransactionsResponseData>,
24}