A class which contains a key pair that is used in signing transactions via the Keyless authentication scheme. This key pair is ephemeral and has an expiration time. For more details on how this class is used - https://aptos.dev/guides/keyless-accounts/#1-present-the-user-with-a-sign-in-with-idp-button-on-the-ui

Hierarchy (view full)

Constructors

Properties

blinder: Uint8Array

A byte array of length BLINDER_LENGTH used to obfuscate the public key from the IdP. Used in calculating the nonce passed to the IdP and as a secret witness in proof generation.

expiryDateSecs: number

A timestamp in seconds indicating when the ephemeral key pair is expired. After expiry, a new EphemeralKeyPair must be generated and a new JWT needs to be created.

nonce: string

The value passed to the IdP when the user authenticates. It comprises of a hash of the ephermeral public key, expiry date, and blinder.

privateKey: PrivateKey

A private key used to sign transactions. This private key is not tied to any account on the chain as it is ephemeral (not permanent) in nature.

A public key used to verify transactions. This public key is not tied to any account on the chain as it is ephemeral (not permanent) in nature.

BLINDER_LENGTH: number = 31

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