@apexfusionfoundation/blockfrost-js
Version:
A JavaScript/TypeScript SDK for interacting with the https://blockfrost.io API
150 lines (149 loc) • 7.97 kB
TypeScript
import { AllMethodOptions, PaginationOptions } from '../../../types';
import { components } from '@blockfrost/openapi';
import { BlockFrostAPI } from '../../../index';
/**
* Obtains information about a specific epoch.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D/get | API docs for Specific epoch}
*
* @param number - Number of the epoch
* @returns Information about a specific epoch.
*
*/
export declare function epochs(this: BlockFrostAPI, number: number): Promise<components['schemas']['epoch_content']>;
/**
* Obtains the information about the latest, therefore current, epoch.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1latest/get | API docs for Latest epoch}
*
* @returns Information about the current epoch.
*
*/
export declare function epochsLatest(this: BlockFrostAPI): Promise<components['schemas']['epoch_content']>;
/**
* Obtains a list of epochs following a specific epoch.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D~1next/get | API docs for Listing of next epochs}
*
* @param number - Number of the epoch
* @param pagination - Optional, Pagination options
* @returns List of epochs following a specific epoch.
*
*/
export declare function epochsNext(this: BlockFrostAPI, number: number, pagination?: Omit<PaginationOptions, 'order'>): Promise<components['schemas']['epoch_content_array']>;
/**
* Obtains a list of epochs preceding a specific epoch.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D~1previous/get | API docs for Listing of next epochs}
*
* @param number - Number of the epoch
* @param pagination - Optional, Pagination options
* @returns List of epochs preceding a specific epoch.
*
*/
export declare function epochsPrevious(this: BlockFrostAPI, number: number, pagination?: Omit<PaginationOptions, 'order'>): Promise<components['schemas']['epoch_content_array']>;
/**
* Obtains the active stake distribution for the specified epoch.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D~1stakes/get | API docs for Stake distribution}
*
* @param number - Number of the epoch
* @param pagination - Optional, Pagination options
* @returns Active stake distribution for the specified epoch
*
*/
export declare function epochsStakes(this: BlockFrostAPI, number: number, pagination?: PaginationOptions): Promise<components['schemas']['epoch_stake_content']>;
/**
* Obtains the whole active stake distribution for the specified epoch.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D~1stakes/get | API docs for Stake distribution}
* @remarks
* Variant of `epochsStakes` method for fetching all pages with built-in requests batching
*
* @param number - Number of the epoch
* @param allMethodOptions - Optional, Options for request batching
* @returns Active stake distribution for the specified epoch
*
*/
export declare function epochsStakesAll(this: BlockFrostAPI, number: number, allMethodOptions?: AllMethodOptions): Promise<components['schemas']['epoch_stake_content']>;
/**
* Obtains the active stake distribution for the epoch specified by stake pool.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D~1stakes/get | API docs for Stake distribution}
*
* @param number - Number of the epoch
* @param poolId - Stake pool ID to filter
* @param pagination - Optional, Pagination options
* @returns Active stake distribution for the epoch specified by stake pool
*
*/
export declare function epochsStakesByPoolId(this: BlockFrostAPI, number: number, poolId: string, pagination?: PaginationOptions): Promise<components['schemas']['epoch_stake_pool_content']>;
/**
* Obtains the whole active stake distribution for the epoch specified by stake pool.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D~1stakes/get | API docs for Stake distribution}
* @remarks
* Variant of `epochsStakesByPoolId` method for fetching all pages with built-in requests batching
*
* @param number - Number of the epoch
* @param poolId - Stake pool ID to filter
* @param allMethodOptions - Optional, Options for request batching
* @returns Active stake distribution for the epoch specified by stake pool
*
*/
export declare function epochsStakesByPoolIdAll(this: BlockFrostAPI, number: number, poolId: string, allMethodOptions?: AllMethodOptions): Promise<components['schemas']['epoch_stake_pool_content']>;
/**
* Obtains the blocks minted for the epoch specified.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D~1blocks/get | API docs for Block distribution}
*
* @param number - Number of the epoch
* @param pagination - Optional, Pagination options
* @returns Blocks minted for the epoch specified
*
*/
export declare function epochsBlocks(this: BlockFrostAPI, number: number, pagination?: PaginationOptions): Promise<components['schemas']['epoch_block_content']>;
/**
* Obtains the blocks minted for the epoch specified.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D~1blocks/get | API docs for Block distribution}
* @remarks
* Variant of `epochsBlocks` method for fetching all pages with built-in requests batching
*
* @param number - Number of the epoch
* @param allMethodOptions - Optional, Options for request batching
* @returns Blocks minted for the epoch specified
*
*/
export declare function epochsBlocksAll(this: BlockFrostAPI, number: number, allMethodOptions?: AllMethodOptions): Promise<components['schemas']['epoch_block_content']>;
/**
* Obtains the blocks minted for the epoch specified by stake pool.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D~1blocks~1%7Bpool_id%7D/get | API docs for Block distribution by pool}
*
* @param number - Number of the epoch
* @param poolId - Stake pool ID to filter
* @param pagination - Optional, Pagination options
* @returns Blocks minted for the epoch specified by stake pool
*
*/
export declare function epochsBlocksByPoolId(this: BlockFrostAPI, number: number, poolId: string, pagination?: PaginationOptions): Promise<components['schemas']['epoch_block_content']>;
/**
* Obtains the blocks minted for the epoch specified by stake pool.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D~1blocks~1%7Bpool_id%7D/get | API docs for Block distribution by pool}
* @remarks
* Variant of `epochsBlocksByPoolId` method for fetching all pages with built-in requests batching
*
* @param number - Number of the epoch
* @param poolId - Stake pool ID to filter
* @param allMethodOptions - Optional, Options for request batching
* @returns Blocks minted for the epoch specified by stake pool
*
*/
export declare function epochsBlocksByPoolIdAll(this: BlockFrostAPI, number: number, poolId: string, allMethodOptions?: AllMethodOptions): Promise<components['schemas']['epoch_block_content']>;
/**
* Obtains the protocol parameters for the epoch specified.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1%7Bnumber%7D~1parameters/get | API docs for Protocol Parameters}
*
* @param number - Number of the epoch
* @returns Protocol parameters for the epoch specified
*
*/
export declare function epochsParameters(this: BlockFrostAPI, number: number): Promise<components['schemas']['epoch_param_content']>;
/**
* Obtains the protocol parameters for the latest epoch.
* @see {@link https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1latest~1parameters/get | API docs for Latest epoch protocol parameters}
*
* @returns Protocol parameters for the latest epoch
*
*/
export declare function epochsLatestParameters(this: BlockFrostAPI): Promise<components['schemas']['epoch_param_content']>;