Socket
Socket
Sign inDemoInstall

@transmute/bls12381-key-pair

Package Overview
Dependencies
125
Maintainers
3
Versions
87
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @transmute/bls12381-key-pair

``` npm i @transmute/bls12381-key-pair@latest --save ```


Version published
Weekly downloads
340
increased by47.19%
Maintainers
3
Install size
2.63 MB
Created
Weekly downloads
 

Readme

Source

@transmute/bls12381-key-pair

npm i @transmute/bls12381-key-pair@latest --save
import { Bls12381G2KeyPair } from '@transmute/bls12381-key-pair';
const k = await Bls12381G2KeyPair.generate({
  secureRandom: () => {
    return Buffer.from(
      '4e61bc1918ea6a47ae3307331be7798196a1a8e7cfe4b6e8f7c9a5f36017d929',
      'hex'
    );
  },
});
const signer = k.signer();
const verifier = k.verifier();
const message = Buffer.from('hello');
const signature = await signer.sign({ data: message });
const verified = await verifier.verify({ data: message, signature });
import { Bls12381G1KeyPair } from '@transmute/bls12381-key-pair';
const k = await Bls12381G1KeyPair.generate({
  secureRandom: () => {
    return Buffer.from(
      '4e61bc1918ea6a47ae3307331be7798196a1a8e7cfe4b6e8f7c9a5f36017d929',
      'hex'
    );
  },
});
const signer = k.signer(); // currently unsupported
const verifier = k.verifier(); // currently unsupported

FAQs

Last updated on 10 Jun 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc