···9090 cursor?: string,
9191 limit?: number,
9292) => {
9393- const url = new URL(
9494- localStorage.constellationHost || "https://constellation.microcosm.blue",
9595- );
9393+ const url = new URL(localStorage.constellationHost || "https://constellation.microcosm.blue");
9694 url.pathname = endpoint;
9795 url.searchParams.set("target", target);
9896 if (collection) {
9999- if (!path)
100100- throw new Error("collection and path must either both be set or neither");
9797+ if (!path) throw new Error("collection and path must either both be set or neither");
10198 url.searchParams.set("collection", collection);
10299 url.searchParams.set("path", path);
103100 } else {
104104- if (path)
105105- throw new Error("collection and path must either both be set or neither");
101101+ if (path) throw new Error("collection and path must either both be set or neither");
106102 }
107103 if (limit) url.searchParams.set("limit", `${limit}`);
108104 if (cursor) url.searchParams.set("cursor", `${cursor}`);
···111107 return await res.json();
112108};
113109114114-const getAllBacklinks = (target: string) =>
115115- getConstellation("/links/all", target);
110110+const getAllBacklinks = (target: string) => getConstellation("/links/all", target);
116111117112const getRecordBacklinks = (
118113 target: string,
···128123 path: string,
129124 cursor?: string,
130125 limit?: number,
131131-) =>
132132- getConstellation(
133133- "/links/distinct-dids",
134134- target,
135135- collection,
136136- path,
137137- cursor,
138138- limit || 100,
139139- );
126126+) => getConstellation("/links/distinct-dids", target, collection, path, cursor, limit || 100);
140127141128export {
142129 didDocCache,