@libp2p/crypto 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +15 -2
  2. package/dist/index.min.js +16 -0
  3. package/dist/src/ciphers/aes-gcm.browser.js +3 -3
  4. package/dist/src/ciphers/aes-gcm.browser.js.map +1 -1
  5. package/dist/src/ciphers/aes-gcm.js +5 -5
  6. package/dist/src/ciphers/aes-gcm.js.map +1 -1
  7. package/dist/src/keys/ecdh-browser.js +3 -3
  8. package/dist/src/keys/ecdh-browser.js.map +1 -1
  9. package/dist/src/keys/ed25519-browser.d.ts +18 -0
  10. package/dist/src/keys/ed25519-browser.d.ts.map +1 -0
  11. package/dist/src/keys/ed25519-browser.js +52 -0
  12. package/dist/src/keys/ed25519-browser.js.map +1 -0
  13. package/dist/src/keys/ed25519-class.d.ts +2 -1
  14. package/dist/src/keys/ed25519-class.d.ts.map +1 -1
  15. package/dist/src/keys/ed25519-class.js +4 -4
  16. package/dist/src/keys/ed25519-class.js.map +1 -1
  17. package/dist/src/keys/ed25519.d.ts +4 -3
  18. package/dist/src/keys/ed25519.d.ts.map +1 -1
  19. package/dist/src/keys/ed25519.js +73 -18
  20. package/dist/src/keys/ed25519.js.map +1 -1
  21. package/dist/src/keys/key-stretcher.js +5 -5
  22. package/dist/src/keys/key-stretcher.js.map +1 -1
  23. package/dist/src/keys/rsa.js +1 -1
  24. package/dist/src/keys/rsa.js.map +1 -1
  25. package/dist/src/util.js +1 -1
  26. package/dist/src/util.js.map +1 -1
  27. package/dist/typedoc-urls.json +22 -0
  28. package/package.json +4 -2
  29. package/src/ciphers/aes-gcm.browser.ts +3 -3
  30. package/src/ciphers/aes-gcm.ts +5 -5
  31. package/src/keys/ecdh-browser.ts +3 -3
  32. package/src/keys/ed25519-browser.ts +63 -0
  33. package/src/keys/ed25519-class.ts +4 -4
  34. package/src/keys/ed25519.ts +77 -19
  35. package/src/keys/key-stretcher.ts +5 -5
  36. package/src/keys/rsa.ts +1 -1
  37. package/src/util.ts +1 -1
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
1
  # @libp2p/crypto <!-- omit in toc -->
2
2
 
3
3
  [![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
4
- [![IRC](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
5
4
  [![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
6
5
  [![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-crypto.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-crypto)
7
- [![CI](https://img.shields.io/github/workflow/status/libp2p/js-libp2p-interfaces/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/libp2p/js-libp2p-crypto/actions/workflows/js-test-and-release.yml)
6
+ [![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-crypto/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-crypto/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
8
7
 
9
8
  > Crypto primitives for libp2p
10
9
 
11
10
  ## Table of contents <!-- omit in toc -->
12
11
 
13
12
  - [Install](#install)
13
+ - [Browser `<script>` tag](#browser-script-tag)
14
14
  - [Lead Maintainer](#lead-maintainer)
15
15
  - [Usage](#usage)
16
16
  - [Web Crypto API](#web-crypto-api)
@@ -35,6 +35,7 @@
35
35
  - [`crypto.randomBytes(number)`](#cryptorandombytesnumber)
36
36
  - [`crypto.pbkdf2(password, salt, iterations, keySize, hash)`](#cryptopbkdf2password-salt-iterations-keysize-hash)
37
37
  - [Contribute](#contribute)
38
+ - [API Docs](#api-docs)
38
39
  - [License](#license)
39
40
  - [Contribution](#contribution)
40
41
 
@@ -44,6 +45,14 @@
44
45
  $ npm i @libp2p/crypto
45
46
  ```
46
47
 
48
+ ### Browser `<script>` tag
49
+
50
+ Loading this module through a script tag will make it's exports available as `Libp2pCrypto` in the global namespace.
51
+
52
+ ```html
53
+ <script src="https://unpkg.com/@libp2p/crypto/dist/index.min.js"></script>
54
+ ```
55
+
47
56
  This repo contains the JavaScript implementation of the crypto primitives needed for libp2p. This is based on this [go implementation](https://github.com/libp2p/go-libp2p-crypto).
48
57
 
49
58
  ## Lead Maintainer
@@ -305,6 +314,10 @@ This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/c
305
314
 
306
315
  [![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)
307
316
 
317
+ ## API Docs
318
+
319
+ - <https://libp2p.github.io/js-libp2p-crypto>
320
+
308
321
  ## License
309
322
 
310
323
  Licensed under either of