@transmute/secp256k1-key-pair
TypeScript icon, indicating that this package has built-in type declarations

0.7.0-unstable.82 • Public • Published

@transmute/secp256k1-key-pair

npm i @transmute/secp256k1-key-pair@latest --save
import { Secp256k1KeyPair } from '@transmute/secp256k1-key-pair';
const k = await Secp256k1KeyPair.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 });

Readme

Keywords

none

Package Sidebar

Install

npm i @transmute/secp256k1-key-pair

Weekly Downloads

3,602

Version

0.7.0-unstable.82

License

Apache-2.0

Unpacked Size

444 kB

Total Files

78

Last publish

Collaborators

  • ipbyrne
  • or13
  • transmute-ci