{"size": 1709, "ext": "js", "max_stars_repo_path": "lib/Identity.js", "max_stars_repo_name": "idancali/carmel.js", "max_stars_repo_stars_event_min_datetime": "2021-04-30T13:17:55.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-30T13:17:55.000Z", "max_issues_repo_path": "lib/Identity.js", "max_issues_repo_name": "idancali/carmel.js", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/Identity.js", "max_forks_repo_name": "idancali/carmel.js", "max_forks_repo_forks_event_min_datetime": "2021-04-30T13:18:04.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-20T09:52:55.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 31.6481481481, "max_line_length": 129, "alphanum_fraction": 0.5956699824}
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Identity = void 0;
// import { Wallet, Datastore } from '.'
const wif_1 = __importDefault(require("wif"));
class Identity {
    constructor(wallet, index) {
        this._wallet = wallet;
        this._index = index;
        this._ecc = require('eosjs-ecc');
        this._raw = wallet.root.deriveHardened(0);
        this._publicKey = this.ecc.PublicKey(this.raw.publicKey).toString();
        this._privateKey = wif_1.default.encode(128, this.raw.privateKey, true);
        // this._wallet = wallet
        // this._index = index
        // this._raw = wallet.root!.deriveHardened(index)
        // this._publicKey = Buffer.from(this.raw.publicKey).toString()//this.wallet.ecc.PublicKey(this.raw.publicKey).toString()
        // this._privateKey = wif.encode(128, this.raw.privateKey!, true)
        // this._session = session
        // this._exists = false
    }
    get ecc() {
        return this._ecc;
    }
    // sign(digest: any) {
    //     // return this.wallet.ecc.sign(digest, this.privateKey)
    // }
    // get session() {
    //     return this._session
    // }
    get wallet() {
        return this._wallet;
    }
    // get cache() {
    //     return this._cache
    // }
    get index() {
        return this._index;
    }
    get raw() {
        return this._raw;
    }
    get publicKey() {
        return this._publicKey;
    }
    get privateKey() {
        return this._privateKey;
    }
}
exports.Identity = Identity;
//# sourceMappingURL=Identity.js.map