Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
fix: relax .equals type (#224)
Browse files Browse the repository at this point in the history
Accept `any` otherwise we aren't compatible with the types in libp2p-interfaces.
  • Loading branch information
achingbrain authored Jan 4, 2022
1 parent ff8e401 commit 8346672
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/keys/ed25519-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Ed25519PublicKey {
}).finish()
}

equals (key: Ed25519PublicKey) {
equals (key: any) {
return uint8ArrayEquals(this.bytes, key.bytes)
}

Expand Down Expand Up @@ -70,7 +70,7 @@ export class Ed25519PrivateKey {
}).finish()
}

equals (key: Ed25519PrivateKey) {
equals (key: any) {
return uint8ArrayEquals(this.bytes, key.bytes)
}

Expand Down
4 changes: 2 additions & 2 deletions src/keys/rsa-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class RsaPublicKey {
return crypto.encrypt(this._key, bytes)
}

equals (key: RsaPublicKey) {
equals (key: any) {
return uint8ArrayEquals(this.bytes, key.bytes)
}

Expand Down Expand Up @@ -87,7 +87,7 @@ export class RsaPrivateKey {
}).finish()
}

equals (key: RsaPrivateKey) {
equals (key: any) {
return uint8ArrayEquals(this.bytes, key.bytes)
}

Expand Down
4 changes: 2 additions & 2 deletions src/keys/secp256k1-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Secp256k1PublicKey {
}).finish()
}

equals (key: Secp256k1PublicKey) {
equals (key: any) {
return uint8ArrayEquals(this.bytes, key.bytes)
}

Expand Down Expand Up @@ -70,7 +70,7 @@ export class Secp256k1PrivateKey {
}).finish()
}

equals (key: Secp256k1PrivateKey) {
equals (key: any) {
return uint8ArrayEquals(this.bytes, key.bytes)
}

Expand Down

0 comments on commit 8346672

Please sign in to comment.