Skip to main content
Deno 2 is finally 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.16/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.

Returns

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