BlockNotificationsApi
Methods
blockNotifications()
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; showRewards: false; transactionDetails: "none"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: BlockNotificationsNotificationBlock | null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; showRewards?: true; transactionDetails: "none"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only signatures of transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; showRewards: false; transactionDetails: "signatures"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithSignatures
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only signatures of transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; showRewards?: true; transactionDetails: "signatures"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards & BlockNotificationsNotificationBlockWithSignatures
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion; showRewards: false; transactionDetails: "accounts"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForAccounts<BlockNotificationsMaxSupportedTransactionVersion>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: BlockNotificationsEncoding; showRewards: false; transactionDetails: "accounts"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForAccounts<void>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion; showRewards?: true; transactionDetails: "accounts"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards & BlockNotificationsNotificationBlockWithTransactions<TransactionForAccounts<BlockNotificationsMaxSupportedTransactionVersion>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: BlockNotificationsEncoding; showRewards?: true; transactionDetails: "accounts"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards & BlockNotificationsNotificationBlockWithTransactions<TransactionForAccounts<void>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "base58"; maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion; showRewards: false; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase58<BlockNotificationsMaxSupportedTransactionVersion>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "base58"; showRewards: false; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase58<void>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "base58"; maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion; showRewards?: true; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase58<BlockNotificationsMaxSupportedTransactionVersion>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "base58"; showRewards?: true; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase58<void>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "base64"; maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion; showRewards: false; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase64<BlockNotificationsMaxSupportedTransactionVersion>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "base64"; showRewards: false; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase64<void>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "base64"; maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion; showRewards?: true; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase64<BlockNotificationsMaxSupportedTransactionVersion>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "base64"; showRewards?: true; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase64<void>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "jsonParsed"; maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion; showRewards: false; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJsonParsed<BlockNotificationsMaxSupportedTransactionVersion>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "jsonParsed"; showRewards: false; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJsonParsed<void>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "jsonParsed"; maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion; showRewards?: true; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJsonParsed<BlockNotificationsMaxSupportedTransactionVersion>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding: "jsonParsed"; showRewards?: true; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJsonParsed<void>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: "json"; maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion; showRewards: false; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJson<BlockNotificationsMaxSupportedTransactionVersion>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: "json"; showRewards: false; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJson<void>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: "json"; maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion; showRewards?: true; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJson<BlockNotificationsMaxSupportedTransactionVersion>>
| null;
}>>
See
https://solana.com/docs/rpc/websocket/blocksubscribe
Call Signature
Subscribe to receive notifications anytime a new block reaches the specified level of commitment.
The notification format is the same as seen in the GetBlockApi.getBlock RPC HTTP method.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | BlockNotificationsFilter | Notifications will only be produced for blocks that match this filter. Only transactions that match this filter will be included in the block. |
config? | Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: BlockNotificationsEncoding; maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: BlockNotificationTransactionDetailsMode; }> & Readonly<{ encoding?: "json"; showRewards?: true; transactionDetails?: "full"; }> | - |
Returns
SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
block: | BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJson<void>>
| null;
}>>