@request-seal/core API
    Preparing search index...

    Function fetchWithValidators

    • Conditionally fetch a discovery key set (RFC 9111 Section 4.3.4): send If-None-Match with the stored validator, and an unchanged source answers 304 as a NotModified outcome instead of a key set. storedLifetime seconds persist when the 304 carries no freshness directives of its own.

      Parameters

      • source: unknown
      • etag: unknown
      • storedLifetime: unknown
      • input: unknown = {}

      Returns Promise<
          Result<
              | Readonly<
                  {
                      etag: string;
                      expiresAt: number;
                      fetchedAt: number;
                      notModified: true;
                  },
              >
              | Readonly<
                  {
                      etag: string
                      | null;
                      expiresAt: number;
                      fetchedAt: number;
                      keys: Readonly<Record<string, Resolution>>;
                      lookup: (
                          keyId: unknown,
                          algorithms: unknown,
                          now?: number,
                      ) => Promise<
                          Result<
                              Readonly<
                                  {
                                      algorithm: SigningAlgorithm;
                                      assertedAlgorithm: (...)
                                      | (...);
                                      expiresAt: number;
                                      fetchedAt: number;
                                      key: PublicKey;
                                      keyId: string;
                                      location: string;
                                      origin: string;
                                      proof: (...) | (...) | (...);
                                      revision: (...) | (...);
                                      sourceType: (...) | (...) | (...);
                                      thumbprint: string;
                                  },
                              >,
                          >,
                      >;
                      origin: string;
                      proof: "signed"
                      | "unsigned"
                      | "not_applicable";
                      revision: string;
                      source: DiscoverySource;
                  },
              >,
          >,
      >