isSolanaRpcResponse
Type-guards a notification as a SolanaRpcResponse envelope. Validates the shape by
duck-typing for context.slot: bigint and the presence of value.
The narrowed type is SolanaRpcResponse<UnwrapRpcResponse<T>>. In the false branch,
notification retains its original type.
Type Parameters
| Type Parameter | Description |
|---|---|
T | The notification shape, which may be a raw value, an envelope, or a union of the two. |
Parameters
| Parameter | Type | Description |
|---|---|---|
notification | | T | Readonly<{ context: Readonly<{ slot: Slot; }>; value: UnwrapRpcResponse; }> | The value to test. |
Returns
notification is Readonly<{ context: Readonly<{ slot: Slot }>; value: UnwrapRpcResponse }>
true when notification is a SolanaRpcResponse envelope, narrowing accordingly.