Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

Package publishing for deno.land/x/polkadot
Go to Latest
function getBlock
import { getBlock } from "https://deno.land/x/polkadot@0.2.11/api-derive/chain/index.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>