react-use-ark
Version:
Hook to easily access ARK blockchain Ѧ API in React application
24 lines (23 loc) • 1.03 kB
TypeScript
import { Network } from '../../common/network';
import { IBlockResponse, IBlocksResponse } from './interfaces';
/**
* Get latest blocks.
* @param page The number of the page that will be returned.
* @param limit The number of resources per page.
* @param fetchOnMount
* @param network
*/
export declare const useBlocksLatest: (page?: number, limit?: number, fetchOnMount?: boolean, network?: Network) => [import("../../utils/reducer").State<IBlocksResponse>, () => Promise<void>];
/**
* Get last block.
* @param fetchOnMount
* @param network
*/
export declare const useBlocksLast: (fetchOnMount?: boolean, network?: Network) => [import("../../utils/reducer").State<IBlocksResponse>, () => Promise<void>];
/**
* Find block by ID.
* @param id The ID of the block to be retrieved.
* @param fetchOnMount
* @param network
*/
export declare const useBlocksFindById: (id: string, fetchOnMount?: boolean, network?: Network) => [import("../../utils/reducer").State<IBlockResponse>, () => Promise<void>];