@masknet/secp256k1-webcrypto
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

secp256k1-webcrypto

WebCrypto API with secp256k1 support.

This is a light version of https://github.com/PeculiarVentures/webcrypto-liner/ that only contains secp256k1 support.

Thanks to PeculiarVentures for their webcrypto-liner!

Usage

import { crypto, Crypto, CryptoKey, SubtleCrypto, polyfill } from '@masknet/secp256k1-webcrypto'
crypto // a polyfilled Crypto instance
crypto.subtle // a polyfilled SubtleCrypto instance
polyfill() // install the polyfill on the global object

Requirement

You can create your own instance by

import { createCrypto } from '@masknet/secp256k1-webcrypto/core'

export const [crypto, { Crypto, CryptoKey, SubtleCrypto }, polyfill] = createCrypto(
    globalThis.crypto,
    globalThis.CryptoKey,
    DOMException,
)

Unsupported

  • spki format import/export

Readme

Keywords

Package Sidebar

Install

npm i @masknet/secp256k1-webcrypto

Weekly Downloads

1,190

Version

1.0.0

License

MIT

Unpacked Size

69.3 kB

Total Files

48

Last publish

Collaborators

  • jackworks
  • yisiliu