UNPKG

@ledgerhq/coin-tezos

Version:
68 lines 2.91 kB
"use strict"; // SPDX-FileCopyrightText: © 2026 LEDGER SAS // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", { value: true }); exports.TezosStakeBlockedByPendingUnstake = exports.TezosNotEnoughStaked = exports.MustDelegateBeforeStaking = exports.UnsupportedOperationKind = exports.UnsupportedTransactionMode = exports.InvalidAddressBecauseAlreadyDelegated = exports.NotEnoughBalanceToDelegate = void 0; class NotEnoughBalanceToDelegate extends Error { name = 'NotEnoughBalanceToDelegate'; constructor(message) { super(message || 'NotEnoughBalanceToDelegate'); } } exports.NotEnoughBalanceToDelegate = NotEnoughBalanceToDelegate; class InvalidAddressBecauseAlreadyDelegated extends Error { name = 'InvalidAddressBecauseAlreadyDelegated'; constructor(message, fields) { super(message || 'InvalidAddressBecauseAlreadyDelegated'); if (fields) Object.assign(this, fields); } } exports.InvalidAddressBecauseAlreadyDelegated = InvalidAddressBecauseAlreadyDelegated; class UnsupportedTransactionMode extends Error { name = 'UnsupportedTransactionMode'; constructor(message, fields) { super(message || 'UnsupportedTransactionMode'); if (fields) Object.assign(this, fields); } } exports.UnsupportedTransactionMode = UnsupportedTransactionMode; class UnsupportedOperationKind extends Error { name = 'UnsupportedOperationKind'; constructor(message, fields) { super(message || 'UnsupportedOperationKind'); if (fields) Object.assign(this, fields); } } exports.UnsupportedOperationKind = UnsupportedOperationKind; class MustDelegateBeforeStaking extends Error { name = 'MustDelegateBeforeStaking'; constructor(message, fields) { super(message || 'MustDelegateBeforeStaking'); if (fields) Object.assign(this, fields); } } exports.MustDelegateBeforeStaking = MustDelegateBeforeStaking; class TezosNotEnoughStaked extends Error { name = 'TezosNotEnoughStaked'; constructor(message, fields) { super(message || 'TezosNotEnoughStaked'); if (fields) Object.assign(this, fields); } } exports.TezosNotEnoughStaked = TezosNotEnoughStaked; // Staking with a new delegate is rejected by the protocol while an unfinalizable unstake request // to the previous delegate still exists (~4-day freeze). Surfaced during stake fee estimation. // Display is i18n-driven (via error.name); the message is a fallback for logs. class TezosStakeBlockedByPendingUnstake extends Error { constructor() { super('Cannot stake with the new validator while an unfinalizable unstake to the previous one is pending'); this.name = 'TezosStakeBlockedByPendingUnstake'; } } exports.TezosStakeBlockedByPendingUnstake = TezosStakeBlockedByPendingUnstake; //# sourceMappingURL=errors.js.map