test-ahaan-v2-4 1.0.6 → 1.0.8
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.
- package/dist/index.css +56 -22
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +56 -2
- package/dist/index.js +575 -53
- package/dist/index.js.map +1 -1
- package/package.json +14 -8
package/dist/index.js
CHANGED
@@ -16,72 +16,594 @@ var __copyProps = (to, from, except, desc) => {
|
|
16
16
|
return to;
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
var __async = (__this, __arguments, generator) => {
|
20
|
+
return new Promise((resolve, reject) => {
|
21
|
+
var fulfilled = (value) => {
|
22
|
+
try {
|
23
|
+
step(generator.next(value));
|
24
|
+
} catch (e) {
|
25
|
+
reject(e);
|
26
|
+
}
|
27
|
+
};
|
28
|
+
var rejected = (value) => {
|
29
|
+
try {
|
30
|
+
step(generator.throw(value));
|
31
|
+
} catch (e) {
|
32
|
+
reject(e);
|
33
|
+
}
|
34
|
+
};
|
35
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
36
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
37
|
+
});
|
38
|
+
};
|
19
39
|
|
20
40
|
// src/index.tsx
|
21
41
|
var src_exports = {};
|
22
42
|
__export(src_exports, {
|
23
|
-
|
43
|
+
TriaConnectProvider: () => TriaConnectProvider,
|
44
|
+
default: () => src_default,
|
45
|
+
useContractRead: () => useContractRead,
|
46
|
+
useContractWrite: () => useContractWrite,
|
47
|
+
useSendTransaction: () => useSendTransaction,
|
48
|
+
useSignMessage: () => useSignMessage,
|
49
|
+
useTriaTransaction: () => useTriaTransaction
|
24
50
|
});
|
25
51
|
module.exports = __toCommonJS(src_exports);
|
52
|
+
var import_react7 = require("react");
|
53
|
+
|
54
|
+
// src/NavContext.tsx
|
26
55
|
var import_react = require("react");
|
56
|
+
var NavContext = (0, import_react.createContext)();
|
57
|
+
var NavContext_default = NavContext;
|
58
|
+
|
59
|
+
// src/index.tsx
|
60
|
+
var import_core = require("@tria-sdk/core");
|
61
|
+
|
62
|
+
// src/Components/TriaWalletButton.tsx
|
27
63
|
var import_jsx_runtime = require("react/jsx-runtime");
|
28
|
-
var
|
29
|
-
const
|
30
|
-
|
64
|
+
var TriaWalletButton = ({ bgColor, stackui }) => {
|
65
|
+
const hexToRGB = (hex) => {
|
66
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
67
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
68
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
69
|
+
return { r, g, b };
|
70
|
+
};
|
71
|
+
const rgbColor = hexToRGB(bgColor);
|
31
72
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
32
|
-
|
33
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("
|
34
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("
|
35
|
-
|
36
|
-
|
73
|
+
!stackui && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "134", height: "134", viewBox: "0 0 134 134", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("filter", { id: "dynamic-shadow", x: "0", y: "0", width: "180", height: "180", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feDropShadow", { dx: "0", dy: "4", stdDeviation: "15", floodColor: `rgb(${rgbColor.r},${rgbColor.g},${rgbColor.b})`, floodOpacity: "0.5" }) }) }),
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { filter: "url(#dynamic-shadow)", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "35", y: "35", width: "64", height: "64", rx: "32", fill: "#101010" }) }),
|
76
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { filter: "url(#dynamic-shadow)", children: [
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "37.5098", y: "37.5098", width: "58.9804", height: "58.9804", rx: "29.4902", fill: "url(#paint1_linear_1316_13027)", "shape-rendering": "crispEdges" }),
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { "clip-path": "url(#clip0_1316_13027)", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M81 53H53V81H81V53ZM67.8533 61.2654V64.9058L73.8652 62.5352V65.2285C73.8652 65.8062 73.5281 66.3228 73.0206 66.5229L67.8533 68.5606V65.8728C67.8498 65.2986 67.5136 64.7863 67.0087 64.5872L62.686 62.8826C62.1784 62.6824 61.8414 62.1658 61.8414 61.5881V58.8948L67.8533 61.2654ZM67.8533 68.5767V69.2782H67.8618V76.8857H65.3848V71.2581L62.686 70.1938C62.1784 69.9937 61.8414 69.4771 61.8414 68.8993V66.206L67.8533 68.5767Z", fill: "#101010" }) }),
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "37.7598", y: "37.7598", width: "58.4804", height: "58.4804", rx: "29.2402", stroke: bgColor, "stroke-width": "0.5", "shape-rendering": "crispEdges" })
|
80
|
+
] }),
|
81
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("defs", { children: [
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("filter", { id: "filter0_d_1316_13027", x: "0", y: "0", width: "134", height: "134", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feFlood", { "flood-opacity": "0", result: "BackgroundImageFix" }),
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", {}),
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "17.5" }),
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }),
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.567674 0 0 0 0 0.48 0 0 0 0 1 0 0 0 0.35 0" }),
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_1316_13027" }),
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_1316_13027", result: "shape" })
|
91
|
+
] }),
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("filter", { id: "filter1_d_1316_13027", x: "6.50977", y: "6.50977", width: "120.98", height: "120.98", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feFlood", { "flood-opacity": "0", result: "BackgroundImageFix" }),
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", {}),
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "15.5" }),
|
97
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }),
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.567674 0 0 0 0 0.48 0 0 0 0 1 0 0 0 0.68 0" }),
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_1316_13027" }),
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_1316_13027", result: "shape" })
|
101
|
+
] }),
|
102
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: "paint0_linear_1316_13027", x1: "35", y1: "35", x2: "112.218", y2: "65.1631", gradientUnits: "userSpaceOnUse", children: [
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { "stop-color": "#101010" }),
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "1", "stop-color": bgColor })
|
105
|
+
] }),
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: "paint1_linear_1316_13027", x1: "37.5098", y1: "37.5098", x2: "108.671", y2: "65.3071", gradientUnits: "userSpaceOnUse", children: [
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { "stop-color": bgColor }),
|
108
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "1", "stop-color": bgColor })
|
109
|
+
] }),
|
110
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: "clip0_1316_13027", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "53", y: "53", width: "28", height: "28", rx: "6", fill: "#101010" }) })
|
111
|
+
] })
|
112
|
+
] }) }),
|
113
|
+
stackui && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "134", height: "134", viewBox: "0 0 134 134", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { filter: "", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "35", y: "35", width: "64", height: "64", rx: "32", fill: "#101010" }) }),
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { filter: "", children: [
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "37.5098", y: "37.5098", width: "58.9804", height: "58.9804", rx: "29.4902", fill: "#AAFF00", "shape-rendering": "crispEdges" }),
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { "clip-path": "url(#clip0_1316_13027)", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M81 53H53V81H81V53ZM67.8533 61.2654V64.9058L73.8652 62.5352V65.2285C73.8652 65.8062 73.5281 66.3228 73.0206 66.5229L67.8533 68.5606V65.8728C67.8498 65.2986 67.5136 64.7863 67.0087 64.5872L62.686 62.8826C62.1784 62.6824 61.8414 62.1658 61.8414 61.5881V58.8948L67.8533 61.2654ZM67.8533 68.5767V69.2782H67.8618V76.8857H65.3848V71.2581L62.686 70.1938C62.1784 69.9937 61.8414 69.4771 61.8414 68.8993V66.206L67.8533 68.5767Z", fill: "#101010" }) }),
|
118
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "37.7598", y: "37.7598", width: "58.4804", height: "58.4804", rx: "29.2402", stroke: bgColor, "stroke-width": "0.5", "shape-rendering": "crispEdges" })
|
119
|
+
] }),
|
120
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("defs", { children: [
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("filter", { id: "filter0_d_1316_13027", x: "0", y: "0", width: "134", height: "134", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [
|
122
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feFlood", { "flood-opacity": "0", result: "BackgroundImageFix" }),
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
|
124
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", {}),
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "17.5" }),
|
126
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }),
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.567674 0 0 0 0 0.48 0 0 0 0 1 0 0 0 0.35 0" }),
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_1316_13027" }),
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_1316_13027", result: "shape" })
|
130
|
+
] }),
|
131
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("filter", { id: "filter1_d_1316_13027", x: "6.50977", y: "6.50977", width: "120.98", height: "120.98", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feFlood", { "flood-opacity": "0", result: "BackgroundImageFix" }),
|
133
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
|
134
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", {}),
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "15.5" }),
|
136
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }),
|
137
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.567674 0 0 0 0 0.48 0 0 0 0 1 0 0 0 0.68 0" }),
|
138
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_1316_13027" }),
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_1316_13027", result: "shape" })
|
140
|
+
] }),
|
141
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: "paint0_linear_1316_13027", x1: "35", y1: "35", x2: "112.218", y2: "65.1631", gradientUnits: "userSpaceOnUse", children: [
|
142
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { "stop-color": "#101010" }),
|
143
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "1", "stop-color": bgColor })
|
144
|
+
] }),
|
145
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: "paint1_linear_1316_13027", x1: "37.5098", y1: "37.5098", x2: "108.671", y2: "65.3071", gradientUnits: "userSpaceOnUse", children: [
|
146
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { "stop-color": bgColor }),
|
147
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "1", "stop-color": bgColor })
|
148
|
+
] }),
|
149
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: "clip0_1316_13027", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "53", y: "53", width: "28", height: "28", rx: "6", fill: "#101010" }) })
|
150
|
+
] })
|
151
|
+
] }) })
|
152
|
+
] });
|
153
|
+
};
|
154
|
+
|
155
|
+
// src/Components/WalletCloseButton.tsx
|
156
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
157
|
+
var WalletCloseButton = () => {
|
158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: "110", height: "38", viewBox: "0 0 110 38", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
159
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M0 35H2.34523C11.1426 35 19.6355 31.7787 26.22 25.9443L30.9961 21.7123C44.8891 9.4021 65.8643 9.67334 79.4343 22.3387L82.6264 25.318C89.2925 31.5397 98.0714 35 107.19 35H110V37.5H0V35Z", fill: "#101010" }),
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M60.9401 22.2125L56.0501 27.1025C55.4726 27.68 54.5276 27.68 53.9501 27.1025L49.0601 22.2125", stroke: "#FAFAFA", strokeOpacity: "0.8", strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" })
|
161
|
+
] });
|
162
|
+
};
|
163
|
+
var WalletCloseButton_default = WalletCloseButton;
|
164
|
+
|
165
|
+
// src/index.tsx
|
166
|
+
var import_connect = require("@tria-sdk/connect");
|
167
|
+
|
168
|
+
// src/hooks/usePageVisibilty.tsx
|
169
|
+
var import_react2 = require("react");
|
170
|
+
var usePageVisibility = () => {
|
171
|
+
const [isVisible, setIsVisible] = (0, import_react2.useState)(!document.hidden);
|
172
|
+
(0, import_react2.useEffect)(() => {
|
173
|
+
const handleVisibilityChange = () => {
|
174
|
+
setIsVisible(!document.hidden);
|
175
|
+
};
|
176
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
177
|
+
return () => {
|
178
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
179
|
+
};
|
180
|
+
}, []);
|
181
|
+
return isVisible;
|
182
|
+
};
|
183
|
+
var usePageVisibilty_default = usePageVisibility;
|
184
|
+
|
185
|
+
// src/hooks/useContractWrite.tsx
|
186
|
+
var import_react3 = require("react");
|
187
|
+
|
188
|
+
// src/utils/shared.ts
|
189
|
+
var createEncodedData = (data) => {
|
190
|
+
const encodedParams = btoa(
|
191
|
+
JSON.stringify(data)
|
192
|
+
);
|
193
|
+
return encodedParams;
|
194
|
+
};
|
195
|
+
var createIframe = (iframeUrl, hookName) => {
|
196
|
+
const iframeContainer = document.createElement("div");
|
197
|
+
iframeContainer.id = hookName;
|
198
|
+
iframeContainer.className = "bg flex justify-between bg-transparent absolute bottom-4 right-2";
|
199
|
+
iframeContainer.style.position = "absolute";
|
200
|
+
iframeContainer.style.bottom = "4px";
|
201
|
+
iframeContainer.style.right = "2px";
|
202
|
+
const innerContainer = document.createElement("div");
|
203
|
+
innerContainer.className = "mb-4 mr-2 relative rounded-[20px]";
|
204
|
+
const iframeWrapper = document.createElement("div");
|
205
|
+
iframeWrapper.className = "h-[586px] w-[312px] rounded-[20px] overflow-hidden";
|
206
|
+
const iframe = document.createElement("iframe");
|
207
|
+
iframe.width = "312";
|
208
|
+
iframe.height = "586";
|
209
|
+
iframe.src = iframeUrl;
|
210
|
+
iframe.allow = "publickey-credentials-get";
|
211
|
+
iframe.style.border = "none";
|
212
|
+
iframeWrapper.appendChild(iframe);
|
213
|
+
innerContainer.appendChild(iframeWrapper);
|
214
|
+
iframeContainer.appendChild(innerContainer);
|
215
|
+
document.body.appendChild(iframeContainer);
|
216
|
+
};
|
217
|
+
|
218
|
+
// src/hooks/useContractWrite.tsx
|
219
|
+
var authUrl = "https://auth.tria.so";
|
220
|
+
var useContractWrite = (calldata) => {
|
221
|
+
const [data, setData] = (0, import_react3.useState)("");
|
222
|
+
const [isLoading, setIsLoading] = (0, import_react3.useState)(false);
|
223
|
+
const [isError, setIsError] = (0, import_react3.useState)(false);
|
224
|
+
const write = () => {
|
225
|
+
setIsLoading(true);
|
226
|
+
const iframeEncodedData = createEncodedData(calldata);
|
227
|
+
const signIframeUrl = `${authUrl}/mint/${iframeEncodedData}`;
|
228
|
+
createIframe(signIframeUrl, "sdkMint");
|
229
|
+
setIsLoading(false);
|
230
|
+
return signIframeUrl;
|
231
|
+
};
|
232
|
+
(0, import_react3.useEffect)(() => {
|
233
|
+
const detect = (event) => {
|
234
|
+
var _a;
|
235
|
+
console.log("event---------------->", event);
|
236
|
+
if (event.origin !== authUrl)
|
237
|
+
return;
|
238
|
+
let eventData;
|
239
|
+
try {
|
240
|
+
eventData = JSON.parse(event.data);
|
241
|
+
} catch (err) {
|
242
|
+
eventData = event.data;
|
243
|
+
}
|
244
|
+
if ((eventData == null ? void 0 : eventData.type) === "closeIframe" && (eventData == null ? void 0 : eventData.callFrom) == "mint") {
|
245
|
+
setData(eventData == null ? void 0 : eventData.data);
|
246
|
+
setIsLoading(false);
|
247
|
+
(_a = document.getElementById("sdkMint")) == null ? void 0 : _a.remove();
|
248
|
+
}
|
249
|
+
};
|
250
|
+
window.addEventListener("message", detect);
|
251
|
+
return () => {
|
252
|
+
window.removeEventListener("message", detect);
|
253
|
+
};
|
254
|
+
}, []);
|
255
|
+
return { data, isLoading, isError, isSuccess: !!data, write };
|
256
|
+
};
|
257
|
+
|
258
|
+
// src/hooks/useSendTransaction.tsx
|
259
|
+
var import_react4 = require("react");
|
260
|
+
var authUrl2 = "https://auth.tria.so";
|
261
|
+
var useSendTransaction = (calldata) => {
|
262
|
+
const [data, setData] = (0, import_react4.useState)("");
|
263
|
+
const [isLoading, setIsLoading] = (0, import_react4.useState)(false);
|
264
|
+
const [isError, setIsError] = (0, import_react4.useState)(false);
|
265
|
+
const sendTransaction = () => {
|
266
|
+
setIsLoading(true);
|
267
|
+
const iframeEncodedData = createEncodedData(calldata);
|
268
|
+
const signIframeUrl = `${authUrl2}/send/${iframeEncodedData}`;
|
269
|
+
const iframe = createIframe(signIframeUrl, "sdkSend");
|
270
|
+
setIsLoading(false);
|
271
|
+
return signIframeUrl;
|
272
|
+
};
|
273
|
+
(0, import_react4.useEffect)(() => {
|
274
|
+
const detect = (event) => {
|
275
|
+
var _a;
|
276
|
+
if (event.origin !== authUrl2)
|
277
|
+
return;
|
278
|
+
let eventData;
|
279
|
+
try {
|
280
|
+
eventData = JSON.parse(event.data);
|
281
|
+
} catch (err) {
|
282
|
+
eventData = event.data;
|
283
|
+
}
|
284
|
+
if ((eventData == null ? void 0 : eventData.type) === "closeIframe" && (eventData == null ? void 0 : eventData.callFrom) == "send") {
|
285
|
+
setData(eventData == null ? void 0 : eventData.data);
|
286
|
+
setIsLoading(false);
|
287
|
+
(_a = document.getElementById("sdkSend")) == null ? void 0 : _a.remove();
|
288
|
+
}
|
289
|
+
};
|
290
|
+
window.addEventListener("message", detect);
|
291
|
+
return () => {
|
292
|
+
window.removeEventListener("message", detect);
|
293
|
+
};
|
294
|
+
}, []);
|
295
|
+
return { data, isLoading, isError, isSuccess: !!data, sendTransaction };
|
296
|
+
};
|
297
|
+
|
298
|
+
// src/hooks/useSignMessage.tsx
|
299
|
+
var import_react5 = require("react");
|
300
|
+
var authUrl3 = "https://auth.tria.so";
|
301
|
+
var useSignMessage = (calldata) => {
|
302
|
+
const [data, setData] = (0, import_react5.useState)("");
|
303
|
+
const [isLoading, setIsLoading] = (0, import_react5.useState)(false);
|
304
|
+
const [isError, setIsError] = (0, import_react5.useState)(false);
|
305
|
+
const signMessage = () => {
|
306
|
+
setIsLoading(true);
|
307
|
+
const iframeEncodedData = createEncodedData(calldata);
|
308
|
+
const signIframeUrl = `${authUrl3}/signMessage/${iframeEncodedData}`;
|
309
|
+
createIframe(signIframeUrl, "sdkSign");
|
310
|
+
setIsLoading(false);
|
311
|
+
return signIframeUrl;
|
312
|
+
};
|
313
|
+
(0, import_react5.useEffect)(() => {
|
314
|
+
const detect = (event) => {
|
315
|
+
var _a;
|
316
|
+
if (event.origin !== authUrl3)
|
317
|
+
return;
|
318
|
+
let eventData;
|
319
|
+
try {
|
320
|
+
eventData = JSON.parse(event.data);
|
321
|
+
} catch (err) {
|
322
|
+
eventData = event.data;
|
323
|
+
}
|
324
|
+
if ((eventData == null ? void 0 : eventData.type) === "closeIframe" && (eventData == null ? void 0 : eventData.callFrom) == "sign") {
|
325
|
+
console.log("event", eventData);
|
326
|
+
setData(eventData == null ? void 0 : eventData.data);
|
327
|
+
setIsLoading(false);
|
328
|
+
(_a = document.getElementById("sdkSign")) == null ? void 0 : _a.remove();
|
329
|
+
}
|
330
|
+
};
|
331
|
+
window.addEventListener("message", detect);
|
332
|
+
return () => {
|
333
|
+
window.removeEventListener("message", detect);
|
334
|
+
};
|
335
|
+
}, []);
|
336
|
+
return { data, isLoading, isError, isSuccess: !!data, signMessage };
|
337
|
+
};
|
338
|
+
|
339
|
+
// src/hooks/useContractRead.tsx
|
340
|
+
var import_react6 = require("react");
|
341
|
+
var import_ethers = require("ethers");
|
342
|
+
var import_web = require("@tria-sdk/web");
|
343
|
+
var useContractRead = (params) => {
|
344
|
+
const [data, setData] = (0, import_react6.useState)("");
|
345
|
+
const [isLoading, setIsLoading] = (0, import_react6.useState)(false);
|
346
|
+
const [isError, setIsError] = (0, import_react6.useState)(false);
|
347
|
+
const read = () => __async(void 0, null, function* () {
|
348
|
+
try {
|
349
|
+
setIsLoading(true);
|
350
|
+
const { contractDetails, baseUrl = "https://prod.tria.so" } = params;
|
351
|
+
const walletType = { embedded: true };
|
352
|
+
const wallet = new import_web.WalletController({
|
353
|
+
baseUrl,
|
354
|
+
walletType
|
355
|
+
});
|
356
|
+
const res = yield wallet == null ? void 0 : wallet.readContract(contractDetails);
|
357
|
+
const value = import_ethers.ethers.utils.formatEther(res.data);
|
358
|
+
console.log("getItemsNativePrice", res.data.toString(), "->", value);
|
359
|
+
setData(value);
|
360
|
+
setIsLoading(false);
|
361
|
+
} catch (err) {
|
362
|
+
setIsError(true);
|
363
|
+
}
|
364
|
+
});
|
365
|
+
return { data, isLoading, isError, isSuccess: !!data, read };
|
366
|
+
};
|
367
|
+
|
368
|
+
// src/index.tsx
|
369
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
370
|
+
window.Buffer = window.Buffer || require("buffer").Buffer;
|
371
|
+
var authUrl4 = "https://auth.tria.so";
|
372
|
+
var authController = new import_core.AuthController("https://staging.tria.so");
|
373
|
+
var createEncodedData2 = (data) => {
|
374
|
+
const encodedParams = btoa(
|
375
|
+
JSON.stringify(data)
|
376
|
+
);
|
377
|
+
return encodedParams;
|
378
|
+
};
|
379
|
+
var useTriaTransaction = () => {
|
380
|
+
const createIframe2 = (iframeUrl) => {
|
381
|
+
const iframeContainer = document.createElement("div");
|
382
|
+
iframeContainer.id = "triaWallet";
|
383
|
+
iframeContainer.className = "bg flex justify-between bg-transparent absolute bottom-4 right-2";
|
384
|
+
iframeContainer.style.position = "absolute";
|
385
|
+
iframeContainer.style.bottom = "4px";
|
386
|
+
iframeContainer.style.right = "2px";
|
387
|
+
const innerContainer = document.createElement("div");
|
388
|
+
innerContainer.className = "mb-4 mr-2 relative rounded-[20px]";
|
389
|
+
const iframeWrapper = document.createElement("div");
|
390
|
+
iframeWrapper.className = "h-[586px] w-[312px] rounded-[20px] overflow-hidden";
|
391
|
+
const iframe = document.createElement("iframe");
|
392
|
+
iframe.width = "312";
|
393
|
+
iframe.height = "586";
|
394
|
+
iframe.src = iframeUrl;
|
395
|
+
iframe.allow = "publickey-credentials-get";
|
396
|
+
iframe.style.border = "none";
|
397
|
+
iframeWrapper.appendChild(iframe);
|
398
|
+
innerContainer.appendChild(iframeWrapper);
|
399
|
+
iframeContainer.appendChild(innerContainer);
|
400
|
+
document.body.appendChild(iframeContainer);
|
401
|
+
};
|
402
|
+
const sendTransaction = (sendDataFromDapp) => __async(void 0, null, function* () {
|
403
|
+
const iframeEncodedData = createEncodedData2(sendDataFromDapp);
|
404
|
+
const sendIframeUrl = `${authUrl4}/send/${iframeEncodedData}`;
|
405
|
+
const iframe = createIframe2(sendIframeUrl);
|
406
|
+
return sendIframeUrl;
|
407
|
+
});
|
408
|
+
const signMessage = (message) => __async(void 0, null, function* () {
|
409
|
+
const iframeEncodedData = createEncodedData2(message);
|
410
|
+
const signIframeUrl = `${authUrl4}/signMessage/${iframeEncodedData}`;
|
411
|
+
const iframe = createIframe2(signIframeUrl);
|
412
|
+
return signIframeUrl;
|
413
|
+
});
|
414
|
+
const callContract = (data) => __async(void 0, null, function* () {
|
415
|
+
const iframeEncodedData = createEncodedData2(data);
|
416
|
+
const signIframeUrl = `${authUrl4}/mint/${iframeEncodedData}`;
|
417
|
+
const iframe = createIframe2(signIframeUrl);
|
418
|
+
return signIframeUrl;
|
419
|
+
});
|
420
|
+
return {
|
421
|
+
sendTransaction,
|
422
|
+
signMessage,
|
423
|
+
callContract
|
424
|
+
};
|
425
|
+
};
|
426
|
+
var TriaConnectProvider = () => {
|
427
|
+
const [renderAuthIframe, setRenderAuthIframe] = (0, import_react7.useState)(false);
|
428
|
+
(0, import_react7.useEffect)(() => {
|
429
|
+
const getQueryParam = (param) => {
|
430
|
+
return new URLSearchParams(window.location.search).get(param);
|
431
|
+
};
|
432
|
+
const isVerified = getQueryParam("verified") === "true";
|
433
|
+
setRenderAuthIframe(isVerified);
|
434
|
+
}, []);
|
435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: renderAuthIframe && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
436
|
+
"iframe",
|
437
|
+
{
|
438
|
+
src: "https://auth.tria.so/verified",
|
439
|
+
title: "Auth Verification",
|
440
|
+
style: { display: "none" }
|
441
|
+
}
|
442
|
+
) });
|
443
|
+
};
|
444
|
+
var initialChains = ["POLYGON", "ARBITRUM", "FUSE", "AVALANCHE", "BINANCE", "ETH", "FANTOM", "OPTIMISM"];
|
445
|
+
var Application = ({ dappName, dappDomain, uiType, logo, primaryColor = "#A855F7", supportedChains = initialChains, defaultChain = "POLYGON" }) => {
|
446
|
+
const [view, setView] = (0, import_react7.useState)("Home");
|
447
|
+
const [triaName, setTriaName] = (0, import_react7.useState)();
|
448
|
+
const [userAddress, setUserAddress] = (0, import_react7.useState)(null);
|
449
|
+
const [email, setEmail] = (0, import_react7.useState)("");
|
450
|
+
const [showWallet, setShowWallet] = (0, import_react7.useState)(false);
|
451
|
+
const [isDarkMode, setIsDarkMode] = (0, import_react7.useState)(true);
|
452
|
+
const [showOnboarding, setShowOnboarding] = (0, import_react7.useState)(false);
|
453
|
+
const [appDomain, setAppDomain] = (0, import_react7.useState)();
|
454
|
+
const [iframeURL, setIframeURL] = (0, import_react7.useState)();
|
455
|
+
const WALLET_BASE_URL = "https://jade-gingersnap-930e55.netlify.app/";
|
456
|
+
const [accessToken, setAccessToken] = (0, import_react7.useState)();
|
457
|
+
const darkMode = true;
|
458
|
+
const [authIFrameUrl, setAuthIFrameUrl] = (0, import_react7.useState)("");
|
459
|
+
const { account } = (0, import_connect.useAccount)();
|
460
|
+
const [stackui, setStackUi] = (0, import_react7.useState)(false);
|
461
|
+
const [wasOpen, setWasOpen] = (0, import_react7.useState)(false);
|
462
|
+
const [walletVisible, setWalletVisible] = (0, import_react7.useState)(false);
|
463
|
+
const isTabVisible = usePageVisibilty_default();
|
464
|
+
(0, import_react7.useEffect)(() => {
|
465
|
+
if (!isTabVisible && showWallet) {
|
466
|
+
setShowWallet(false);
|
467
|
+
setWasOpen(true);
|
468
|
+
} else if (wasOpen) {
|
469
|
+
setShowWallet(true);
|
470
|
+
}
|
471
|
+
}, [isTabVisible]);
|
472
|
+
(0, import_react7.useEffect)(() => {
|
473
|
+
if (!account && triaName) {
|
474
|
+
console.log("Account is null, reloading the page");
|
475
|
+
localStorage.setItem("hasReloaded", "true");
|
476
|
+
window.location.reload();
|
477
|
+
}
|
478
|
+
}, [account, triaName]);
|
479
|
+
(0, import_react7.useEffect)(() => {
|
480
|
+
setInterval(() => {
|
481
|
+
var _a, _b, _c;
|
482
|
+
if (localStorage.getItem("tria.wallet.store") !== null) {
|
483
|
+
setShowOnboarding(false);
|
484
|
+
setTriaName((_a = JSON.parse(localStorage.getItem("tria.wallet.store") || "")) == null ? void 0 : _a.triaName);
|
485
|
+
setUserAddress((_c = (_b = JSON.parse(localStorage.getItem("tria.wallet.store") || "")) == null ? void 0 : _b.evm) == null ? void 0 : _c.address);
|
486
|
+
} else if (localStorage.getItem("wagmi.connected") === "true") {
|
487
|
+
setShowOnboarding(false);
|
488
|
+
const wallet = localStorage.getItem("wagmi.connected");
|
489
|
+
console.log(wallet);
|
490
|
+
} else {
|
491
|
+
setShowOnboarding(true);
|
492
|
+
}
|
493
|
+
}, 500);
|
494
|
+
}, []);
|
495
|
+
(0, import_react7.useEffect)(() => {
|
496
|
+
setInterval(() => {
|
497
|
+
setShowOnboarding(true);
|
498
|
+
}, 1e3);
|
499
|
+
}, []);
|
500
|
+
(0, import_react7.useEffect)(() => {
|
501
|
+
const item = localStorage.getItem("access_token");
|
502
|
+
setAccessToken(item || "");
|
503
|
+
setAppDomain(window.parent.origin);
|
504
|
+
}, [triaName]);
|
505
|
+
const fromDapp = true;
|
506
|
+
(0, import_react7.useEffect)(() => {
|
507
|
+
const encodedParams = btoa(JSON.stringify({ triaName, userAddress, appDomain, darkMode, logo, accessToken, primaryColor, fromDapp, dappName, defaultChain, supportedChains }));
|
508
|
+
console.log(encodedParams, userAddress, triaName, accessToken, logo, appDomain, darkMode, primaryColor, fromDapp, dappName, defaultChain, supportedChains);
|
509
|
+
setIframeURL(`https://wallet.tria.so/${encodedParams}`);
|
510
|
+
}, [triaName, userAddress]);
|
511
|
+
(0, import_react7.useEffect)(() => {
|
512
|
+
console.log("WALLET URL ---->", iframeURL);
|
513
|
+
}, [iframeURL]);
|
514
|
+
const nav_context_object = {
|
515
|
+
view,
|
516
|
+
setView,
|
517
|
+
triaName,
|
518
|
+
setTriaName,
|
519
|
+
dappName,
|
520
|
+
logo,
|
521
|
+
authController,
|
522
|
+
setShowWallet,
|
523
|
+
setShowOnboarding,
|
524
|
+
showOnboarding,
|
525
|
+
email,
|
526
|
+
setEmail
|
527
|
+
};
|
528
|
+
(0, import_react7.useEffect)(() => {
|
529
|
+
console.log("log from sdk ----->", dappName, logo);
|
530
|
+
if (dappName && (dappName == null ? void 0 : dappName.length) > 0 && logo && (logo == null ? void 0 : logo.length) > 0) {
|
531
|
+
setAuthIFrameUrl(`https://auth.tria.so/?dappName=${dappName}&dappLogo=${logo}&stackui=${uiType}&dappDomain=${dappDomain}`);
|
532
|
+
}
|
533
|
+
}, [dappName, logo]);
|
534
|
+
(0, import_react7.useEffect)(() => {
|
535
|
+
if (uiType === "yes") {
|
536
|
+
setStackUi(true);
|
537
|
+
}
|
538
|
+
}, [uiType]);
|
539
|
+
(0, import_react7.useEffect)(() => {
|
540
|
+
const handleClickOutside = (event) => {
|
541
|
+
const iframeElement = document.getElementById("triaWallet");
|
542
|
+
if (iframeElement && !iframeElement.contains(event.target)) {
|
543
|
+
setWalletVisible(false);
|
544
|
+
}
|
545
|
+
};
|
546
|
+
document.addEventListener("mousedown", handleClickOutside);
|
547
|
+
return () => {
|
548
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
549
|
+
};
|
550
|
+
}, []);
|
551
|
+
(0, import_react7.useEffect)(() => {
|
552
|
+
if (primaryColor) {
|
553
|
+
document.documentElement.style.setProperty("--primary-color", primaryColor);
|
554
|
+
}
|
555
|
+
}, [primaryColor]);
|
556
|
+
const handleWalletButtonClick = () => {
|
557
|
+
if (showWallet) {
|
558
|
+
setWalletVisible(true);
|
559
|
+
} else {
|
560
|
+
setShowWallet(true);
|
561
|
+
setWalletVisible(true);
|
562
|
+
}
|
563
|
+
};
|
564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(NavContext_default.Provider, { value: nav_context_object, children: [
|
565
|
+
!triaName && showOnboarding && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "rounded-[20px] overflow-hidden absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("iframe", { width: "314", height: "586", src: authIFrameUrl, allow: "publickey-credentials-get" }) }),
|
566
|
+
showWallet && triaName && userAddress && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
567
|
+
"div",
|
568
|
+
{
|
569
|
+
id: "triaWallet",
|
570
|
+
className: `flex justify-between bg-transparent fixed bottom-4 right-2`,
|
571
|
+
style: { display: walletVisible ? "block" : "none" },
|
572
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mb-4 mr-2 relative rounded-[20px]", children: [
|
573
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "absolute w-[312px] h-[40px] rounded-[20px] top-[-38px] flex items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "cursor-pointer", onClick: () => {
|
574
|
+
setWalletVisible(false);
|
575
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(WalletCloseButton_default, {}) }) }),
|
576
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-[586px] w-[312px] rounded-[20px] overflow-hidden bg-[#101010]", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
577
|
+
"iframe",
|
578
|
+
{
|
579
|
+
width: "312",
|
580
|
+
height: "586",
|
581
|
+
src: iframeURL,
|
582
|
+
allow: "clipboard-read; clipboard-write; publickey-credentials-get",
|
583
|
+
style: { backgroundColor: "#101010" }
|
584
|
+
}
|
585
|
+
) })
|
586
|
+
] })
|
587
|
+
}
|
588
|
+
),
|
589
|
+
triaName && !walletVisible && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
37
590
|
"div",
|
38
591
|
{
|
39
592
|
className: "wallet_icon fixed w-[80px] bottom-4 right-8 cursor-pointer",
|
40
|
-
onClick:
|
41
|
-
|
42
|
-
},
|
43
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative ", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "left-[15.49px] top-[15.49px]", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "134", height: "134", viewBox: "0 0 134 134", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
44
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { filter: "url(#filter0_d_1316_13027)", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "35", y: "35", width: "64", height: "64", rx: "32", fill: "url(#paint0_linear_1316_13027)" }) }),
|
45
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { filter: "url(#filter1_d_1316_13027)", children: [
|
46
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "37.5098", y: "37.5098", width: "58.9804", height: "58.9804", rx: "29.4902", fill: "url(#paint1_linear_1316_13027)", "shape-rendering": "crispEdges" }),
|
47
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { "clip-path": "url(#clip0_1316_13027)", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M81 53H53V81H81V53ZM67.8533 61.2654V64.9058L73.8652 62.5352V65.2285C73.8652 65.8062 73.5281 66.3228 73.0206 66.5229L67.8533 68.5606V65.8728C67.8498 65.2986 67.5136 64.7863 67.0087 64.5872L62.686 62.8826C62.1784 62.6824 61.8414 62.1658 61.8414 61.5881V58.8948L67.8533 61.2654ZM67.8533 68.5767V69.2782H67.8618V76.8857H65.3848V71.2581L62.686 70.1938C62.1784 69.9937 61.8414 69.4771 61.8414 68.8993V66.206L67.8533 68.5767Z", fill: "white" }) }),
|
48
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "37.7598", y: "37.7598", width: "58.4804", height: "58.4804", rx: "29.2402", stroke: "#9A87FF", "stroke-width": "0.5", "shape-rendering": "crispEdges" })
|
49
|
-
] }),
|
50
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("defs", { children: [
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("filter", { id: "filter0_d_1316_13027", x: "0", y: "0", width: "134", height: "134", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [
|
52
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feFlood", { "flood-opacity": "0", result: "BackgroundImageFix" }),
|
53
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
|
54
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", {}),
|
55
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "17.5" }),
|
56
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }),
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.567674 0 0 0 0 0.48 0 0 0 0 1 0 0 0 0.35 0" }),
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_1316_13027" }),
|
59
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_1316_13027", result: "shape" })
|
60
|
-
] }),
|
61
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("filter", { id: "filter1_d_1316_13027", x: "6.50977", y: "6.50977", width: "120.98", height: "120.98", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [
|
62
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feFlood", { "flood-opacity": "0", result: "BackgroundImageFix" }),
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
|
64
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", {}),
|
65
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "15.5" }),
|
66
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }),
|
67
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.567674 0 0 0 0 0.48 0 0 0 0 1 0 0 0 0.68 0" }),
|
68
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_1316_13027" }),
|
69
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_1316_13027", result: "shape" })
|
70
|
-
] }),
|
71
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: "paint0_linear_1316_13027", x1: "35", y1: "35", x2: "112.218", y2: "65.1631", gradientUnits: "userSpaceOnUse", children: [
|
72
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { "stop-color": "white" }),
|
73
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "1", "stop-color": "#D2CAF8" })
|
74
|
-
] }),
|
75
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: "paint1_linear_1316_13027", x1: "37.5098", y1: "37.5098", x2: "108.671", y2: "65.3071", gradientUnits: "userSpaceOnUse", children: [
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { "stop-color": "#9F8BFF" }),
|
77
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "1", "stop-color": "#7053FF" })
|
78
|
-
] }),
|
79
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: "clip0_1316_13027", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "53", y: "53", width: "28", height: "28", rx: "6", fill: "white" }) })
|
80
|
-
] })
|
81
|
-
] }) }) })
|
593
|
+
onClick: handleWalletButtonClick,
|
594
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TriaWalletButton, { bgColor: primaryColor || "#A855F7", stackui })
|
82
595
|
}
|
83
596
|
)
|
84
|
-
] });
|
597
|
+
] }) });
|
85
598
|
};
|
86
|
-
var src_default =
|
599
|
+
var src_default = Application;
|
600
|
+
// Annotate the CommonJS export names for ESM import in node:
|
601
|
+
0 && (module.exports = {
|
602
|
+
TriaConnectProvider,
|
603
|
+
useContractRead,
|
604
|
+
useContractWrite,
|
605
|
+
useSendTransaction,
|
606
|
+
useSignMessage,
|
607
|
+
useTriaTransaction
|
608
|
+
});
|
87
609
|
//# sourceMappingURL=index.js.map
|