@mavrykdynamics/taquito
Version:
High level functionality that builds upon the other packages in the Mavryk Typescript Library Suite.
51 lines (50 loc) • 2.63 kB
TypeScript
import { ParameterValidationError, RpcError, TaquitoError } from '@mavrykdynamics/taquito-core';
import { MichelsonV1ExpressionBase, OperationContentsAndResult, OperationResultDelegation, OperationResultOrigination, OperationResultRegisterGlobalConstant, OperationResultReveal, OperationResultSmartRollupOriginate, OperationResultTransaction, OperationResultTransferTicket, PreapplyResponse, MavrykGenericOperationError } from '@mavrykdynamics/taquito-rpc';
export interface MavrykOperationErrorWithMessage extends MavrykGenericOperationError {
with: MichelsonV1ExpressionBase;
}
/**
* @category Error
* @description Generic mavryk error that will be thrown when a mistake occurs when doing an operation; more details here https://protocol.mavryk.org/api/errors.html
*/
export declare class MavrykOperationError extends RpcError {
readonly errors: MavrykGenericOperationError[];
readonly errorDetails: string;
readonly operationsWithResults: OperationContentsAndResult[];
readonly lastError: MavrykGenericOperationError;
constructor(errors: MavrykGenericOperationError[], errorDetails: string, operationsWithResults: OperationContentsAndResult[]);
get id(): string;
get kind(): string;
}
/**
* @category Error
* @description Mavryk error that will be thrown when a mistake happens during the preapply stage
*/
export declare class MavrykPreapplyFailureError 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) => MavrykGenericOperationError[];
/**
* @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);
}