How to use the bls-wasm.SecretKey function in bls-wasm

To help you get started, we’ve selected a few bls-wasm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dfinity-side-projects / dkg / test / index.js View on Github external
const ids = [0, 1, 2, 3, 4, 5, 6].map(id => {
      const sk = new bls.SecretKey()
      sk.setHashOf(Buffer.from([id]))
      return sk
    })
github spacemeshos / app / src / services / sigs / secretkeyex.ts View on Github external
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);
    }

bls-wasm

BLS signature for Node.js by WebAssembly

BSD-3-Clause
Latest version published 2 months ago

Package Health Score

65 / 100
Full package analysis