diff --git a/subxt/src/rpc/rpc.rs b/subxt/src/rpc/rpc.rs index a0e42828a8..d0aa8ffa12 100644 --- a/subxt/src/rpc/rpc.rs +++ b/subxt/src/rpc/rpc.rs @@ -624,6 +624,24 @@ impl Rpc { Ok(subscription) } + /// Subscribe to the chain head body. + pub async fn subscribe_chainhead_body( + &self, + hash: T::Hash, + subscription_id: String, + ) -> Result>, Error> { + let subscription = self + .client + .subscribe( + "chainHead_unstable_body", + rpc_params![subscription_id, hash], + "chainHead_unstable_stopBody", + ) + .await?; + + Ok(subscription) + } + /// Subscribe to finalized block headers. /// /// Note: this may not produce _every_ block in the finalized chain;