UNPKG

zic-tron-sdk

Version:
34 lines (33 loc) 1.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TransactioBroadcastError = exports.TransactionFailedError = exports.TransactionConfirmationTimeoutError = void 0; const utils_1 = require("./utils"); class TransactionConfirmationTimeoutError extends Error { constructor(message, transaction) { super(message); this.name = "TransactionConfirmationTimeoutError"; this.error = message; this.transaction = transaction; } } exports.TransactionConfirmationTimeoutError = TransactionConfirmationTimeoutError; class TransactionFailedError extends Error { constructor(message, transaction, output) { super(message); this.name = "TransactionFailedError"; this.error = message; this.transaction = transaction; this.output = output; } } exports.TransactionFailedError = TransactionFailedError; class TransactioBroadcastError extends Error { constructor(message, code) { super(message); this.name = "TransactioBroadcastError"; this.error = message; this.code = code; this.codeName = (0, utils_1.broadcastReturnResponseCodeToName)(code); } } exports.TransactioBroadcastError = TransactioBroadcastError;