Lens Scripting API
    Preparing search index...

    Class ClientOptionsWearable Only

    Specifies the configuration for creating a commerce client. It defines important behaviors and callback functions, such as the onPurchasesUpdated, which is essential for receiving real-time notifications about the status of user purchases.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    extras?: string

    An optional field that intended for advanced configuration of the CommerceKit client and is not recommended for general developer use. It accepts a JSON-formatted string to allow for flexible customization of the commerce module's behavior, primarily through various settings or extra data, to meet specific internal requirements or features.

    onPurchasesUpdated: (result: PurchaseResult, purchases: Purchase[]) => void

    Essential for receiving real-time updates on the status of user purchases. It is invoked when a purchase is completed, cancelled, or encounters an error, allowing your Lens to react appropriately (e.g., granting access to a purchased item or displaying an error message). The result parameter provides a summary of the outcome, and the optional purchases array contains details of the transactions if successful.

    Methods

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean