chaingate
Version:
A complete TypeScript library for connecting to and making transactions on different blockchains
13 lines • 429 B
JavaScript
import { bytesToHex } from '../../../InternalUtils/Utils';
import { hmac } from '@noble/hashes/hmac';
import { sha256 } from '@noble/hashes/sha256';
export class Secret {
get hex() {
return bytesToHex(this.raw, false);
}
get uniqueId() {
const uniqueIdRaw = hmac(sha256, 'ChainGate Secret Unique Id', this.raw);
return bytesToHex(uniqueIdRaw, false);
}
}
//# sourceMappingURL=Secret.js.map