Represents any public key supported by Aptos.

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

Any unified authentication key is represented in the SDK as AnyPublicKey.

Hierarchy (View Summary, Expand)

Implementation - BCS

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

Implementation - Serialization

publicKey: PublicKey

Reference to the inner public key

Index of the underlying enum variant

  • Determines if the current public key is an instance of Ed25519PublicKey.

    Returns boolean

    use publicKey instanceof Ed25519PublicKey instead.

  • Checks if the public key is an instance of Secp256k1PublicKey.

    Returns boolean

    use publicKey instanceof Secp256k1PublicKey instead.

  • Deserializes an AnySignature from the provided deserializer. This function helps in reconstructing the AnySignature object from its serialized form, allowing for further processing or validation.

    Parameters

    • deserializer: Deserializer

      The deserializer instance used to read the serialized data.

    Returns AnyPublicKey

Methods

MMNEPVFCICPMFPCPTTAAATR