toVerifyKey method

XrpVerifier toVerifyKey()

Returns an XrpVerifier instance based on the available signing key type.

This method constructs and returns an XrpVerifier instance adapted to the available signing key type (ED25519 or SECP256K1) for signature verification.

returns An XrpVerifier instance based on the available signing key type.

Implementation

XrpVerifier toVerifyKey() {
  final keyBytes = _ecdsaSigningKey?.privateKey.publicKey.toBytes() ??
      _signingKey!.publicKey.toBytes();
  return XrpVerifier.fromKeyBytes(
      keyBytes,
      _ecdsaSigningKey == null
          ? EllipticCurveTypes.ed25519
          : EllipticCurveTypes.secp256k1);
}