import { BlockHash } from "./models/primitives"; export declare enum ErrorCodes { AddressLimitExceeded = 0, IncorrectAddressFormat = 1, StartBlockHashNotFound = 2, PageStartNotFound = 3, TxHashNotFound = 4, IncorrectTxHashFormat = 5, BlockOffsetLimit = 6, OffsetBlockNotFound = 7, MinimumAddressesMissing = 8, AddressNotFound = 9, EndBlockHashNotFound = 10 } interface FieldErrors { [name: string]: { message: string; value?: any; }; } export declare type ErrorShape = { code: number; reason: string; details?: FieldErrors; }; export declare const Errors: { readonly AddressLimitExceeded: { readonly code: ErrorCodes.AddressLimitExceeded; readonly prefix: "Cannot filter on more than 50 addresses."; readonly detailsGen: (details: { limit: number; found: number; }) => string; }; readonly TxHashNotFound: { readonly code: ErrorCodes.TxHashNotFound; readonly prefix: "Tx Hash was not found."; readonly detailsGen: (details: { txHash: string; }) => string; }; readonly IncorrectAddressFormat: { readonly code: ErrorCodes.IncorrectAddressFormat; readonly prefix: "Address hash must be valid 42-character hexadecimal value."; readonly detailsGen: (details: { addresses: string[]; }) => string; }; readonly AddressNotFound: { readonly code: ErrorCodes.AddressNotFound; readonly prefix: "Address hash wasn't found in transaction records."; readonly detailsGen: (details: { addresses: string[]; }) => string; }; readonly IncorrectTxHashFormat: { readonly code: ErrorCodes.IncorrectTxHashFormat; readonly prefix: "Incorrectly formatted transaction hash found."; readonly detailsGen: (details: { txHash: string[]; }) => string; }; readonly StartBlockHashNotFound: { readonly code: ErrorCodes.StartBlockHashNotFound; readonly prefix: "Block hash not found."; readonly detailsGen: (details: { rangeStartBlock?: BlockHash; }) => string; }; readonly EndBlockHashNotFound: { readonly code: ErrorCodes.EndBlockHashNotFound; readonly prefix: "Block hash not found."; readonly detailsGen: (details: { rangeEndBlock?: BlockHash; }) => string; }; readonly PageStartNotFound: { readonly code: ErrorCodes.PageStartNotFound; readonly prefix: "After block and/or transaction not found."; readonly detailsGen: (details: { blockHash: string; txHash: string; }) => string; }; readonly MinimumAddressesMissing: { readonly code: ErrorCodes.MinimumAddressesMissing; readonly prefix: "At least one address must be sent."; readonly detailsGen: (details: { limit: number; found: number; }) => string; }; }; export declare enum TxGraphQLErrors { AddressNotFound = "Address not found.", RangeStartBlockHashNotFound = "Referenced block did not match", RangeEndBlockHashNotFound = "Range end block not found", TxHashNotFound = "Referenced transaction not found" } export declare type TxHistoryKeys = keyof Pick; export declare const BlockScoutGraphQLErrorMapping: { [key in TxGraphQLErrors]: typeof Errors[TxHistoryKeys]; }; export declare function genErrorMessage(type: T, details: Parameters[0]): { code: T["code"]; reason: string; }; export {};