chaingate
Version:
A complete TypeScript library for connecting to and making transactions on different blockchains
17 lines • 600 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Secret = void 0;
const Utils_1 = require("../../../InternalUtils/Utils");
const hmac_1 = require("@noble/hashes/hmac");
const sha256_1 = require("@noble/hashes/sha256");
class Secret {
get hex() {
return (0, Utils_1.bytesToHex)(this.raw, false);
}
get uniqueId() {
const uniqueIdRaw = (0, hmac_1.hmac)(sha256_1.sha256, 'ChainGate Secret Unique Id', this.raw);
return (0, Utils_1.bytesToHex)(uniqueIdRaw, false);
}
}
exports.Secret = Secret;
//# sourceMappingURL=Secret.js.map