kernl API
    Preparing search index...

    Function lookupReplaceable

    • A LookupBefore over the shell's event store and, on a miss, the network.

      The store answers first. When it holds no version, the applesauce address loader asks the given relays and the lookup waits at most timeoutMs for an answer, then takes the newest version that arrived. A loader that fails or stays silent yields undefined, which the consent summary reports as a current version that could not be loaded.

      Parameters

      • store: Pick<EventStore, "getReplaceable">

        The event store that holds the current replaceable events.

      • options: LookupReplaceableOptions = {}

        Network loader, relays and timeout.

      Returns LookupBefore

      A lookup for createConsentHandler and createSigningConsent.

      const lookupBefore = lookupReplaceable(eventStore, { loader, relays: () => tiers.get().discovery });
      createConsentHandler(host, lookupBefore, resolveApplet);