@bigmi/core
Version:
TypeScript library for Bitcoin apps.
18 lines (17 loc) • 836 B
TypeScript
import type { UTXOSchema } from '../transports/types.js';
import type { Account } from '../types/account.js';
import type { BlockStats, BlockStatsKeys } from '../types/blockStats.js';
import type { Chain } from '../types/chain.js';
import type { Client } from '../types/client.js';
import type { Transport } from '../types/transport.js';
export type GetBlockStatsParameters = ({
blockHash: string;
blockNumber?: never;
} | {
blockHash?: never;
blockNumber: number;
}) & {
stats?: Array<BlockStatsKeys>;
};
export type GetBlockStatsReturnType = BlockStats;
export declare function getBlockStats<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, { blockHash, blockNumber, stats }: GetBlockStatsParameters): Promise<GetBlockStatsReturnType>;