@lit-protocol/bls-sdk
TypeScript icon, indicating that this package has built-in type declarations

5.0.0 • Public • Published

BLS-SDK

Read more about it here

https://github.com/LIT-Protocol/threshold_crypto_ui

Installation

yarn add @lit-protocol/bls-sdk

Usage

import { initWasmBlsSdk } from '@lit-protocol/bls-sdk';

initWasmBlsSdk().then((exports) => {
  globalThis.wasmExports = exports;
  log(
    `✅ [BLS SDK] wasmExports loaded. ${
      Object.keys(exports).length
    } functions available. Run 'wasmExports' in the console to see them.`
  );
});

Then

// set decryption shares bytes in wasm
decryptionShares.forEach((s: any, idx: any) => {
  wasmExports.set_share_indexes(idx, s.shareIndex);

  const shareAsBytes = uint8arrayFromString(s.decryptionShare, 'base16');

  for (let i = 0; i < shareAsBytes.length; i++) {
    wasmExports.set_decryption_shares_byte(i, idx, shareAsBytes[i]);
  }
});

Readme

Keywords

Package Sidebar

Install

npm i @lit-protocol/bls-sdk

Weekly Downloads

11,134

Version

5.0.0

License

MIT

Unpacked Size

360 kB

Total Files

8

Last publish

Collaborators

  • maximushaximus
  • famura
  • josh-long
  • hwrdtm
  • websaam
  • adarsh-kumar28
  • glitch003