Serializes a Serializable value to its BCS representation.
This function is the TypeScript SDK equivalent of bcs::to_bytes in Move.
the BCS representation of the Serializable instance as a byte buffer.
Converts the BCS-serialized bytes of a value into a Hex instance. This function provides a Hex representation of the BCS-serialized data for easier handling and manipulation.
A Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array.
Creates an instance of the Ed25519Signature class from a hex input. This constructor validates the length of the signature to ensure it meets the required specifications.
The hex input representing the Ed25519 signature.
Static ReadonlyLENGTHLength of an Ed25519 public key
Generates an authentication key from the public key using the Ed25519 scheme. This function is essential for creating a secure authentication key that can be used for further cryptographic operations.
The generated authentication key.
Serializes the data into a byte array using the provided serializer. This allows for the conversion of data into a format suitable for transmission or storage.
The serializer instance used to perform the serialization.
Get the public key as a hex string with a 0x prefix.
The public key in hex format.
Convert the internal data representation to a Uint8Array.
Uint8Array representation of the data.
Verifies a signature against the exact bytes of message. This is the
unambiguous form — the input is interpreted as raw bytes regardless of
what they encode. Pair with Ed25519PrivateKey.signBytes.
Performs an Ed25519 malleability check (rejects non-canonical S values) before delegating to the underlying curve verifier.
Verifies a signed message using a public key.
The arguments for verification.
Represents the arguments required to verify a digital signature.
The polymorphic message: HexInput input is ambiguous — a
bare even-length string of hex characters (e.g., "cafe") is
interpreted as the 2 bytes [0xCA, 0xFE], not as 4 UTF-8 text bytes.
Use verifyBytes for Uint8Array input or verifyText
for string input; both are unambiguous. See
convertSigningMessage for the full legacy rule.
Note: Ed25519Signatures can be verified syncronously.
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.
Verifies a signature against the UTF-8 encoding of message. The input
is always treated as text — there is no hex/text heuristic. Pair with
Ed25519PrivateKey.signText.
StaticdeserializeDeserialize bytes into an Ed25519Signature object. This function is used to convert serialized byte data into a usable Ed25519Signature instance.
The deserializer instance used to read the byte data.
StaticisDetermines if the provided public key is a valid Ed25519 public key. This function checks for the presence of the "key" property and verifies that its data length matches the expected length for Ed25519 public keys.
The public key to validate.
A boolean indicating whether the public key is a valid Ed25519 public key.
StaticisDetermine if the provided public key is an instance of Ed25519PublicKey.
The public key to check.
True if the public key is an instance of Ed25519PublicKey, otherwise false.
Represents the public key of an Ed25519 key pair.
Since AIP-55 Aptos supports
LegacyandUnifiedauthentication keys.Ed25519 scheme is represented in the SDK as
Legacy authentication keyand also asAnyPublicKeythat represents anyUnified authentication key.