UNPKG

@harmoniclabs/blockfrost-pluts

Version:

@blockfrost/blockfrost-js extension based on plu-ts types

32 lines (31 loc) 1.07 kB
export type CardanoNetwork = 'mainnet' | 'testnet' | 'preview' | 'preprod'; export type BlockfrostNetwork = CardanoNetwork | 'ipfs'; export interface RateLimiterConfig { size: number; increaseInterval: number; increaseAmount: number; } export declare type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'HEAD' | 'DELETE' | 'OPTIONS' | 'TRACE' | 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace'; export interface RetryObject { attemptCount: number; retryOptions: RequiredRetryOptions; error: Error; computedValue: number; retryAfter?: number; } export declare type RetryFunction = (retryObject: RetryObject) => number | Promise<number>; export interface RequiredRetryOptions { limit: number; methods: Method[]; statusCodes: number[]; errorCodes: string[]; calculateDelay: RetryFunction; maxRetryAfter?: number; } type OptionCombination1 = { projectId?: string; customBackend?: string; network?: CardanoNetwork; }; export type BlockfrostOptions = OptionCombination1; export {};