Walrus blob · mainnet
import { o } from "./index-CeMnqBop.js";
const a = "https://hygpanrjusixknsubrgr.supabase.co/functions/v1", n = "sb_publishable_twzo_oiChiuTImg8zG1emQ_5wkGh1uJ";
async function r() {
var _a;
const { data: e } = await o.auth.getSession();
return ((_a = e.session) == null ? void 0 : _a.access_token) ?? null;
}
async function c(e) {
try {
const t = await r();
return t ? (await fetch(`${a}/share-register`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${t}` }, body: JSON.stringify({ share_id: e.shareId, kind: e.kind, title: e.title }) })).ok : false;
} catch (t) {
return console.warn("[analytics] registerShare failed", t), false;
}
}
function h(e) {
if (e) try {
const t = { "Content-Type": "application/json" };
n && (t.apikey = n), fetch(`${a}/track-view`, { method: "POST", headers: t, body: JSON.stringify({ share_id: e }), keepalive: true }).catch(() => {
});
} catch {
}
}
async function u() {
const e = await r();
if (!e) throw new Error("not_signed_in");
const t = await fetch(`${a}/share-stats`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${e}` }, body: "{}" });
if (!t.ok) {
const s = await t.json().catch(() => ({}));
throw new Error(s.error ?? `stats_failed_${t.status}`);
}
return t.json();
}
export {
u as f,
c as r,
h as t
};
On-chain registration not yet visible.
The aggregator served this blob, but we couldn't locate a matching BlobRegistered event in our scan window. It may not be certified yet, or live further back than we paged.
Lifecycle data is unavailable until the blob registration is visible on-chain.