Creates an instance of the signature class based on the provided signature type. This allows for the handling of different signature variants such as Ed25519, Secp256k1, and Keyless.
The publicKey object which determines the variant to be used.
ReadonlypublicReference to the inner public key
ReadonlyvariantIndex of the underlying enum variant
Generates an authentication key from the current instance's byte representation. This function is essential for creating a unique identifier for authentication purposes.
The generated authentication key.
Serializes the current object using the provided serializer. This function helps in converting the object into a format suitable for transmission or storage.
The serializer instance used to perform the serialization.
Verifies the provided signature against the given message. This function helps ensure the integrity and authenticity of the message by confirming that the signature is valid.
The arguments for signature verification.
The message that was signed.
The signature to verify, which must be an instance of AnySignature.
A boolean indicating whether the signature is valid for the given message.
Verifies the provided signature against the given message. This function helps ensure the integrity and authenticity of the message by confirming that the signature is valid.
The arguments for signature verification.
The configuration object for connecting to the Aptos network
The message that was signed.
Optionaloptions?: { OptionalthrowThe signature to verify, which must be an instance of AnySignature.
A boolean indicating whether the signature is valid for the given message.
StaticdeserializeDeserializes an AnySignature from the provided deserializer. This function helps in reconstructing the AnySignature object from its serialized form, allowing for further processing or validation.
The deserializer instance used to read the serialized data.
StaticisDetermines if the provided publicKey is an instance of a valid PublicKey object.
The publicKey to be checked for validity.
True if the signature is a valid instance; otherwise, false.
StaticisDetermines if the provided public key is an instance of AnyPublicKey.
The public key to check.
Represents any public key supported by Aptos.
Since AIP-55 Aptos supports
LegacyandUnifiedauthentication keys.Any unified authentication key is represented in the SDK as
AnyPublicKey.