mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-16 18:38:05 +00:00
feat(api): Upgrade to v0.1.5 with improved event subscription API
This update includes the following improvements: - Version upgraded to 0.1.5 - Added subscribe_events_v2 API with more granular account filtering - Marked original subscribe_events API as deprecated - Fixed bug
This commit is contained in:
@@ -50,6 +50,10 @@ macro_rules! impl_unified_event {
|
||||
fn set_transfer_datas(&mut self, transfer_datas: Vec<$crate::streaming::event_parser::common::types::TransferData>) {
|
||||
self.metadata.transfer_datas = transfer_datas;
|
||||
}
|
||||
|
||||
fn index(&self) -> String {
|
||||
self.metadata.index.clone()
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -162,6 +162,7 @@ pub struct EventMetadata {
|
||||
pub event_type: EventType,
|
||||
pub program_id: Pubkey,
|
||||
pub transfer_datas: Vec<TransferData>,
|
||||
pub index: String,
|
||||
}
|
||||
|
||||
impl EventMetadata {
|
||||
@@ -174,6 +175,7 @@ impl EventMetadata {
|
||||
protocol: ProtocolType,
|
||||
event_type: EventType,
|
||||
program_id: Pubkey,
|
||||
index: String,
|
||||
) -> Self {
|
||||
Self {
|
||||
id,
|
||||
@@ -186,6 +188,7 @@ impl EventMetadata {
|
||||
event_type,
|
||||
program_id,
|
||||
transfer_datas: vec![],
|
||||
index,
|
||||
}
|
||||
}
|
||||
pub fn set_id(&mut self, id: String) {
|
||||
|
||||
Reference in New Issue
Block a user