@frontiertower/frontier-sdk 0.7.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 +4 -4
- package/dist/{chunk-7VB6TETG.mjs → chunk-HCHF3YXU.mjs} +12 -4
- package/dist/index.js +4 -4
- package/dist/index.mjs +1 -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/README.md
CHANGED
|
@@ -106,10 +106,10 @@ Your app must declare required permissions in the Frontier app registry:
|
|
|
106
106
|
The SDK verifies that apps are running in legitimate Frontier Wallet instances. Allowed origins:
|
|
107
107
|
|
|
108
108
|
- `http://localhost:5173` (development)
|
|
109
|
-
- `https://sandbox.
|
|
110
|
-
- `https://alpha.
|
|
111
|
-
- `https://beta.
|
|
112
|
-
- `https://
|
|
109
|
+
- `https://sandbox.os.frontiertower.io`
|
|
110
|
+
- `https://alpha.os.frontiertower.io`
|
|
111
|
+
- `https://beta.os.frontiertower.io`
|
|
112
|
+
- `https://os.frontiertower.io` (production)
|
|
113
113
|
|
|
114
114
|
## Development
|
|
115
115
|
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
// src/ui-utils/detection.ts
|
|
2
|
+
var ALLOWED_ORIGINS = [
|
|
3
|
+
"http://localhost:5173",
|
|
4
|
+
"https://sandbox.os.frontiertower.io",
|
|
5
|
+
"https://alpha.os.frontiertower.io",
|
|
6
|
+
"https://beta.os.frontiertower.io",
|
|
7
|
+
"https://os.frontiertower.io"
|
|
8
|
+
];
|
|
2
9
|
function isInFrontierApp() {
|
|
3
10
|
return window.self !== window.top;
|
|
4
11
|
}
|
|
@@ -79,7 +86,7 @@ function renderStandaloneMessage(container, appName = "Frontier App") {
|
|
|
79
86
|
color: #4a5568;
|
|
80
87
|
line-height: 1.8;
|
|
81
88
|
">
|
|
82
|
-
<li>Visit <a href="https://
|
|
89
|
+
<li>Visit <a href="https://os.frontiertower.io" style="color: #667eea; text-decoration: underline; font-weight: 500;">os.frontiertower.io</a></li>
|
|
83
90
|
<li>Go to the App Store</li>
|
|
84
91
|
<li>Install this app</li>
|
|
85
92
|
</ol>
|
|
@@ -91,7 +98,7 @@ function renderStandaloneMessage(container, appName = "Frontier App") {
|
|
|
91
98
|
border-top: 1px solid #e2e8f0;
|
|
92
99
|
">
|
|
93
100
|
<a
|
|
94
|
-
href="https://
|
|
101
|
+
href="https://os.frontiertower.io"
|
|
95
102
|
style="
|
|
96
103
|
display: inline-block;
|
|
97
104
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
@@ -173,7 +180,7 @@ function createStandaloneHTML(appName = "Frontier App") {
|
|
|
173
180
|
color: #4a5568;
|
|
174
181
|
line-height: 1.8;
|
|
175
182
|
">
|
|
176
|
-
<li>Visit <a href="https://
|
|
183
|
+
<li>Visit <a href="https://os.frontiertower.io" style="color: #667eea; text-decoration: underline; font-weight: 500;">os.frontiertower.io</a></li>
|
|
177
184
|
<li>Go to the App Store</li>
|
|
178
185
|
<li>Install this app</li>
|
|
179
186
|
</ol>
|
|
@@ -185,7 +192,7 @@ function createStandaloneHTML(appName = "Frontier App") {
|
|
|
185
192
|
border-top: 1px solid #e2e8f0;
|
|
186
193
|
">
|
|
187
194
|
<a
|
|
188
|
-
href="https://
|
|
195
|
+
href="https://os.frontiertower.io"
|
|
189
196
|
style="
|
|
190
197
|
display: inline-block;
|
|
191
198
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
@@ -208,6 +215,7 @@ function createStandaloneHTML(appName = "Frontier App") {
|
|
|
208
215
|
}
|
|
209
216
|
|
|
210
217
|
export {
|
|
218
|
+
ALLOWED_ORIGINS,
|
|
211
219
|
isInFrontierApp,
|
|
212
220
|
getParentOrigin,
|
|
213
221
|
renderStandaloneMessage,
|
package/dist/index.js
CHANGED
|
@@ -1179,7 +1179,7 @@ function renderStandaloneMessage(container, appName = "Frontier App") {
|
|
|
1179
1179
|
color: #4a5568;
|
|
1180
1180
|
line-height: 1.8;
|
|
1181
1181
|
">
|
|
1182
|
-
<li>Visit <a href="https://
|
|
1182
|
+
<li>Visit <a href="https://os.frontiertower.io" style="color: #667eea; text-decoration: underline; font-weight: 500;">os.frontiertower.io</a></li>
|
|
1183
1183
|
<li>Go to the App Store</li>
|
|
1184
1184
|
<li>Install this app</li>
|
|
1185
1185
|
</ol>
|
|
@@ -1191,7 +1191,7 @@ function renderStandaloneMessage(container, appName = "Frontier App") {
|
|
|
1191
1191
|
border-top: 1px solid #e2e8f0;
|
|
1192
1192
|
">
|
|
1193
1193
|
<a
|
|
1194
|
-
href="https://
|
|
1194
|
+
href="https://os.frontiertower.io"
|
|
1195
1195
|
style="
|
|
1196
1196
|
display: inline-block;
|
|
1197
1197
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
@@ -1273,7 +1273,7 @@ function createStandaloneHTML(appName = "Frontier App") {
|
|
|
1273
1273
|
color: #4a5568;
|
|
1274
1274
|
line-height: 1.8;
|
|
1275
1275
|
">
|
|
1276
|
-
<li>Visit <a href="https://
|
|
1276
|
+
<li>Visit <a href="https://os.frontiertower.io" style="color: #667eea; text-decoration: underline; font-weight: 500;">os.frontiertower.io</a></li>
|
|
1277
1277
|
<li>Go to the App Store</li>
|
|
1278
1278
|
<li>Install this app</li>
|
|
1279
1279
|
</ol>
|
|
@@ -1285,7 +1285,7 @@ function createStandaloneHTML(appName = "Frontier App") {
|
|
|
1285
1285
|
border-top: 1px solid #e2e8f0;
|
|
1286
1286
|
">
|
|
1287
1287
|
<a
|
|
1288
|
-
href="https://
|
|
1288
|
+
href="https://os.frontiertower.io"
|
|
1289
1289
|
style="
|
|
1290
1290
|
display: inline-block;
|
|
1291
1291
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
package/dist/index.mjs
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.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,
|