UNPKG

@substrate/api-sidecar

Version:

REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.

38 lines (37 loc) 1.77 kB
import type { BlockHash } from '@polkadot/types/interfaces'; import type { ICoretimeChainInfo, ICoretimeCores, ICoretimeLeases, ICoretimeRegions, ICoretimeRelayInfo, ICoretimeRenewals, ICoretimeReservations } from '../../types/responses'; import { AbstractService } from '../AbstractService'; export declare class CoretimeService extends AbstractService { private getAndDecodeRegions; private getAndDecodeLeases; private getAndDecodeWorkload; private getAndDecodeWorkplan; private getAndDecodeSaleInfo; private getAndDecodeStatus; private getAndDecodeConfiguration; private getAndDecodePotentialRenewals; private getAndDecodeReservations; private getAndDecodeCoreSchedules; private getAndDecodeCoreDescriptors; private getAndDecodeParachainsLifecycle; private leadinFactorAt; private getCorePriceAt; private getPhaseConfiguration; private getCurrentRegionStartEndTs; getCoretimeInfo(hash: BlockHash): Promise<ICoretimeRelayInfo | ICoretimeChainInfo>; getCoretimeLeases(hash: BlockHash): Promise<ICoretimeLeases>; getCoretimeRegions(hash: BlockHash): Promise<ICoretimeRegions>; getCoretimeReservations(hash: BlockHash): Promise<ICoretimeReservations>; getCoretimeRenewals(hash: BlockHash): Promise<ICoretimeRenewals>; getCoretimeCores(hash: BlockHash): Promise<ICoretimeCores>; /** * Coretime pallets and modules are not available on all runtimes. This * verifies that by checking if the module exists. If it doesnt it will throw an error * * @param queryFn The QueryModuleStorage key that we want to check exists * @param mod Module we are checking */ private assertQueryModule; private getChainType; private assertCoretimeModule; }