diff --git a/src/jito/mod.rs b/src/jito/mod.rs index 7151c10..2ef8d93 100755 --- a/src/jito/mod.rs +++ b/src/jito/mod.rs @@ -92,4 +92,14 @@ impl JitoClient { let bundles = vec![VersionedTransaction::from(transaction.clone())]; Ok(self.client.send_bundle(&bundles).await?) } + + pub async fn send_transactions( + &self, + transactions: &Vec, + ) -> Result { + let bundles: Vec = transactions.iter() + .map(|t| VersionedTransaction::from(t.clone())) + .collect(); // 显式指定类型 + Ok(self.client.send_bundle(&bundles).await?) + } }