Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added blockheight to BlockResponse and VersionedBlockResponse #3625

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,8 @@ export type ParsedTransactionWithMeta = {
* A processed block fetched from the RPC API
*/
export type BlockResponse = {
/** Block height of this block */
blockHeight: number | null;
/** Blockhash of this block */
blockhash: Blockhash;
/** Blockhash of this block's parent */
Expand Down Expand Up @@ -1410,6 +1412,8 @@ export type ParsedNoneModeBlockResponse = Omit<
* A processed block fetched from the RPC API
*/
export type VersionedBlockResponse = {
/** Block height of this block */
blockHeight: number | null;
/** Blockhash of this block */
blockhash: Blockhash;
/** Blockhash of this block's parent */
Expand Down Expand Up @@ -1995,6 +1999,7 @@ const GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(
err: TransactionErrorResult,
memo: nullable(string()),
blockTime: optional(nullable(number())),
blockHeight: nullable(number()),
}),
),
);
Expand All @@ -2010,6 +2015,7 @@ const GetSignaturesForAddressRpcResult = jsonRpcResult(
err: TransactionErrorResult,
memo: nullable(string()),
blockTime: optional(nullable(number())),
blockHeight: nullable(number()),
}),
),
);
Expand Down Expand Up @@ -2550,6 +2556,7 @@ const GetConfirmedBlockRpcResult = jsonRpcResult(
),
rewards: optional(array(RewardsResult)),
blockTime: nullable(number()),
blockHeight: nullable(number()),
}),
),
);
Expand All @@ -2565,6 +2572,7 @@ const GetBlockSignaturesRpcResult = jsonRpcResult(
parentSlot: number(),
signatures: array(string()),
blockTime: nullable(number()),
blockHeight: nullable(number()),
}),
),
);
Expand Down