Represents the public key of an Ed25519 key pair.
Since AIP-55 Aptos supports Legacy and Unified authentication keys.
Legacy
Unified
Ed25519 scheme is represented in the SDK as Legacy authentication key and also as AnyPublicKey that represents any Unified authentication key
Legacy authentication key
AnyPublicKey
Unified authentication key
Create a new PublicKey instance from a Uint8Array or String.
A HexInput (string or Uint8Array)
Static
Readonly
Length of an Ed25519 public key
Get the authentication key associated with this public key
Serializes a Serializable value to its BCS representation. This function is the Typescript SDK equivalent of bcs::to_bytes in Move.
Serializable
bcs::to_bytes
the BCS representation of the Serializable instance as a byte buffer
Helper function to get a value's BCS-serialized bytes as a Hex instance.
a Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array
Get the public key as a hex string with a 0x prefix e.g. 0x123456...
Get the public key in bytes (Uint8Array).
Uint8Array representation of the public key
Verifies a signed data with a public key
use instanceof Ed25519PublicKey instead.
instanceof Ed25519PublicKey
Represents the public key of an Ed25519 key pair.
Since AIP-55 Aptos supports
Legacy
andUnified
authentication keys.Ed25519 scheme is represented in the SDK as
Legacy authentication key
and also asAnyPublicKey
that represents anyUnified authentication key