use orbitflare_sdk::proto::geyser::subscribe_update::UpdateOneof;
while let Some(update) = stream.next().await {
let update = update?;
match update.update_oneof {
Some(UpdateOneof::Transaction(tx)) => {
// tx.slot - the slot this transaction was in
// tx.transaction - the transaction info (signature, accounts, instructions, meta)
}
Some(UpdateOneof::Account(acct)) => {
// acct.slot - the slot
// acct.account - account info (pubkey, lamports, owner, data)
// acct.is_startup - true during initial account snapshot
}
Some(UpdateOneof::Slot(slot)) => {
// slot.slot - the slot number
// slot.status - processed, confirmed, finalized, etc.
}
Some(UpdateOneof::BlockMeta(meta)) => {
// meta.slot, meta.blockhash, meta.parent_slot
// meta.executed_transaction_count
}
_ => {}
}
}