@peerbit/crypto 2.1.5 → 2.1.7

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.
@@ -1,7 +1,7 @@
1
1
  import { PrivateSignKey, PublicSignKey, Keypair } from "./key.js";
2
2
  import { Identity, SignWithKey } from "./signer.js";
3
3
  import { SignatureWithKey } from "./signature.js";
4
- import type { Ed25519PeerId, PeerId } from "@libp2p/interface/peer-id";
4
+ import type { Ed25519PeerId, PeerId } from "@libp2p/interface";
5
5
  import { PreHash } from "./prehash.js";
6
6
  export declare class Ed25519PublicKey extends PublicSignKey {
7
7
  publicKey: Uint8Array;
package/lib/esm/key.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PeerId } from "@libp2p/interface/peer-id";
1
+ import { PeerId } from "@libp2p/interface";
2
2
  interface Key {
3
3
  equals(other: Key): boolean;
4
4
  get bytes(): Uint8Array;
@@ -1,4 +1,4 @@
1
- import { PeerId } from "@libp2p/interface/peer-id";
1
+ import { PeerId } from "@libp2p/interface";
2
2
  import { Ed25519Keypair, Ed25519PublicKey } from "./ed25519.js";
3
3
  import { Secp256k1Keypair, Secp256k1PublicKey } from "./sepc256k1.js";
4
4
  export declare const getKeypairFromPeerId: (peerId: PeerId) => Ed25519Keypair | Secp256k1Keypair;
@@ -1,7 +1,7 @@
1
1
  import { Keypair, PrivateSignKey, PublicSignKey } from "./key.js";
2
2
  import { Wallet } from "@ethersproject/wallet";
3
3
  import { SignatureLike } from "@ethersproject/bytes";
4
- import { PeerId } from "@libp2p/interface/peer-id";
4
+ import { PeerId } from "@libp2p/interface";
5
5
  import { Identity } from "./signer.js";
6
6
  import { SignatureWithKey } from "./signature.js";
7
7
  import { PreHash } from "./prehash.js";
@@ -1,7 +1,7 @@
1
1
  export * from "./errors.js";
2
2
  import { Keypair, PrivateEncryptionKey, PublicKeyEncryptionKey } from "./key.js";
3
3
  import { Ed25519Keypair, Ed25519PublicKey } from "./ed25519.js";
4
- import { PeerId } from "@libp2p/interface/peer-id";
4
+ import { PeerId } from "@libp2p/interface";
5
5
  export declare class X25519PublicKey extends PublicKeyEncryptionKey {
6
6
  publicKey: Uint8Array;
7
7
  constructor(properties: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peerbit/crypto",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "description": "Crypto fn",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -47,10 +47,10 @@
47
47
  "@ethersproject/wallet": "^5.7.0",
48
48
  "@libp2p/crypto": "^3.0.3",
49
49
  "@libp2p/peer-id": "^4.0.3",
50
- "@peerbit/cache": "^2.0.5",
50
+ "@peerbit/cache": "^2.0.6",
51
51
  "@peerbit/uint8arrays": "3.0.1",
52
52
  "@stablelib/sha256": "^1.0.1",
53
53
  "libsodium-wrappers": "^0.7.13"
54
54
  },
55
- "gitHead": "180a8c4e6ab6f713134c949d2d7ce9fc5648a4ce"
55
+ "gitHead": "82d6f528faf0a4e060e400314bc01bc7260c41a5"
56
56
  }
package/src/ed25519.ts CHANGED
@@ -8,7 +8,7 @@ import { peerIdFromKeys } from "@libp2p/peer-id";
8
8
  import { supportedKeys } from "@libp2p/crypto/keys";
9
9
  import { coerce } from "./bytes.js";
10
10
  import sodium from "libsodium-wrappers";
11
- import type { Ed25519PeerId, PeerId } from "@libp2p/interface/peer-id";
11
+ import type { Ed25519PeerId, PeerId } from "@libp2p/interface";
12
12
  import { sign } from "./ed25519-sign.js";
13
13
  import { PreHash } from "./prehash.js";
14
14
  import { concat } from "uint8arrays";
package/src/key.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BinaryWriter, field, serialize, serializer } from "@dao-xyz/borsh";
2
2
  import { sha256Base64Sync } from "./hash.js";
3
- import { PeerId } from "@libp2p/interface/peer-id";
3
+ import { PeerId } from "@libp2p/interface";
4
4
  import { compare } from "@peerbit/uint8arrays";
5
5
  import { toHexString } from "./utils.js";
6
6
 
package/src/libp2p.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PeerId } from "@libp2p/interface/peer-id";
1
+ import { PeerId } from "@libp2p/interface";
2
2
  import { Ed25519Keypair, Ed25519PublicKey } from "./ed25519.js";
3
3
  import { Secp256k1Keypair, Secp256k1PublicKey } from "./sepc256k1.js";
4
4
 
package/src/sepc256k1.ts CHANGED
@@ -11,7 +11,7 @@ let _curve: EC;
11
11
 
12
12
  import { equals } from "@peerbit/uint8arrays";
13
13
  import { toHexString } from "./utils.js";
14
- import { PeerId } from "@libp2p/interface/peer-id";
14
+ import { PeerId } from "@libp2p/interface";
15
15
  import { Identity } from "./signer.js";
16
16
  import { coerce } from "./bytes.js";
17
17
  import { generateKeyPair, supportedKeys } from "@libp2p/crypto/keys";
package/src/x25519.ts CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  Ed25519PrivateKey
14
14
  } from "./ed25519.js";
15
15
  import { toHexString } from "./utils.js";
16
- import { PeerId } from "@libp2p/interface/peer-id";
16
+ import { PeerId } from "@libp2p/interface";
17
17
  @variant(0)
18
18
  export class X25519PublicKey extends PublicKeyEncryptionKey {
19
19
  @field({ type: fixedArray("u8", 32) })