forked from tornado-packages/noble-curves
readme: esm-only
This commit is contained in:
parent
7c461af2b2
commit
9d0a2e25dc
@ -56,7 +56,7 @@ Instead, you need to import specific primitives. This is done to ensure small si
|
|||||||
Each curve can be used in the following way:
|
Each curve can be used in the following way:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { secp256k1 } from '@noble/curves/secp256k1'; // ECMAScript Modules (ESM) and Common.js
|
import { secp256k1 } from '@noble/curves/secp256k1'; // ECMAScript Modules (ESM)
|
||||||
// import { secp256k1 } from 'npm:@noble/curves@1.2.0/secp256k1'; // Deno
|
// import { secp256k1 } from 'npm:@noble/curves@1.2.0/secp256k1'; // Deno
|
||||||
const priv = secp256k1.utils.randomPrivateKey();
|
const priv = secp256k1.utils.randomPrivateKey();
|
||||||
const pub = secp256k1.getPublicKey(priv);
|
const pub = secp256k1.getPublicKey(priv);
|
||||||
|
Loading…
Reference in New Issue
Block a user