PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/@polkadot/api-derive/chain

Просмотр файла: getBlock.d.ts

import type { Observable } from 'rxjs';
import type { SignedBlockExtended } from '../type/types.js';
import type { DeriveApi } from '../types.js';
/**
 * @name getBlock
 * @param {( Uint8Array | string )} hash - A block hash as U8 array or string.
 * @description Get a specific block (e.g. rpc.chain.getBlock) and extend it with the author
 * @example
 * <BR>
 *
 * ```javascript
 * const { author, block } = await api.derive.chain.getBlock('0x123...456');
 *
 * console.log(`block #${block.header.number} was authored by ${author}`);
 * ```
 */
export declare function getBlock(instanceId: string, api: DeriveApi): (hash: Uint8Array | string) => Observable<SignedBlockExtended>;

Выполнить команду


Для локальной разработки. Не используйте в интернете!