UNPKG

@bsv/sdk

Version:

BSV Blockchain Software Development Kit

26 lines 1.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WERR_INSUFFICIENT_FUNDS = void 0; /** * Insufficient funds in the available inputs to cover the cost of the required outputs * and the transaction fee (${moreSatoshisNeeded} more satoshis are needed, * for a total of ${totalSatoshisNeeded}), plus whatever would be required in order * to pay the fee to unlock and spend the outputs used to provide the additional satoshis. */ class WERR_INSUFFICIENT_FUNDS extends Error { /** * @param totalSatoshisNeeded Total satoshis required to fund transactions after net of required inputs and outputs. * @param moreSatoshisNeeded Shortfall on total satoshis required to fund transactions after net of required inputs and outputs. */ constructor(totalSatoshisNeeded, moreSatoshisNeeded) { super(`Insufficient funds in the available inputs to cover the cost of the required outputs and the transaction fee (${moreSatoshisNeeded} more satoshis are needed, for a total of ${totalSatoshisNeeded}), plus whatever would be required in order to pay the fee to unlock and spend the outputs used to provide the additional satoshis.`); this.totalSatoshisNeeded = totalSatoshisNeeded; this.moreSatoshisNeeded = moreSatoshisNeeded; this.isError = true; this.code = 7; this.name = this.constructor.name; } } exports.WERR_INSUFFICIENT_FUNDS = WERR_INSUFFICIENT_FUNDS; exports.default = WERR_INSUFFICIENT_FUNDS; //# sourceMappingURL=WERR_INSUFFICIENT_FUNDS.js.map