@frontiertower/frontier-sdk 0.5.0 → 0.9.0
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/README.md +21 -4
- package/dist/{chunk-7VB6TETG.mjs → chunk-HCHF3YXU.mjs} +12 -4
- package/dist/index.d.mts +514 -1
- package/dist/index.d.ts +514 -1
- package/dist/index.js +303 -4
- package/dist/index.mjs +299 -1
- package/dist/ui-utils/index.d.mts +5 -1
- package/dist/ui-utils/index.d.ts +5 -1
- package/dist/ui-utils/index.js +13 -4
- package/dist/ui-utils/index.mjs +3 -1
- package/package.json +1 -1
package/dist/ui-utils/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of allowed Frontier Wallet origins
|
|
3
|
+
*/
|
|
4
|
+
declare const ALLOWED_ORIGINS: string[];
|
|
1
5
|
/**
|
|
2
6
|
* Check if the app is running inside a Frontier Wallet iframe
|
|
3
7
|
* Simply checks if the window is embedded in an iframe
|
|
@@ -20,4 +24,4 @@ declare function renderStandaloneMessage(container: HTMLElement, appName?: strin
|
|
|
20
24
|
*/
|
|
21
25
|
declare function createStandaloneHTML(appName?: string): string;
|
|
22
26
|
|
|
23
|
-
export { createStandaloneHTML, getParentOrigin, isInFrontierApp, renderStandaloneMessage };
|
|
27
|
+
export { ALLOWED_ORIGINS, createStandaloneHTML, getParentOrigin, isInFrontierApp, renderStandaloneMessage };
|
package/dist/ui-utils/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/ui-utils/index.ts
|
|
21
21
|
var ui_utils_exports = {};
|
|
22
22
|
__export(ui_utils_exports, {
|
|
23
|
+
ALLOWED_ORIGINS: () => ALLOWED_ORIGINS,
|
|
23
24
|
createStandaloneHTML: () => createStandaloneHTML,
|
|
24
25
|
getParentOrigin: () => getParentOrigin,
|
|
25
26
|
isInFrontierApp: () => isInFrontierApp,
|
|
@@ -28,6 +29,13 @@ __export(ui_utils_exports, {
|
|
|
28
29
|
module.exports = __toCommonJS(ui_utils_exports);
|
|
29
30
|
|
|
30
31
|
// src/ui-utils/detection.ts
|
|
32
|
+
var ALLOWED_ORIGINS = [
|
|
33
|
+
"http://localhost:5173",
|
|
34
|
+
"https://sandbox.os.frontiertower.io",
|
|
35
|
+
"https://alpha.os.frontiertower.io",
|
|
36
|
+
"https://beta.os.frontiertower.io",
|
|
37
|
+
"https://os.frontiertower.io"
|
|
38
|
+
];
|
|
31
39
|
function isInFrontierApp() {
|
|
32
40
|
return window.self !== window.top;
|
|
33
41
|
}
|
|
@@ -108,7 +116,7 @@ function renderStandaloneMessage(container, appName = "Frontier App") {
|
|
|
108
116
|
color: #4a5568;
|
|
109
117
|
line-height: 1.8;
|
|
110
118
|
">
|
|
111
|
-
<li>Visit <a href="https://
|
|
119
|
+
<li>Visit <a href="https://os.frontiertower.io" style="color: #667eea; text-decoration: underline; font-weight: 500;">os.frontiertower.io</a></li>
|
|
112
120
|
<li>Go to the App Store</li>
|
|
113
121
|
<li>Install this app</li>
|
|
114
122
|
</ol>
|
|
@@ -120,7 +128,7 @@ function renderStandaloneMessage(container, appName = "Frontier App") {
|
|
|
120
128
|
border-top: 1px solid #e2e8f0;
|
|
121
129
|
">
|
|
122
130
|
<a
|
|
123
|
-
href="https://
|
|
131
|
+
href="https://os.frontiertower.io"
|
|
124
132
|
style="
|
|
125
133
|
display: inline-block;
|
|
126
134
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
@@ -202,7 +210,7 @@ function createStandaloneHTML(appName = "Frontier App") {
|
|
|
202
210
|
color: #4a5568;
|
|
203
211
|
line-height: 1.8;
|
|
204
212
|
">
|
|
205
|
-
<li>Visit <a href="https://
|
|
213
|
+
<li>Visit <a href="https://os.frontiertower.io" style="color: #667eea; text-decoration: underline; font-weight: 500;">os.frontiertower.io</a></li>
|
|
206
214
|
<li>Go to the App Store</li>
|
|
207
215
|
<li>Install this app</li>
|
|
208
216
|
</ol>
|
|
@@ -214,7 +222,7 @@ function createStandaloneHTML(appName = "Frontier App") {
|
|
|
214
222
|
border-top: 1px solid #e2e8f0;
|
|
215
223
|
">
|
|
216
224
|
<a
|
|
217
|
-
href="https://
|
|
225
|
+
href="https://os.frontiertower.io"
|
|
218
226
|
style="
|
|
219
227
|
display: inline-block;
|
|
220
228
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
@@ -237,6 +245,7 @@ function createStandaloneHTML(appName = "Frontier App") {
|
|
|
237
245
|
}
|
|
238
246
|
// Annotate the CommonJS export names for ESM import in node:
|
|
239
247
|
0 && (module.exports = {
|
|
248
|
+
ALLOWED_ORIGINS,
|
|
240
249
|
createStandaloneHTML,
|
|
241
250
|
getParentOrigin,
|
|
242
251
|
isInFrontierApp,
|
package/dist/ui-utils/index.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ALLOWED_ORIGINS,
|
|
2
3
|
createStandaloneHTML,
|
|
3
4
|
getParentOrigin,
|
|
4
5
|
isInFrontierApp,
|
|
5
6
|
renderStandaloneMessage
|
|
6
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-HCHF3YXU.mjs";
|
|
7
8
|
export {
|
|
9
|
+
ALLOWED_ORIGINS,
|
|
8
10
|
createStandaloneHTML,
|
|
9
11
|
getParentOrigin,
|
|
10
12
|
isInFrontierApp,
|