[docs] signatureSubscribe wording tweaks (#31996)
* fix: minor tweaks * refactor: updating wording * Update docs/src/api/websocket/_signatureSubscribe.mdx Co-authored-by: Steven Luscher <steveluscher@users.noreply.github.com> --------- Co-authored-by: Steven Luscher <steveluscher@users.noreply.github.com>
This commit is contained in:
parent
b361fdd399
commit
b1a303c8bf
|
@ -12,8 +12,8 @@ import {
|
||||||
|
|
||||||
## signatureSubscribe
|
## signatureSubscribe
|
||||||
|
|
||||||
Subscribe to a transaction signature, to receive notification when the given
|
Subscribe to receive a notification when the transaction with the given
|
||||||
transaction reaches the specified commitment level.
|
signature reaches the specified commitment level.
|
||||||
|
|
||||||
:::caution
|
:::caution
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ Configuration object containing the following fields:
|
||||||
|
|
||||||
<Field name="enableReceivedNotification" type="bool" optional={true}>
|
<Field name="enableReceivedNotification" type="bool" optional={true}>
|
||||||
|
|
||||||
Whether or not to recieve notifications when signatures are recieved by the RPC,
|
Whether or not to subscribe for notifications when signatures are received by
|
||||||
in addition to when they are processed.
|
the RPC, in addition to when they are processed.
|
||||||
|
|
||||||
</Field>
|
</Field>
|
||||||
|
|
||||||
|
@ -101,17 +101,19 @@ The notification will be an RpcResponse JSON object with value containing an
|
||||||
object with:
|
object with:
|
||||||
|
|
||||||
- `slot: <u64>` - The corresponding slot.
|
- `slot: <u64>` - The corresponding slot.
|
||||||
- `value: <object|string>` - notification response value of:
|
- `value: <object|string>` - a notification value of
|
||||||
- `err: <object|null>`: a
|
[`RpcSignatureResult`](https://github.com/solana-labs/solana/blob/6d28fd455b07e3557fc6c0c3ddf3ba03e3fe8482/rpc-client-api/src/response.rs#L265-L268),
|
||||||
[`RpcSignatureResult`](https://github.com/solana-labs/solana/blob/6d28fd455b07e3557fc6c0c3ddf3ba03e3fe8482/rpc-client-api/src/response.rs#L265)
|
resulting in either:
|
||||||
with a value of either:
|
- when `enableReceivedNotification` is `true` and the signature is received: the
|
||||||
- `null` if transaction succeeded in being processed at the specified
|
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: <object|null>`:
|
||||||
|
- `null` if the transaction succeeded in being processed at the specified
|
||||||
commitment level, or
|
commitment level, or
|
||||||
- a
|
- 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
|
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:
|
#### Example responses:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue