Parameters
- filterstring
The filter criteria for the logs to receive results by account type. Currently it supports the following params:
- stringstring
The string 'all' which includes all transactions in a block
- objectobject
A JSON object with the following field:
- mentionsAccountOrProgramstring
Only retrieve transactions that reference the specified public key as a base-58 encoded string. If a block contains no such references, no notifications will be generated
- objectobject
(Optional) A configuration object containing the following fields:
- commitmentstring
The level of commitment required for the query. The options include:
- finalizedstring
The node will query the most recent block the cluster has recognized as finalized
- confirmedstring
The node will query the most recent block that has been voted on by the supermajority of the cluster
- transactionDetailsstring
(Default: full) The level of transaction detail to return, either 'full', 'accounts', 'signatures', or 'none'
- maxSupportedTransactionVersioninteger
The maximum transaction version to return, as a JSON integer. Set it to 1 to receive legacy, version 0, and version 1 transactions
- showRewardsboolean
Indicated whether to populate the 'rewards' array
- encodingstring
The encoding format for account data. It can be one of base58 (slow), base64, base64+zstd or jsonParsed
Returns
- resultinteger
The subscription id
- blockNotificationobject
The notification object with the following fields:
- slotinteger
The corresponding slot
- errobject
Error if something went wrong publishing the notification otherwise null
- blockobject
A block object as seen in the getBlock RPC HTTP method
1{2"jsonrpc": "2.0",3"result": 0,4"id": 15}
1{2"jsonrpc": "2.0",3"result": 0,4"id": 15}