UNPKG

blockchain-api

Version:

API utilities for interacting with the Exatechl2 blockchain

32 lines (31 loc) 832 B
import { FormattedBlock } from './utils'; import { EnhancedBlock } from '../../types'; export interface ExportResult { content: string; filename: string; dataType: string; } /** * * @param {FormattedBlock} block * @returns {Object} */ export declare function formatBlockForJsonExport(block: FormattedBlock | EnhancedBlock): Record<string, any>; /** * * @returns {string} */ export declare function getBlockCsvHeaders(): string; /** * * @param {FormattedBlock} block * @returns {string} */ export declare function formatBlockForCsvExport(block: FormattedBlock | EnhancedBlock): string; /** * * @param {FormattedBlock} block * @param {string} format * @returns {ExportResult} */ export declare function formatBlockDataForExport(block: FormattedBlock | EnhancedBlock, format: 'json' | 'csv'): ExportResult;