Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

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

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

Examples

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

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

Parameters

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

Returns

(hash: Uint8Array | string) => Observable<SignedBlockExtended>