With let output = client.get_output(&output_id).await?;
I get the output like in this example https://wiki.iota.org/shimmer/iota.rs/how_tos/get_output/
How do I get transaction_id
and amount
?
Iota Stack Exchange is a question and answer site for users of Iota, the open-source cryptocurrency for IoT that does not use a blockchain. It only takes a minute to sign up.
Sign up to join this communityWith let output = client.get_output(&output_id).await?;
I get the output like in this example https://wiki.iota.org/shimmer/iota.rs/how_tos/get_output/
How do I get transaction_id
and amount
?
The output id already contains the transaction id, so you can also get it from there
let transaction_id = output_id.transaction_id();
let transaction_id = output.metadata.transaction_id;
let output_amount = Output::try_from_dto_unverified(&output.output)?.amount();
Credit goes to clever and Thoralf on the IOTA&Shimmer Discord