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.
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.
A boolean indicating whether the signature is valid for the given message.
Static
deserializeDeserializes 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.
Static
isDetermines 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.
Static
isDetermines 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
Legacy
andUnified
authentication keys.Any unified authentication key is represented in the SDK as
AnyPublicKey
.