Skip to content

Commit

Permalink
update pubsub docs link (solana-labs#34380)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvja authored Dec 9, 2023
1 parent a1d2d6f commit 1714c80
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions pubsub-client/src/nonblocking/pubsub_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! The [`PubsubClient`] implements [Solana WebSocket event
//! subscriptions][spec].
//!
//! [spec]: https://docs.solana.com/developing/clients/jsonrpc-api#subscription-websocket
//! [spec]: https://docs.solana.com/api/websocket#subscription-websocket
//!
//! This is a nonblocking (async) API. For a blocking API use the synchronous
//! client in [`crate::pubsub_client`].
Expand Down Expand Up @@ -366,7 +366,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`accountSubscribe`] RPC method.
///
/// [`accountSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#accountsubscribe
/// [`accountSubscribe`]: https://docs.solana.com/api/websocket#accountsubscribe
pub async fn account_subscribe(
&self,
pubkey: &Pubkey,
Expand All @@ -387,7 +387,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`blockSubscribe`] RPC method.
///
/// [`blockSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#blocksubscribe---unstable-disabled-by-default
/// [`blockSubscribe`]: https://docs.solana.com/api/websocket#blocksubscribe
pub async fn block_subscribe(
&self,
filter: RpcBlockSubscribeFilter,
Expand All @@ -404,7 +404,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`logsSubscribe`] RPC method.
///
/// [`logsSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#logssubscribe
/// [`logsSubscribe`]: https://docs.solana.com/api/websocket#logssubscribe
pub async fn logs_subscribe(
&self,
filter: RpcTransactionLogsFilter,
Expand All @@ -422,7 +422,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`programSubscribe`] RPC method.
///
/// [`programSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#programsubscribe
/// [`programSubscribe`]: https://docs.solana.com/api/websocket#programsubscribe
pub async fn program_subscribe(
&self,
pubkey: &Pubkey,
Expand Down Expand Up @@ -458,7 +458,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`voteSubscribe`] RPC method.
///
/// [`voteSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#votesubscribe---unstable-disabled-by-default
/// [`voteSubscribe`]: https://docs.solana.com/api/websocket#votesubscribe
pub async fn vote_subscribe(&self) -> SubscribeResult<'_, RpcVote> {
self.subscribe("vote", json!([])).await
}
Expand All @@ -474,7 +474,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`rootSubscribe`] RPC method.
///
/// [`rootSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#rootsubscribe
/// [`rootSubscribe`]: https://docs.solana.com/api/websocket#rootsubscribe
pub async fn root_subscribe(&self) -> SubscribeResult<'_, Slot> {
self.subscribe("root", json!([])).await
}
Expand All @@ -491,7 +491,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`signatureSubscribe`] RPC method.
///
/// [`signatureSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#signaturesubscribe
/// [`signatureSubscribe`]: https://docs.solana.com/api/websocket#signaturesubscribe
pub async fn signature_subscribe(
&self,
signature: &Signature,
Expand All @@ -509,7 +509,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`slotSubscribe`] RPC method.
///
/// [`slotSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#slotsubscribe
/// [`slotSubscribe`]: https://docs.solana.com/api/websocket#slotsubscribe
pub async fn slot_subscribe(&self) -> SubscribeResult<'_, SlotInfo> {
self.subscribe("slot", json!([])).await
}
Expand All @@ -527,7 +527,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`slotUpdatesSubscribe`] RPC method.
///
/// [`slotUpdatesSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#slotsupdatessubscribe---unstable
/// [`slotUpdatesSubscribe`]: https://docs.solana.com/api/websocket#slotsupdatessubscribe
pub async fn slot_updates_subscribe(&self) -> SubscribeResult<'_, SlotUpdate> {
self.subscribe("slotsUpdates", json!([])).await
}
Expand Down
20 changes: 10 additions & 10 deletions pubsub-client/src/pubsub_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! The [`PubsubClient`] implements [Solana WebSocket event
//! subscriptions][spec].
//!
//! [spec]: https://docs.solana.com/developing/clients/jsonrpc-api#subscription-websocket
//! [spec]: https://docs.solana.com/api/websocket
//!
//! This is a blocking API. For a non-blocking API use the asynchronous client
//! in [`crate::nonblocking::pubsub_client`].
Expand Down Expand Up @@ -369,7 +369,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`accountSubscribe`] RPC method.
///
/// [`accountSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#accountsubscribe
/// [`accountSubscribe`]: https://docs.solana.com/api/websocket#accountsubscribe
pub fn account_subscribe(
url: &str,
pubkey: &Pubkey,
Expand Down Expand Up @@ -422,7 +422,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`blockSubscribe`] RPC method.
///
/// [`blockSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#blocksubscribe---unstable-disabled-by-default
/// [`blockSubscribe`]: https://docs.solana.com/api/websocket#blocksubscribe
pub fn block_subscribe(
url: &str,
filter: RpcBlockSubscribeFilter,
Expand Down Expand Up @@ -470,7 +470,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`logsSubscribe`] RPC method.
///
/// [`logsSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#logssubscribe
/// [`logsSubscribe`]: https://docs.solana.com/api/websocket#logssubscribe
pub fn logs_subscribe(
url: &str,
filter: RpcTransactionLogsFilter,
Expand Down Expand Up @@ -519,7 +519,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`programSubscribe`] RPC method.
///
/// [`programSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#programsubscribe
/// [`programSubscribe`]: https://docs.solana.com/api/websocket#programsubscribe
pub fn program_subscribe(
url: &str,
pubkey: &Pubkey,
Expand Down Expand Up @@ -584,7 +584,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`voteSubscribe`] RPC method.
///
/// [`voteSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#votesubscribe---unstable-disabled-by-default
/// [`voteSubscribe`]: https://docs.solana.com/api/websocket#votesubscribe
pub fn vote_subscribe(url: &str) -> Result<VoteSubscription, PubsubClientError> {
let url = Url::parse(url)?;
let socket = connect_with_retry(url)?;
Expand Down Expand Up @@ -629,7 +629,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`rootSubscribe`] RPC method.
///
/// [`rootSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#rootsubscribe
/// [`rootSubscribe`]: https://docs.solana.com/api/websocket#rootsubscribe
pub fn root_subscribe(url: &str) -> Result<RootSubscription, PubsubClientError> {
let url = Url::parse(url)?;
let socket = connect_with_retry(url)?;
Expand Down Expand Up @@ -675,7 +675,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`signatureSubscribe`] RPC method.
///
/// [`signatureSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#signaturesubscribe
/// [`signatureSubscribe`]: https://docs.solana.com/api/websocketi#signaturesubscribe
pub fn signature_subscribe(
url: &str,
signature: &Signature,
Expand Down Expand Up @@ -726,7 +726,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`slotSubscribe`] RPC method.
///
/// [`slotSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#slotsubscribe
/// [`slotSubscribe`]: https://docs.solana.com/api/websocket#slotsubscribe
pub fn slot_subscribe(url: &str) -> Result<SlotsSubscription, PubsubClientError> {
let url = Url::parse(url)?;
let socket = connect_with_retry(url)?;
Expand Down Expand Up @@ -774,7 +774,7 @@ impl PubsubClient {
///
/// This method corresponds directly to the [`slotUpdatesSubscribe`] RPC method.
///
/// [`slotUpdatesSubscribe`]: https://docs.solana.com/developing/clients/jsonrpc-api#slotsupdatessubscribe---unstable
/// [`slotUpdatesSubscribe`]: https://docs.solana.com/api/websocket#slotsupdatessubscribe
pub fn slot_updates_subscribe(
url: &str,
handler: impl Fn(SlotUpdate) + Send + 'static,
Expand Down

0 comments on commit 1714c80

Please sign in to comment.