From b1a303c8bfe314e17ced10f6ce2cb317e44e4d83 Mon Sep 17 00:00:00 2001 From: Nick Frostbutter <75431177+nickfrosty@users.noreply.github.com> Date: Tue, 13 Jun 2023 10:22:22 -0400 Subject: [PATCH] [docs] signatureSubscribe wording tweaks (#31996) * fix: minor tweaks * refactor: updating wording * Update docs/src/api/websocket/_signatureSubscribe.mdx Co-authored-by: Steven Luscher --------- Co-authored-by: Steven Luscher --- .../src/api/websocket/_signatureSubscribe.mdx | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/src/api/websocket/_signatureSubscribe.mdx b/docs/src/api/websocket/_signatureSubscribe.mdx index 7b58baf30b..1c0d8f58fc 100644 --- a/docs/src/api/websocket/_signatureSubscribe.mdx +++ b/docs/src/api/websocket/_signatureSubscribe.mdx @@ -12,8 +12,8 @@ import { ## signatureSubscribe -Subscribe to a transaction signature, to receive notification when the given -transaction reaches the specified commitment level. +Subscribe to receive a notification when the transaction with the given +signature reaches the specified commitment level. :::caution @@ -54,8 +54,8 @@ Configuration object containing the following fields: -Whether or not to recieve notifications when signatures are recieved by the RPC, -in addition to when they are processed. +Whether or not to subscribe for notifications when signatures are received by +the RPC, in addition to when they are processed. @@ -101,17 +101,19 @@ The notification will be an RpcResponse JSON object with value containing an object with: - `slot: ` - The corresponding slot. -- `value: ` - notification response value of: - - `err: `: a - [`RpcSignatureResult`](https://github.com/solana-labs/solana/blob/6d28fd455b07e3557fc6c0c3ddf3ba03e3fe8482/rpc-client-api/src/response.rs#L265) - with a value of either: - - `null` if transaction succeeded in being processed at the specified +- `value: ` - a notification value of + [`RpcSignatureResult`](https://github.com/solana-labs/solana/blob/6d28fd455b07e3557fc6c0c3ddf3ba03e3fe8482/rpc-client-api/src/response.rs#L265-L268), + resulting in either: + - when `enableReceivedNotification` is `true` and the signature is received: the + literal string + [`"receivedSignature"`](https://github.com/solana-labs/solana/blob/6d28fd455b07e3557fc6c0c3ddf3ba03e3fe8482/rpc-client-api/src/response.rs#L286-L288), + or + - when the signature is processed: `err: `: + - `null` if the transaction succeeded in being processed at the specified commitment level, or - a - [`TransactionError`](https://github.com/solana-labs/solana/blob/6d28fd455b07e3557fc6c0c3ddf3ba03e3fe8482/sdk/src/transaction/error.rs#L15), + [`TransactionError`](https://github.com/solana-labs/solana/blob/6d28fd455b07e3557fc6c0c3ddf3ba03e3fe8482/sdk/src/transaction/error.rs#L15-L164), if the transaction failed - - when `enableReceivedNotification` is true, - [`ReceivedSignatureResult`](https://github.com/solana-labs/solana/blob/6d28fd455b07e3557fc6c0c3ddf3ba03e3fe8482/rpc-client-api/src/response.rs#L286) #### Example responses: