Skip to main content

WebhooksApiClient

Struct WebhooksApiClient 

Source
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

Source

pub fn new(config: SdkConfig) -> Self

Source

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.

Source

pub async fn delete_all_webhooks(&self) -> Result<(), SdkError>

Removes every webhook on the account. Destructive and takes no parameters.

Source

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.

Source

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.

Source

pub async fn delete_webhook(&self, id: &str) -> Result<(), SdkError>

Permanently removes a single webhook by ID.

Source

pub async fn pause_webhook(&self, id: &str) -> Result<(), SdkError>

Pauses a webhook by ID so it stops delivering events until reactivated.

Source

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.

Source

pub async fn get_enabled_count( &self, ) -> Result<WebhookEnabledCountResponse, SdkError>

Returns the total number of enabled webhooks currently configured on the account.

Source

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.

Source

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

Source§

fn clone(&self) -> WebhooksApiClient

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WebhooksApiClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more