@libp2p/crypto 5.1.15 → 5.1.17

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 (56) hide show
  1. package/dist/index.min.js +1 -4
  2. package/dist/index.min.js.map +4 -4
  3. package/dist/src/ciphers/aes-gcm.browser.d.ts +1 -1
  4. package/dist/src/ciphers/aes-gcm.d.ts +1 -1
  5. package/dist/src/ciphers/index.d.ts +1 -1
  6. package/dist/src/ciphers/index.js +1 -1
  7. package/dist/src/hmac/index.browser.js +1 -1
  8. package/dist/src/hmac/index.js +1 -1
  9. package/dist/src/index.d.ts +4 -4
  10. package/dist/src/index.js +4 -4
  11. package/dist/src/keys/ecdh/index.browser.d.ts +1 -1
  12. package/dist/src/keys/ecdsa/ecdsa.js +2 -2
  13. package/dist/src/keys/ecdsa/ecdsa.js.map +1 -1
  14. package/dist/src/keys/ecdsa/utils.js +2 -2
  15. package/dist/src/keys/ed25519/ed25519.js +2 -2
  16. package/dist/src/keys/ed25519/ed25519.js.map +1 -1
  17. package/dist/src/keys/ed25519/utils.js +2 -2
  18. package/dist/src/keys/ephemeral-keys.d.ts +1 -1
  19. package/dist/src/keys/ephemeral-keys.js +1 -1
  20. package/dist/src/keys/index.d.ts +5 -5
  21. package/dist/src/keys/index.js +13 -13
  22. package/dist/src/keys/key-stretcher.d.ts +1 -1
  23. package/dist/src/keys/rsa/index.browser.d.ts +1 -1
  24. package/dist/src/keys/rsa/index.browser.js +1 -1
  25. package/dist/src/keys/rsa/index.d.ts +1 -1
  26. package/dist/src/keys/rsa/index.js +1 -1
  27. package/dist/src/keys/rsa/rsa.js +1 -1
  28. package/dist/src/keys/rsa/utils.js +3 -3
  29. package/dist/src/keys/rsa/utils.js.map +1 -1
  30. package/dist/src/keys/secp256k1/secp256k1.js +2 -2
  31. package/dist/src/keys/secp256k1/secp256k1.js.map +1 -1
  32. package/dist/src/keys/secp256k1/utils.js +1 -1
  33. package/dist/src/webcrypto/index.d.ts +1 -1
  34. package/dist/src/webcrypto/index.js +1 -1
  35. package/package.json +12 -7
  36. package/src/ciphers/aes-gcm.browser.ts +1 -1
  37. package/src/ciphers/aes-gcm.ts +1 -1
  38. package/src/ciphers/index.ts +1 -1
  39. package/src/hmac/index.browser.ts +1 -1
  40. package/src/hmac/index.ts +1 -1
  41. package/src/index.ts +4 -4
  42. package/src/keys/ecdh/index.browser.ts +1 -1
  43. package/src/keys/ecdsa/ecdsa.ts +2 -2
  44. package/src/keys/ecdsa/utils.ts +2 -2
  45. package/src/keys/ed25519/ed25519.ts +2 -2
  46. package/src/keys/ed25519/utils.ts +2 -2
  47. package/src/keys/ephemeral-keys.ts +1 -1
  48. package/src/keys/index.ts +16 -16
  49. package/src/keys/key-stretcher.ts +1 -1
  50. package/src/keys/rsa/index.browser.ts +1 -1
  51. package/src/keys/rsa/index.ts +1 -1
  52. package/src/keys/rsa/rsa.ts +1 -1
  53. package/src/keys/rsa/utils.ts +3 -3
  54. package/src/keys/secp256k1/secp256k1.ts +2 -2
  55. package/src/keys/secp256k1/utils.ts +1 -1
  56. package/src/webcrypto/index.ts +1 -1
@@ -2,7 +2,7 @@ import { InvalidParametersError } from '@libp2p/interface'
2
2
  import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
3
3
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
4
4
  import * as hmac from '../hmac/index.js'
5
- import type { EnhancedKey, EnhancedKeyPair } from './interface.js'
5
+ import type { EnhancedKey, EnhancedKeyPair } from './interface.ts'
6
6
 
7
7
  interface Cipher {
8
8
  ivSize: number
@@ -2,7 +2,7 @@ import { InvalidParametersError } from '@libp2p/interface'
2
2
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
3
3
  import randomBytes from '../../random-bytes.js'
4
4
  import webcrypto from '../../webcrypto/index.js'
5
- import * as utils from './utils.js'
5
+ import * as utils from './utils.ts'
6
6
  import type { JWKKeyPair } from '../interface.js'
7
7
  import type { AbortOptions } from '@libp2p/interface'
8
8
  import type { Uint8ArrayList } from 'uint8arraylist'
@@ -3,7 +3,7 @@ import { promisify } from 'node:util'
3
3
  import { InvalidParametersError } from '@libp2p/interface'
4
4
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
5
5
  import randomBytes from '../../random-bytes.js'
6
- import * as utils from './utils.js'
6
+ import * as utils from './utils.ts'
7
7
  import type { JWKKeyPair } from '../interface.js'
8
8
  import type { AbortOptions } from '@libp2p/interface'
9
9
  import type { Uint8ArrayList } from 'uint8arraylist'
@@ -1,7 +1,7 @@
1
1
  import { base58btc } from 'multiformats/bases/base58'
2
2
  import { CID } from 'multiformats/cid'
3
3
  import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
4
- import { hashAndSign, utils, hashAndVerify } from './index.js'
4
+ import { hashAndSign, utils, hashAndVerify } from './index.ts'
5
5
  import type { RSAPublicKey as RSAPublicKeyInterface, RSAPrivateKey as RSAPrivateKeyInterface, AbortOptions } from '@libp2p/interface'
6
6
  import type { Digest } from 'multiformats/hashes/digest'
7
7
  import type { Uint8ArrayList } from 'uint8arraylist'
@@ -4,9 +4,9 @@ import { create } from 'multiformats/hashes/digest'
4
4
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
5
5
  import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
6
6
  import * as pb from '../keys.js'
7
- import { decodeDer, encodeBitString, encodeInteger, encodeSequence } from './der.js'
8
- import { RSAPrivateKey as RSAPrivateKeyClass, RSAPublicKey as RSAPublicKeyClass } from './rsa.js'
9
- import { generateRSAKey, rsaKeySize } from './index.js'
7
+ import { decodeDer, encodeBitString, encodeInteger, encodeSequence } from './der.ts'
8
+ import { generateRSAKey, rsaKeySize } from './index.ts'
9
+ import { RSAPrivateKey as RSAPrivateKeyClass, RSAPublicKey as RSAPublicKeyClass } from './rsa.ts'
10
10
  import type { JWKKeyPair } from '../interface.js'
11
11
  import type { RSAPrivateKey, RSAPublicKey } from '@libp2p/interface'
12
12
  import type { Digest } from 'multiformats/hashes/digest'
@@ -3,8 +3,8 @@ import { CID } from 'multiformats/cid'
3
3
  import { identity } from 'multiformats/hashes/identity'
4
4
  import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
5
5
  import { publicKeyToProtobuf } from '../index.js'
6
- import { validateSecp256k1PublicKey, compressSecp256k1PublicKey, computeSecp256k1PublicKey, validateSecp256k1PrivateKey } from './utils.js'
7
- import { hashAndVerify, hashAndSign } from './index.js'
6
+ import { hashAndVerify, hashAndSign } from './index.ts'
7
+ import { validateSecp256k1PublicKey, compressSecp256k1PublicKey, computeSecp256k1PublicKey, validateSecp256k1PrivateKey } from './utils.ts'
8
8
  import type { Secp256k1PublicKey as Secp256k1PublicKeyInterface, Secp256k1PrivateKey as Secp256k1PrivateKeyInterface, AbortOptions } from '@libp2p/interface'
9
9
  import type { Digest } from 'multiformats/hashes/digest'
10
10
  import type { Uint8ArrayList } from 'uint8arraylist'
@@ -1,6 +1,6 @@
1
1
  import { InvalidPrivateKeyError, InvalidPublicKeyError } from '@libp2p/interface'
2
2
  import { secp256k1 as secp } from '@noble/curves/secp256k1.js'
3
- import { Secp256k1PublicKey as Secp256k1PublicKeyClass, Secp256k1PrivateKey as Secp256k1PrivateKeyClass } from './secp256k1.js'
3
+ import { Secp256k1PublicKey as Secp256k1PublicKeyClass, Secp256k1PrivateKey as Secp256k1PrivateKeyClass } from './secp256k1.ts'
4
4
  import type { Secp256k1PublicKey, Secp256k1PrivateKey } from '@libp2p/interface'
5
5
 
6
6
  const PRIVATE_KEY_BYTE_LENGTH = 32
@@ -1,3 +1,3 @@
1
- import webcrypto from './webcrypto.js'
1
+ import webcrypto from './webcrypto.ts'
2
2
 
3
3
  export default webcrypto