Assert that kp looks like a valid key pair.
kp
Checks that both publicKey and privateKey are non-empty hex strings and that the public key is different from the private key.
publicKey
privateKey
Key pair to validate.
import { expectKeyPair, mockGenerateKeyPair } from "@sebastienrousseau/crypto-testing";const kp = mockGenerateKeyPair("ed25519");expectKeyPair(kp); // throws if invalid Copy
import { expectKeyPair, mockGenerateKeyPair } from "@sebastienrousseau/crypto-testing";const kp = mockGenerateKeyPair("ed25519");expectKeyPair(kp); // throws if invalid
If validation fails.
Assert that
kplooks like a valid key pair.Checks that both
publicKeyandprivateKeyare non-empty hex strings and that the public key is different from the private key.