UNPKG

@pokt-network/pocket-js

Version:

Pocket-js core package with the main functionalities to interact with the Pocket Network.

26 lines 955 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Account = void 0; /** * @author Luis C. de León <luis@pokt.network> */ var key_pair_1 = require("../../utils/key-pair"); /** * @description Represents an account made from an ed25519 keypair using an encrypted private key */ var Account = /** @class */ (function () { /** * @description Constructor for this class * @param {buffer} publicKey - Public key of the keypair * @param {string} encryptedPrivateKeyHex - The encrypted private key in hex string format */ function Account(publicKey, encryptedPrivateKeyHex) { this.publicKey = publicKey; this.encryptedPrivateKeyHex = encryptedPrivateKeyHex; this.address = key_pair_1.addressFromPublickey(this.publicKey); this.addressHex = this.address.toString("hex"); } return Account; }()); exports.Account = Account; //# sourceMappingURL=account.js.map