@trifle/trifle-hub 1.0.77 → 1.0.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as l, A as M, t as g, f as w, a as $, d as F, B as p, b as v, g as L, c as P, e as D, h as E, i as I, j as k, k as T, I as j, l as y, m as G, n as H, o as C, p as B } from "./index-
|
|
1
|
+
import { s as l, A as M, t as g, f as w, a as $, d as F, B as p, b as v, g as L, c as P, e as D, h as E, i as I, j as k, k as T, I as j, l as y, m as G, n as H, o as C, p as B } from "./index-BSpemnvK.js";
|
|
2
2
|
const N = {
|
|
3
3
|
inputs: [
|
|
4
4
|
{
|
|
@@ -22880,7 +22880,7 @@ const Hc = [
|
|
|
22880
22880
|
stateMutability: "view",
|
|
22881
22881
|
type: "function"
|
|
22882
22882
|
}
|
|
22883
|
-
],
|
|
22883
|
+
], nP = [
|
|
22884
22884
|
{
|
|
22885
22885
|
name: "query",
|
|
22886
22886
|
type: "function",
|
|
@@ -23071,7 +23071,7 @@ class pM extends ve {
|
|
|
23071
23071
|
`), { name: "AbiEncodingLengthMismatchError" });
|
|
23072
23072
|
}
|
|
23073
23073
|
}
|
|
23074
|
-
class
|
|
23074
|
+
class iP extends ve {
|
|
23075
23075
|
constructor(e, { docsPath: t }) {
|
|
23076
23076
|
super([
|
|
23077
23077
|
`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`).`,
|
|
@@ -23084,7 +23084,7 @@ class rP extends ve {
|
|
|
23084
23084
|
});
|
|
23085
23085
|
}
|
|
23086
23086
|
}
|
|
23087
|
-
class
|
|
23087
|
+
class rP extends ve {
|
|
23088
23088
|
constructor(e, { docsPath: t } = {}) {
|
|
23089
23089
|
super([
|
|
23090
23090
|
`Error ${e ? `"${e}" ` : ""}not found on ABI.`,
|
|
@@ -23096,7 +23096,7 @@ class sP extends ve {
|
|
|
23096
23096
|
});
|
|
23097
23097
|
}
|
|
23098
23098
|
}
|
|
23099
|
-
class
|
|
23099
|
+
class sP extends ve {
|
|
23100
23100
|
constructor(e, { docsPath: t }) {
|
|
23101
23101
|
super([
|
|
23102
23102
|
`Encoded error signature "${e}" not found on ABI.`,
|
|
@@ -23139,7 +23139,7 @@ class mM extends ve {
|
|
|
23139
23139
|
});
|
|
23140
23140
|
}
|
|
23141
23141
|
}
|
|
23142
|
-
class
|
|
23142
|
+
class aP extends ve {
|
|
23143
23143
|
constructor(e, { docsPath: t }) {
|
|
23144
23144
|
super([
|
|
23145
23145
|
`Encoded function signature "${e}" not found on ABI.`,
|
|
@@ -25267,7 +25267,7 @@ async function x3(n, e) {
|
|
|
25267
25267
|
});
|
|
25268
25268
|
return q === "0x" ? { data: void 0 } : { data: q };
|
|
25269
25269
|
} catch (O) {
|
|
25270
|
-
const W = S3(O), { offchainLookup: G, offchainLookupSignature: J } = await import("./ccip-
|
|
25270
|
+
const W = S3(O), { offchainLookup: G, offchainLookupSignature: J } = await import("./ccip-CdkR2uDJ.js");
|
|
25271
25271
|
if (n.ccipRead !== !1 && (W == null ? void 0 : W.slice(0, 10)) === J && y)
|
|
25272
25272
|
return { data: await G(n, { data: W, to: y }) };
|
|
25273
25273
|
throw x && (W == null ? void 0 : W.slice(0, 10)) === "0x101bb98d" ? new KE({ factory: u }) : c3(O, {
|
|
@@ -31157,7 +31157,7 @@ const RT = /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9
|
|
|
31157
31157
|
DISCORD: "discord",
|
|
31158
31158
|
FARCASTER: "farcaster",
|
|
31159
31159
|
TWITTER: "twitter"
|
|
31160
|
-
}, zT =
|
|
31160
|
+
}, zT = lh("auth", {
|
|
31161
31161
|
state: () => ({
|
|
31162
31162
|
backendUrl: null,
|
|
31163
31163
|
initialized: !1,
|
|
@@ -31232,21 +31232,23 @@ const RT = /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9
|
|
|
31232
31232
|
},
|
|
31233
31233
|
actions: {
|
|
31234
31234
|
handleClick(n) {
|
|
31235
|
-
var
|
|
31235
|
+
var l;
|
|
31236
31236
|
const e = n.target.closest("a");
|
|
31237
31237
|
if (!e) return;
|
|
31238
|
-
const t = e.href.replace(/\/$/, ""), i = t.includes(window.location.host), r = t.includes("farcaster.xyz/") || t.includes("warpcast.com/"), s = r && t.split("/").length == 4, a = s && ((
|
|
31238
|
+
const t = e.href.replace(/\/$/, ""), i = t.includes(window.location.host), r = t.includes("farcaster.xyz/") || t.includes("warpcast.com/"), s = r && t.split("/").length == 4, a = s && ((l = e.attributes.fid) == null ? void 0 : l.value), o = r && t.split("/").length == 5;
|
|
31239
|
+
t == window.location.href.replace(/\/$/, "");
|
|
31240
|
+
const A = t.includes("farcaster.xyz/miniapps/");
|
|
31239
31241
|
console.log({ href: t, link: e, location: window.location }), console.log({
|
|
31240
31242
|
isFarcasterProfile: s,
|
|
31241
31243
|
fid: a,
|
|
31242
31244
|
isFarcasterPost: o,
|
|
31243
|
-
isFarcasterMiniApp:
|
|
31245
|
+
isFarcasterMiniApp: A,
|
|
31244
31246
|
linkMatchesDomain: i
|
|
31245
31247
|
}), this.isFarcaster && s && a ? (n.preventDefault(), ln.actions.viewProfile({
|
|
31246
31248
|
fid: a
|
|
31247
31249
|
})) : this.isFarcaster && o ? (n.preventDefault(), ln.actions.viewCast({
|
|
31248
31250
|
hash: t.split("/")[4]
|
|
31249
|
-
})) :
|
|
31251
|
+
})) : i ? (n.preventDefault(), this.closeHub()) : this.isFarcaster && A ? (n.preventDefault(), ln.actions.composeCast({
|
|
31250
31252
|
text: "G___ M______",
|
|
31251
31253
|
embeds: ["https://gm.trifle.life"]
|
|
31252
31254
|
})) : this.isFarcaster && !i && (n.preventDefault(), ln.actions.openUrl(e.href));
|
|
@@ -31852,9 +31854,15 @@ const RT = /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9
|
|
|
31852
31854
|
type: "success",
|
|
31853
31855
|
message: "Opening Telegram... Complete authentication there, then return here!"
|
|
31854
31856
|
});
|
|
31855
|
-
const r =
|
|
31857
|
+
const r = await fetch(`${this.backendUrl}/telegram/bot-info`);
|
|
31858
|
+
if (!r.ok)
|
|
31859
|
+
throw new Error("Failed to get bot information");
|
|
31860
|
+
const { botUsername: s } = await r.json();
|
|
31861
|
+
if (!s)
|
|
31862
|
+
throw new Error("Failed to get bot information");
|
|
31863
|
+
const a = `https://t.me/${s}?start=${i}`;
|
|
31856
31864
|
if (window.__trifleTelegramPopup = window.open(
|
|
31857
|
-
|
|
31865
|
+
a,
|
|
31858
31866
|
"_blank",
|
|
31859
31867
|
"width=500,height=700,scrollbars=yes,resizable=yes"
|
|
31860
31868
|
), !window.__trifleTelegramPopup)
|
|
@@ -31917,34 +31925,34 @@ const RT = /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9
|
|
|
31917
31925
|
});
|
|
31918
31926
|
}
|
|
31919
31927
|
}
|
|
31920
|
-
}),
|
|
31928
|
+
}), LT = new uh(), lP = {
|
|
31921
31929
|
install: async (n, e = {}) => {
|
|
31922
31930
|
if (console.log("install TrifleHubVuePlugin"), !e.reownConfig)
|
|
31923
31931
|
throw new Error("reownConfig is required when installing TrifleHub");
|
|
31924
31932
|
let t;
|
|
31925
31933
|
e.devHookPiniaInstance ? t = e.devHookPiniaInstance : t = ch(), e.backendUrl = e.backendUrl || "https://bot-staging.trifle.life";
|
|
31926
|
-
const i =
|
|
31927
|
-
n.provide("TrifleHub/wagmiConfig", r), n.provide("TrifleHub/appKit", s), n.provide("TrifleHub/defaultPage", e.defaultPage || "welcome"), i.initializeAuth(s, r, e.backendUrl), n.use(hh, { config: r }), n.provide("trifleHubInternalPinia", t), n.provide("TrifleHub/store", i), n.use(dh, { queryClient:
|
|
31934
|
+
const i = zT(t), { wagmiConfig: r, appKit: s } = p2(e.reownConfig);
|
|
31935
|
+
n.provide("TrifleHub/wagmiConfig", r), n.provide("TrifleHub/appKit", s), n.provide("TrifleHub/defaultPage", e.defaultPage || "welcome"), i.initializeAuth(s, r, e.backendUrl), n.use(hh, { config: r }), n.provide("trifleHubInternalPinia", t), n.provide("TrifleHub/store", i), n.use(dh, { queryClient: LT }), n.component("TrifleHub", h2);
|
|
31928
31936
|
}
|
|
31929
31937
|
};
|
|
31930
31938
|
export {
|
|
31931
31939
|
dM as A,
|
|
31932
31940
|
ve as B,
|
|
31933
31941
|
xM as I,
|
|
31934
|
-
|
|
31942
|
+
lP as T,
|
|
31935
31943
|
h2 as _,
|
|
31936
|
-
|
|
31937
|
-
|
|
31938
|
-
|
|
31944
|
+
sP as a,
|
|
31945
|
+
aP as b,
|
|
31946
|
+
rP as c,
|
|
31939
31947
|
IE as d,
|
|
31940
|
-
|
|
31948
|
+
iP as e,
|
|
31941
31949
|
mA as f,
|
|
31942
31950
|
Yd as g,
|
|
31943
31951
|
ol as h,
|
|
31944
31952
|
oi as i,
|
|
31945
31953
|
ra as j,
|
|
31946
31954
|
mM as k,
|
|
31947
|
-
|
|
31955
|
+
nP as l,
|
|
31948
31956
|
Ed as m,
|
|
31949
31957
|
x3 as n,
|
|
31950
31958
|
Ji as o,
|
package/dist/index.es.js
CHANGED