UNPKG

@fruitsjs/core

Version:

Principal package with functions and models for building Fruits Eco-Blockchain applications.

44 lines 2.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Account = void 0; class Account { constructor(data = {}) { this.account = data.account || undefined; this.accountRS = data.accountRS || undefined; this.accountRSExtended = data.accountRSExtended || undefined; this.assetBalances = data.assetBalances || undefined; this.balanceNQT = data.balanceNQT || 0; this.commitmentNQT = data.commitmentNQT || 0; this.committedBalanceNQT = data.committedBalanceNQT || 0; this.description = data.description || undefined; this.effectiveBalanceNQT = data.effectiveBalanceNQT || 0; if (data.publicKey || data.keys !== undefined) { this.pinHash = data.pinHash || undefined; this.keys = { publicKey: data.publicKey || data.keys.publicKey, signPrivateKey: data.keys.signPrivateKey, agreementPrivateKey: data.keys.agreementPrivateKey, }; } this.name = data.name || undefined; this.selected = data.selected || false; if (data.transactions !== undefined && data.transactions.length > 0) { this.transactions = data.transactions; } else { this.transactions = []; } this.type = data.type || 'offline'; this.unconfirmedAssetBalances = data.unconfirmedAssetBalances || undefined; this.unconfirmedBalanceNQT = data.unconfirmedBalanceNQT || 0; this.confirmed = data.confirmed || false; this.multiWallet = data.multiWallet || false; this.multiKeys = data.multiKeys || undefined; this.multiWalletIndex = data.multiWalletIndex || 0; this.encryptedPassphrase = data.encryptedPassphrase || undefined; this.oldAccount = data.oldAccount || undefined; this.activatorTime = data.activatorTime || 0; } } exports.Account = Account; //# sourceMappingURL=account.js.map