Each account stores an authentication key. Authentication key enables account owners to rotate their private key(s) associated with the account without changing the address that hosts their account.

Account Basics

Account addresses can be derived from AuthenticationKey

Hierarchy (view full)

Constructors

Properties

data: Hex

The raw bytes of the authentication key.

LENGTH: number

An authentication key is always a SHA3-256 hash of data, and is always 32 bytes.

The data to hash depends on the underlying public key type and the derivation scheme.

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

  • Helper function to get a value's BCS-serialized bytes as a Hex instance.

    Returns Hex

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

  • Derives an account address from an AuthenticationKey. Since an AccountAddress is also 32 bytes, the AuthenticationKey bytes are directly translated to an AccountAddress.

    Returns AccountAddress

    AccountAddress

  • Parameters

    Returns void

  • Returns a string representation of an object.

    Returns string

  • Returns Uint8Array

  • Deserialize an AuthenticationKey from the byte buffer in a Deserializer instance.

    Parameters

    • deserializer: Deserializer

      The deserializer to deserialize the AuthenticationKey from.

    Returns AuthenticationKey

    An instance of AuthenticationKey.

  • Converts a PublicKey(s) to an AuthenticationKey, using the derivation scheme inferred from the instance of the PublicKey type passed in.

    Parameters

    Returns AuthenticationKey

    AuthenticationKey

  • Parameters

    Returns AuthenticationKey

    Use fromPublicKey instead Derives an AuthenticationKey from the public key seed bytes and an explicit derivation scheme.

    This facilitates targeting a specific scheme for deriving an authentication key from a public key.