Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
v1.14: [docs] clarify logsSubscribe mentions param (backport of #31225
Browse files Browse the repository at this point in the history
) (#31229)

[docs] clarify logsSubscribe `mentions` param (#31225)

* fix: clarify logsSubscribe mentions param

* Update docs/src/api/websocket/_logsSubscribe.mdx

Co-authored-by: Tyera <teulberg@gmail.com>

* Update docs/src/api/websocket/_logsSubscribe.mdx

Co-authored-by: Tyera <teulberg@gmail.com>

---------

Co-authored-by: Tyera <teulberg@gmail.com>
(cherry picked from commit 26bec21)

Co-authored-by: Nick Frostbutter <75431177+nickfrosty@users.noreply.github.com>
  • Loading branch information
mergify[bot] and nickfrosty authored Apr 18, 2023
1 parent ba61f14 commit 638b463
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions docs/src/api/websocket/_logsSubscribe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,26 @@ Subscribe to transaction logging
A string with one of the following values:

- `all` - subscribe to all transactions except for simple vote transactions
- `allWithVotes` - subscribe to all transactions including simple vote transactions
- `allWithVotes` - subscribe to all transactions, including simple vote
transactions

</Field>

<Field type="object">

An object with the following field:

- `mentions: [ <string> ]` - array of Pubkeys (as base-58 encoded strings) to listen for being mentioned in any transaction
- `mentions: [ <string> ]` - array containing a single Pubkey (as base-58
encoded string); if present, subscribe to only transactions mentioning this address

:::caution

Currently, the `mentions` field
[only supports one](https://github.com/solana-labs/solana/blob/master/rpc/src/rpc_pubsub.rs#L481)
Pubkey string per method call. Listing additional addresses will result in an
error.

:::

</Field>

Expand Down Expand Up @@ -100,8 +111,13 @@ Configuration object containing the following fields:
The notification will be an RpcResponse JSON object with value equal to:

- `signature: <string>` - The transaction signature base58 encoded.
- `err: <object|null>` - Error if transaction failed, null if transaction succeeded. [TransactionError definitions](https://github.com/solana-labs/solana/blob/c0c60386544ec9a9ec7119229f37386d9f070523/sdk/src/transaction/error.rs#L13)
- `logs: <array|null>` - Array of log messages the transaction instructions output during execution, null if simulation failed before the transaction was able to execute (for example due to an invalid blockhash or signature verification failure)
- `err: <object|null>` - Error if transaction failed, null if transaction
succeeded.
[TransactionError definitions](https://github.com/solana-labs/solana/blob/c0c60386544ec9a9ec7119229f37386d9f070523/sdk/src/transaction/error.rs#L13)
- `logs: <array|null>` - Array of log messages the transaction instructions
output during execution, null if simulation failed before the transaction was
able to execute (for example due to an invalid blockhash or signature
verification failure)

Example:

Expand Down

0 comments on commit 638b463

Please sign in to comment.