igpapi — Instagram private API Simulator for Node.js (API reference) 4.14.0
    Preparing search index...

    Function screenSet

    • The screens of a platform, from one value typed by its screen registry (screenSet<AndroidScreens>('android', { SearchResultsTopTab: SearchResultsTopTabScreen, … }): each definition under its own ScreenId, every screen of the registry, the same registry the platform's screenEdges are typed by).

      • layer installs the ScreenCatalog the process needs: the platform (a trail names it, a retrace checks it) and the screens by id, which the edges open.

      • retrace(trail) takes the trail again from the screen the launch opened (OpenApp first; the screen on top must be the trail's root, opened with the same input, else ScreenTrailMismatchError): each step's edge, from the screen the previous step reached — from its item found again by its identity key in fresh data (ScreenRetraceItemMissingError when it is gone) — recomputed over the fresh state, so fresh requests go out with fresh tokens and the navigation is emitted anew. It succeeds with the screen on top, typed as the union of these screens' handles, told apart by id (switch (screen.id)); a trail this process wrote narrows it. Its errors are the screens' own wrapped as ScreenRetraceStepError, and its services are the screens' own, the stack's and the navigation's, plus the process services every assembled handle holds (a retraced handle's checkpoint() runs with them, like any other handle's). A screen on top the set does not hold is ScreenTrailUnsupportedError, before anything is sent. A drift of the app version is allowed. A retrace is a transition and a transaction: when it fails, the stack and the navigation are what they were before it.

      • The checkpoint restores are not members of the set: a restore builds the process from the checkpoint itself, so each is a method of the screen definition (AndroidIgpapi.resumeSilently({ checkpoint, screen: XxxScreen, … })) that the platform installs on its definitions (owner decision, 2026-10-24). The engine's restores (restoreSilentlyOf and its two siblings) take the definition and run inside a process that already exists; the platform's methods build that process and call them.

      The platform exports retrace next to its launch simulation; OpenApp stays inside the package.

      Type Parameters

      • Registry

      Parameters

      Returns {
          layer: Layer<ScreenCatalog, never, never>;
          retrace: <T>(
              saved: T,
          ) => Effect<
              ScreenRetraced<T, D> & ScreenFrameHandle,

                  | SchemaError
                  | ScreenEnterConcurrentError
                  | ScreenRetraceError
                  | ScreenTrailUnsupportedError
                  | ScreenTrailFormatError
                  | ScreenTrailDecodeError
                  | ScreenTrailMismatchError
                  | ScreenRetraceItemMissingError
                  | ScreenRetraceStepError<ScreenSetFailure<D>>,
              ScreenEnterServices<ScreenSetServices<D>, never>,
          >;
      }