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.

BLINDER_LENGTH: number

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

  • Returns the public key of the key pair.

    Returns EphemeralPublicKey

    EphemeralPublicKey

  • Returns the public key of the key pair.

    Returns boolean

    boolean

  • Parameters

    Returns void

  • Sign the given message with the private key.

    Parameters

    Returns EphemeralSignature

    EphemeralSignature

  • Parameters

    • bytes: Uint8Array

    Returns EphemeralKeyPair

  • Returns the public key of the key pair.

    Parameters

    • Optionalargs: {
          expiryDateSecs?: number;
          scheme?: Ed25519;
      }
      • OptionalexpiryDateSecs?: number
      • Optionalscheme?: Ed25519

    Returns EphemeralKeyPair

    boolean