isValidPublicKeyScheme
Checks if a public key scheme is valid.
import { isValidPublicKeyScheme } from "@aptos-labs/siwa";
// Check valid schemes
isValidPublicKeyScheme("ed25519"); // true
isValidPublicKeyScheme("multi_ed25519"); // true
isValidPublicKeyScheme("single_key"); // true
isValidPublicKeyScheme("multi_key"); // true
// Check invalid schemes
isValidPublicKeyScheme("invalid_scheme"); // false
isValidPublicKeyScheme("rsa"); // false
Specifications
Parameters:Name | Type | Default |
---|---|---|
scheme | string The scheme to check. |
Last updated on