exonum-explorer-react
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Exonum Explorer React

Installation

npm i exonum-explorer-react

Usage

import { BlockchainExplorer, BlockPage, TxPage, BlockList } from 'exonum-explorer-react'

const Explorer = ()=> {
    return (
        <BlockchainExplorer nodes={['https://node1.com', 'https://node2.com']}>
          
          /* Block page */
          <BlockPage height='BLOCK_HEIGHT'>
            /* Block rendering function */
            {block => <div>{block.height}</div>}
          </BlockPage>

          /* Transaction page */
          <TxPage hash='TX_HASH'>
            /* Transaction rendering function */
            {tx => <div>{tx.type}</div>}
          </TxPage>

          /* Block list page */
          <BlockList page={1} perPage={200}>
            /* Block list rendering function */
            {({blocks})=>
                {<div>{blocks.map(
                  block => <div>{block.height}</div>)}
                </div>}}
          </BlockList>
        </BlockchainExplorer>)
}

/exonum-explorer-react/

    Package Sidebar

    Install

    npm i exonum-explorer-react

    Weekly Downloads

    0

    Version

    0.0.2

    License

    Apache-2.0

    Unpacked Size

    297 kB

    Total Files

    38

    Last publish

    Collaborators

    • exonum-ci