UNPKG

@taquito/taquito

Version:

High level functionality that builds upon the other packages in the Tezos Typescript Library Suite.

51 lines (50 loc) 2.59 kB
import { ParameterValidationError, RpcError, TaquitoError } from '@taquito/core'; import { MichelsonV1ExpressionBase, OperationContentsAndResult, OperationResultDelegation, OperationResultOrigination, OperationResultRegisterGlobalConstant, OperationResultReveal, OperationResultSmartRollupOriginate, OperationResultTransaction, OperationResultTransferTicket, PreapplyResponse, TezosGenericOperationError } from '@taquito/rpc'; export interface TezosOperationErrorWithMessage extends TezosGenericOperationError { with: MichelsonV1ExpressionBase; } /** * @category Error * @description Generic tezos error that will be thrown when a mistake occurs when doing an operation; more details here https://tezos.gitlab.io/api/errors.html */ export declare class TezosOperationError extends RpcError { readonly errors: TezosGenericOperationError[]; readonly errorDetails: string; readonly operationsWithResults: OperationContentsAndResult[]; readonly lastError: TezosGenericOperationError; constructor(errors: TezosGenericOperationError[], errorDetails: string, operationsWithResults: OperationContentsAndResult[]); get id(): string; get kind(): string; } /** * @category Error * @description Tezos error that will be thrown when a mistake happens during the preapply stage */ export declare class TezosPreapplyFailureError extends Error { readonly result: any; constructor(result: any); } export type MergedOperationResult = OperationResultTransaction & OperationResultOrigination & OperationResultDelegation & OperationResultRegisterGlobalConstant & OperationResultTransferTicket & Partial<OperationResultSmartRollupOriginate> & OperationResultReveal & { fee?: string; }; export declare const flattenOperationResult: (response: PreapplyResponse | PreapplyResponse[]) => MergedOperationResult[]; /*** * @description Flatten all error from preapply response (including internal error) */ export declare const flattenErrors: (response: PreapplyResponse | PreapplyResponse[], status?: string) => TezosGenericOperationError[]; /** * @category Error * @description Error that indicates a general failure happening during an origination operation. */ export declare class OriginationOperationError extends TaquitoError { readonly message: string; constructor(message: string); } /** * @category Error * @description Error that indicates an invalid estimate value being passed */ export declare class InvalidEstimateValueError extends ParameterValidationError { readonly message: string; constructor(message: string); }