UNPKG

@ledgerhq/coin-tezos

Version:
38 lines 1.55 kB
"use strict"; // SPDX-FileCopyrightText: © 2026 LEDGER SAS // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", { value: true }); exports.hasManagerKey = hasManagerKey; exports.isAPITransactionType = isAPITransactionType; exports.isAPIDelegationType = isAPIDelegationType; exports.isAPIRevealType = isAPIRevealType; exports.isAPIStakingType = isAPIStakingType; exports.isAPIOriginationType = isAPIOriginationType; /** * True for account *types* that own a manager key and therefore carry the `revealed`, * `publicKey`, `counter`, and `balance` fields: plain wallets (`user`) and registered bakers * (`delegate`). This narrows on the account type, not on whether the key is already published — * it returns true for unrevealed `user` accounts too (check `revealed` separately for that). * `empty` accounts (and the non-manager `contract` / `ghost` / `rollup` types we don't model) * do not qualify. Use this instead of a bare `type === "user"` check so baker accounts aren't * mistaken for non-manager ones. */ function hasManagerKey(account) { return account.type === 'user' || account.type === 'delegate'; } function isAPITransactionType(op) { return op.type === 'transaction'; } function isAPIDelegationType(op) { return op.type === 'delegation'; } function isAPIRevealType(op) { return op.type === 'reveal'; } function isAPIStakingType(op) { return op.type === 'staking'; } function isAPIOriginationType(op) { return op.type === 'origination'; } //# sourceMappingURL=types.js.map