Type Alias hedera::AnyTransaction
source · pub type AnyTransaction = Transaction<AnyTransactionData>;Expand description
Any possible transaction that may be executed on the Hedera network.
Aliased Type§
struct AnyTransaction { /* private fields */ }Implementations§
source§impl AnyTransaction
impl AnyTransaction
sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Examples
use hedera::AnyTransaction;
let bytes = hex::decode(concat!(
"0a522a500a4c0a120a0c0885c8879e0610a8bdd9840312021865120218061880",
"94ebdc0322020877320c686920686173686772617068721a0a180a0a0a021802",
"108088debe010a0a0a02186510ff87debe0112000a522a500a4c0a120a0c0885",
"c8879e0610a8bdd984031202186512021807188094ebdc0322020877320c6869",
"20686173686772617068721a0a180a0a0a021802108088debe010a0a0a021865",
"10ff87debe011200"
)).unwrap();
let tx = AnyTransaction::from_bytes(&bytes)?;Errors
Error::FromProtobufif a valid transaction cannot be parsed from the bytes.