UNPKG

@bloxbean/yaci-viewer

Version:

A Cardano blockchain data viewer for developers. It works with the Yaci-Store backend, supporting both a local devnet and public networks.

44 lines (39 loc) 1.92 kB
import { p as public_env } from './shared-server-i79vVjEm.js'; const load = async ({ params, url }) => { let page = url.searchParams.get("page"); if (!page) page = 0; const count = 20; const INDEXER_BASE_URL = public_env.PUBLIC_INDEXER_BASE_URL; const apiUrl = `${INDEXER_BASE_URL}/stake/deregistrations?page=${page}&count=${count}`; console.log(apiUrl); const res = await fetch(apiUrl); const data = await res.json(); const deregistrations = data; console.log(data); if (res.ok) { return { deregistrations, total: 0, total_pages: 0, page, count }; } return { status: 404, body: { error: "Can not fetch stake registrations." } }; }; var _page_server_ts = /*#__PURE__*/Object.freeze({ __proto__: null, load: load }); const index = 8; let component_cache; const component = async () => component_cache ??= (await import('./_page.svelte-BtWG8tGt.js')).default; const server_id = "src/routes/certificates/stakekey-deregistrations/+page.server.ts"; const imports = ["_app/immutable/nodes/8.pn0Q9km9.js","_app/immutable/chunks/disclose-version.BTC8Bk4r.js","_app/immutable/chunks/runtime.NVyxXVLy.js","_app/immutable/chunks/legacy.DKpsC3nd.js","_app/immutable/chunks/render.Dr_6zaa7.js","_app/immutable/chunks/each.e-7RQQYD.js","_app/immutable/chunks/attributes.CqauuZ_8.js","_app/immutable/chunks/class.DCW6ehBg.js","_app/immutable/chunks/lifecycle.BF-zkLgr.js","_app/immutable/chunks/props.Btle0pBM.js","_app/immutable/chunks/store.EL_7F1Fq.js","_app/immutable/chunks/entry.CYtqVooA.js","_app/immutable/chunks/index.DQ_X5mOz.js","_app/immutable/chunks/index-client.TDQqURXd.js","_app/immutable/chunks/stores.DmQQ1jkb.js","_app/immutable/chunks/util.8sVtkjoC.js"]; const stylesheets = []; const fonts = []; export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets }; //# sourceMappingURL=8-C4Awi4f5.js.map