pub struct WebhooksApiClient { /* private fields */ }Expand description
Client for the Quicknode Webhooks REST API. Create webhooks from filter templates, manage their lifecycle, and update their destinations.
Implementations§
Source§impl WebhooksApiClient
impl WebhooksApiClient
pub fn new(config: SdkConfig) -> Self
Sourcepub async fn list_webhooks(
&self,
params: &GetWebhooksParams,
) -> Result<ListWebhooksResponse, SdkError>
pub async fn list_webhooks( &self, params: &GetWebhooksParams, ) -> Result<ListWebhooksResponse, SdkError>
Returns a paginated list of webhooks on the account. Each entry includes
the webhook’s identifier, creation timestamp, name, network, notification
email, destination configuration (URL, security token, compression),
current status, and any associated template. The response also includes
a pageInfo object with the applied limit, offset, and total count.
Sourcepub async fn delete_all_webhooks(&self) -> Result<(), SdkError>
pub async fn delete_all_webhooks(&self) -> Result<(), SdkError>
Removes every webhook on the account. Destructive and takes no parameters.
Sourcepub async fn get_webhook(&self, id: &str) -> Result<Webhook, SdkError>
pub async fn get_webhook(&self, id: &str) -> Result<Webhook, SdkError>
Fetches a single webhook’s full configuration and status by ID. Returns creation timestamp, name, network, notification email, destination configuration (URL, security token, compression), the sequence number of the last successfully delivered block, the current status, and the associated template with its arguments.
Sourcepub async fn update_webhook(
&self,
id: &str,
params: &UpdateWebhookParams,
) -> Result<Webhook, SdkError>
pub async fn update_webhook( &self, id: &str, params: &UpdateWebhookParams, ) -> Result<Webhook, SdkError>
Modifies an existing webhook’s configuration. Supports updating the
webhook’s name, notification email, and destination attributes (URL,
security token, and compression — none or gzip). All fields are
optional, so partial updates are supported; if the security token is
omitted on update, one is generated automatically. Returns the
webhook’s full updated configuration.
Sourcepub async fn delete_webhook(&self, id: &str) -> Result<(), SdkError>
pub async fn delete_webhook(&self, id: &str) -> Result<(), SdkError>
Permanently removes a single webhook by ID.
Sourcepub async fn pause_webhook(&self, id: &str) -> Result<(), SdkError>
pub async fn pause_webhook(&self, id: &str) -> Result<(), SdkError>
Pauses a webhook by ID so it stops delivering events until reactivated.
Sourcepub async fn activate_webhook(
&self,
id: &str,
params: &ActivateWebhookParams,
) -> Result<(), SdkError>
pub async fn activate_webhook( &self, id: &str, params: &ActivateWebhookParams, ) -> Result<(), SdkError>
Activates a previously created or paused webhook so it begins (or
resumes) delivering events. start_from determines where processing
resumes: Latest begins from the newest available block; other values
replay from an earlier point.
Sourcepub async fn get_enabled_count(
&self,
) -> Result<WebhookEnabledCountResponse, SdkError>
pub async fn get_enabled_count( &self, ) -> Result<WebhookEnabledCountResponse, SdkError>
Returns the total number of enabled webhooks currently configured on the account.
Sourcepub async fn create_webhook_from_template(
&self,
params: &CreateWebhookFromTemplateParams,
) -> Result<Webhook, SdkError>
pub async fn create_webhook_from_template( &self, params: &CreateWebhookFromTemplateParams, ) -> Result<Webhook, SdkError>
Creates a new webhook from a predefined filter template. Requires a
descriptive name, a target blockchain network, and destination
attributes (URL, optional security token — auto-generated when omitted,
and optional compression — gzip or none). template_args carries
template-specific configuration such as wallet addresses or contract
filters. An optional notification_email receives alerts if the
webhook terminates.
Sourcepub async fn update_webhook_template(
&self,
webhook_id: &str,
params: &UpdateWebhookTemplateParams,
) -> Result<Webhook, SdkError>
pub async fn update_webhook_template( &self, webhook_id: &str, params: &UpdateWebhookTemplateParams, ) -> Result<Webhook, SdkError>
Updates an existing template-backed webhook, modifying its template
arguments and optionally its name, notification email, and destination
attributes (URL, security token, compression — none or gzip).
All optional fields support partial updates; a security token is
generated automatically if not provided. Templates cover EVM chains,
Solana, Bitcoin, XRPL, Hyperliquid, and Stellar.
Trait Implementations§
Source§impl Clone for WebhooksApiClient
impl Clone for WebhooksApiClient
Source§fn clone(&self) -> WebhooksApiClient
fn clone(&self) -> WebhooksApiClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more