Crypto Testing
    Preparing search index...

    Function expectKeyPair

    • Assert that kp looks like a valid key pair.

      Checks that both publicKey and privateKey are non-empty hex strings and that the public key is different from the private key.

      Parameters

      Returns void

      import { expectKeyPair, mockGenerateKeyPair } from "@sebastienrousseau/crypto-testing";

      const kp = mockGenerateKeyPair("ed25519");
      expectKeyPair(kp); // throws if invalid

      If validation fails.