Module

x/polkadot/api-derive/chain/getHeader.ts>getHeader

Package publishing for deno.land/x/polkadot
Go to Latest
function getHeader
import { getHeader } from "https://dotland.deno.dev/x/polkadot@0.2.38/api-derive/chain/getHeader.ts";

Examples

const { author, number } = await api.derive.chain.getHeader('0x123...456');

console.log(`block #${number} was authored by ${author}`);

Parameters

instanceId: string
  • A block hash as U8 array or string.

Returns

(blockHash: Uint8Array | string) => Observable<HeaderExtended>

An array containing the block header and the block author