Represents the KeylessPublicKey public key

KeylessPublicKey authentication key is represented in the SDK as AnyPublicKey.

Hierarchy (view full)

Constructors

Properties

idCommitment: Uint8Array

A value representing a cryptographic commitment to a user identity.

It is calculated from the aud, uidKey, uidVal, pepper.

iss: string

The value of the 'iss' claim on the JWT which identifies the OIDC provider.

ID_COMMITMENT_LENGTH: number

The number of bytes that idCommitment should be

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

  • Parameters

    Returns void

  • Get the public key as a hex string with the 0x prefix.

    Returns string

    string representation of the public key

  • Get the public key in bytes (Uint8Array).

    Returns Uint8Array

    Uint8Array representation of the public key

  • Verifies a signed data with a public key

    Parameters

    Returns boolean

    true if the signature is valid

  • Creates a KeylessPublicKey from the JWT components plus pepper

    Parameters

    • args: {
          aud: string;
          iss: string;
          pepper: HexInput;
          uidKey: string;
          uidVal: string;
      }
      • aud: string

        the client ID of the application

      • iss: string

        the iss of the identity

      • pepper: HexInput

        The pepper used to maintain privacy of the account

      • uidKey: string

        the key to use to get the uidVal in the JWT token

      • uidVal: string

        the value of the uidKey in the JWT token

    Returns KeylessPublicKey

    KeylessPublicKey

  • Parameters

    • args: {
          jwt: string;
          pepper: HexInput;
          uidKey?: string;
      }
      • jwt: string
      • pepper: HexInput
      • OptionaluidKey?: string

    Returns KeylessPublicKey

  • Parameters

    Returns boolean

  • Parameters

    Returns publicKey is KeylessPublicKey