import JSONRequest from '../jsonrequest.js'; import { HTTPClient, HTTPClientResponse } from '../../client.js'; import { BlockResponse } from './models/types.js'; /** * block gets the block info for the given round. this call may block */ export default class Block extends JSONRequest { private round; constructor(c: HTTPClient, roundNumber: number | bigint); path(): string; /** * If true, only the block header (exclusive of payset or certificate) may be included in response. * * #### Example * ```typescript * * const roundNumber = 41000000; * * const blockResponse = await algodClient * .block(roundNumber) * .headerOnly(true) * .do(); * ``` * * @param headerOnly - the flag indicating whether exclusively return header in response * @category query */ headerOnly(headerOnly: boolean): this; prepare(response: HTTPClientResponse): BlockResponse; }