Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public constructor(seed: string) {
if (seed.length != 128) throw new Error('Unexpected input length. Expected 128 chars hex string.');
const rndSeed = seed.substring(0,96);
const chainCode = seed.substring(96,128);
this.s = new bls.SecretKey();
this.rndSeed = rndSeed;
this.chainCode = chainCode;
const a = bls.fromHexStr(rndSeed);
this.s.setLittleEndian(a);
}