Represents the public key of an Ed25519 key pair.

Since AIP-55 Aptos supports Legacy and Unified authentication keys.

Ed25519 scheme is represented in the SDK as Legacy authentication key and also as AnyPublicKey that represents any Unified authentication key.

Hierarchy (view full)

Constructors

Methods

  • Serializes a Serializable value to its BCS representation. This function is the TypeScript SDK equivalent of bcs::to_bytes in Move.

    Returns Uint8Array

    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.

    Returns Hex

    A Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array.

  • 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.

    Parameters

    • serializer: Serializer

      The serializer instance used to perform the serialization.

    Returns void

  • Determines 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.

    Parameters

    • publicKey: PublicKey

      The public key to validate.

    Returns publicKey is Ed25519PublicKey

    A boolean indicating whether the public key is a valid Ed25519 public key.

  • Determine if the provided public key is an instance of Ed25519PublicKey.

    Parameters

    Returns publicKey is Ed25519PublicKey

    True if the public key is an instance of Ed25519PublicKey, otherwise false.

    use instanceof Ed25519PublicKey instead.

Properties

LENGTH: number = 32

Length of an Ed25519 public key