diff --git a/file_store/src/cli/dump.rs b/file_store/src/cli/dump.rs index 90155ecd4..588ae1c6c 100644 --- a/file_store/src/cli/dump.rs +++ b/file_store/src/cli/dump.rs @@ -2,9 +2,12 @@ use crate::{ cli::print_json, file_source, heartbeat::{CellHeartbeat, CellHeartbeatIngestReport}, + iot_packet::IotValidPacket, speedtest::{CellSpeedtest, CellSpeedtestIngestReport}, + traits::MsgDecode, FileType, Result, Settings, }; +use base64::Engine; use csv::Writer; use futures::stream::StreamExt; use helium_crypto::PublicKey; @@ -173,6 +176,16 @@ impl Cmd { "token_type": manifest.token_type(), }))?; } + FileType::IotValidPacket => { + let manifest = IotValidPacket::decode(msg)?; + print_json(&json!({ + "payload_size": manifest.payload_size, + "gateway": PublicKey::try_from(manifest.gateway)?, + "payload_hash": base64::engine::general_purpose::STANDARD.encode(manifest.payload_hash), + "num_dcs": manifest.num_dcs, + "packet_timestamp": manifest.packet_timestamp, + }))?; + } _ => (), } }