Socket
Socket
Sign inDemoInstall

@lit-protocol/bls-sdk

Package Overview
Dependencies
2
Maintainers
0
Versions
429
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lit-protocol/bls-sdk


Version published
Weekly downloads
13K
increased by16.39%
Maintainers
0
Created
Weekly downloads
 

Readme

Source

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]);
  }
});

Keywords

FAQs

Last updated on 02 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc