-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,10 +40,6 @@ For [Deno](https://deno.land), ensure to use [npm specifier](https://deno.land/m | |
For React Native, you may need a [polyfill for crypto.getRandomValues](https://github.com/LinusU/react-native-get-random-values). | ||
If you don't like NPM, a standalone [noble-curves.js](https://github.com/paulmillr/noble-curves/releases) is also available. | ||
|
||
The library is tree-shaking-friendly and does not expose root entry point as | ||
`@noble/curves`. Instead, you need to import specific primitives. | ||
This is done to ensure small size of your apps. | ||
|
||
The package consists of two parts: | ||
|
||
* [Implementations](#implementations), utilizing one dependency [noble-hashes](https://github.com/paulmillr/noble-hashes), | ||
|
@@ -60,6 +56,8 @@ The package consists of two parts: | |
#### Generic example for all curves, secp256k1 | ||
|
||
```ts | ||
// import * from '@noble/curves'; // Error | ||
// Use sub-imports for tree-shaking, to ensure small size of your apps | ||
// Each curve has similar methods | ||
import { secp256k1 } from '@noble/curves/secp256k1'; // ESM and Common.js | ||
// import { secp256k1 } from 'npm:@noble/[email protected]/secp256k1'; // Deno | ||
|