Class ZenlessZoneZero

Class representing the Zenless Zone Zero game.

Constructors

Properties

cookie: ICookie

The cookie used for authentication.

The Daily module for the Zenless Zone Zero game.

The Record module for the Zenless Zone Zero game.

This module provides methods to interact with the Record module endpoints.

redeem: RedeemModule

The Redeem module for the Zenless Zone Zero game.

region: null | string

The region of the Zenless Zone Zero account.

uid: null | number

The UID of the Zenless Zone Zero account.

Accessors

  • get account(): null | IGame
  • Getter for the account property.

    Returns null | IGame

    The current value of the account property.

  • set account(game): void
  • Setter for the account property. Prevents from changing the value once set

    Parameters

    • game: null | IGame

      The game object to set as the account.

    Returns void

Methods

  • Create a new instance of ZenlessZoneZero using a Hoyolab account. If uid is not provided in the options, the account with the highest level will be used.

    Parameters

    • options: ZZZOptions

      The options for the ZenlessZoneZero instance.

    Returns Promise<ZenlessZoneZero>

    • A promise that resolves with a new ZenlessZoneZero instance.

    If an object is instantiated from this method but options.cookie.cookieTokenV2 is not set, it will throw an error. This method will access an Endpoint that contains a list of game accounts, which requires the cookieTokenV2 option.