@lumiapassport/ui-kit 1.14.0 → 1.14.1
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 -37
- package/dist/iframe/index.html +2 -3
- package/dist/iframe/main.js +14 -36
- package/dist/iframe/main.js.map +1 -1
- package/dist/index.cjs +951 -855
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -42
- package/dist/index.d.ts +2 -42
- package/dist/index.js +804 -717
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -138,46 +138,13 @@ That's it! The `ConnectWalletButton` provides a complete authentication UI with
|
|
|
138
138
|
title: 'Welcome to MyApp',
|
|
139
139
|
subtitle: 'Sign in to continue',
|
|
140
140
|
|
|
141
|
-
// beta
|
|
142
|
-
dialogClassName: 'string',
|
|
141
|
+
dialogClassName: 'string', // beta
|
|
143
142
|
|
|
144
143
|
authOrder: ['email', 'passkey', 'social'],
|
|
145
144
|
|
|
146
145
|
branding: {
|
|
147
146
|
tagline: 'Powered by MPC',
|
|
148
|
-
link: { text: 'Learn More', url: 'https
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
// TO BE DEPRECATED, cssv is used
|
|
152
|
-
colors: {
|
|
153
|
-
dark: {
|
|
154
|
-
background: '#060117',
|
|
155
|
-
text: '#fefdff',
|
|
156
|
-
textSecondary: '#c4c2c7',
|
|
157
|
-
textMuted: '#8a8890',
|
|
158
|
-
border: '#2a1a3a',
|
|
159
|
-
buttonBackground: '#ff6b35',
|
|
160
|
-
buttonBackgroundEnd: '#f7931e',
|
|
161
|
-
buttonText: '#ffffff',
|
|
162
|
-
buttonBackgroundHover: '#e55a2b',
|
|
163
|
-
buttonBackgroundHoverEnd: '#d67d1a',
|
|
164
|
-
connectedButtonBackground: 'rgba(27, 90, 226, 0.6)',
|
|
165
|
-
connectedButtonBorder: '#4a5568'
|
|
166
|
-
},
|
|
167
|
-
light: {
|
|
168
|
-
background: '#fefdff',
|
|
169
|
-
text: '#060117',
|
|
170
|
-
textSecondary: '#4a4754',
|
|
171
|
-
textMuted: '#6b6a70',
|
|
172
|
-
border: '#e0dde6',
|
|
173
|
-
buttonBackground: '#9333ea',
|
|
174
|
-
buttonBackgroundEnd: '#2563eb',
|
|
175
|
-
buttonText: '#fefdff',
|
|
176
|
-
buttonBackgroundHover: '#7e22ce',
|
|
177
|
-
buttonBackgroundHoverEnd: '#1d4ed8',
|
|
178
|
-
connectedButtonBackground: '#f3f4f6',
|
|
179
|
-
connectedButtonBorder: '#d1d5db'
|
|
180
|
-
}
|
|
147
|
+
link: { text: 'Learn More', url: \'https\:\/\/example.com/docs\' },
|
|
181
148
|
},
|
|
182
149
|
},
|
|
183
150
|
|
|
@@ -234,8 +201,8 @@ That's it! The `ConnectWalletButton` provides a complete authentication UI with
|
|
|
234
201
|
name: 'Lumia Beam',
|
|
235
202
|
symbol: 'LUMIA',
|
|
236
203
|
chainId: 2030232745,
|
|
237
|
-
rpcUrl: 'https
|
|
238
|
-
explorerUrl: 'https
|
|
204
|
+
rpcUrl: 'https\:\/\/beam-rpc.lumia.org',
|
|
205
|
+
explorerUrl: 'https\:\/\/beam-explorer.lumia.org',
|
|
239
206
|
testnet: true,
|
|
240
207
|
},
|
|
241
208
|
}}
|
package/dist/iframe/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<meta http-equiv="X-Content-Type-Options" content="nosniff" />
|
|
16
16
|
<meta http-equiv="Referrer-Policy" content="strict-origin-when-cross-origin" />
|
|
17
17
|
|
|
18
|
-
<title>Lumia Passport Secure Wallet - iframe version 1.14.
|
|
18
|
+
<title>Lumia Passport Secure Wallet - iframe version 1.14.1</title>
|
|
19
19
|
|
|
20
20
|
<!-- Styles will be injected by build process -->
|
|
21
21
|
<style>
|
|
@@ -120,7 +120,6 @@
|
|
|
120
120
|
display: flex;
|
|
121
121
|
align-items: center;
|
|
122
122
|
justify-content: center;
|
|
123
|
-
|
|
124
123
|
font-size: 20px;
|
|
125
124
|
font-weight: 600;
|
|
126
125
|
width: 64px;
|
|
@@ -248,11 +247,11 @@
|
|
|
248
247
|
left: 0;
|
|
249
248
|
right: 0;
|
|
250
249
|
bottom: 0;
|
|
251
|
-
/* background: rgba(0, 0, 0, 0.8); */
|
|
252
250
|
display: flex;
|
|
253
251
|
align-items: center;
|
|
254
252
|
justify-content: center;
|
|
255
253
|
z-index: 10000;
|
|
254
|
+
backdrop-filter: blur(10px);
|
|
256
255
|
}
|
|
257
256
|
|
|
258
257
|
.modal-content {
|
package/dist/iframe/main.js
CHANGED
|
@@ -2786,6 +2786,15 @@ var DKGManager = class extends TokenRefreshApiClient {
|
|
|
2786
2786
|
}
|
|
2787
2787
|
};
|
|
2788
2788
|
|
|
2789
|
+
// src/iframe/lib/onramp/utils.ts
|
|
2790
|
+
function omit(object, ...keys) {
|
|
2791
|
+
const result = { ...object };
|
|
2792
|
+
for (const key of keys) {
|
|
2793
|
+
delete result[key];
|
|
2794
|
+
}
|
|
2795
|
+
return result;
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2789
2798
|
// src/iframe/lib/onramp/binance.ts
|
|
2790
2799
|
var API_DOMAIN = "https://api.lumiapassport.com/on-ramp";
|
|
2791
2800
|
var BinanceOnrampAPI = class {
|
|
@@ -2898,7 +2907,7 @@ var BinanceOnrampAPI = class {
|
|
|
2898
2907
|
if (!data || typeof data !== "object") {
|
|
2899
2908
|
throw new Error(`Invalid payload: expected object, got ${typeof data}`);
|
|
2900
2909
|
}
|
|
2901
|
-
const payload = data;
|
|
2910
|
+
const payload = omit(data, "accessToken");
|
|
2902
2911
|
switch (type) {
|
|
2903
2912
|
case "methods":
|
|
2904
2913
|
if (typeof payload.totalAmount !== "string") {
|
|
@@ -2956,7 +2965,7 @@ var RampnowOnrampAPI = class {
|
|
|
2956
2965
|
async getRampnowConfigQuery(accessToken) {
|
|
2957
2966
|
const response = await fetch(`${API_DOMAIN2}/api/rampnow/cfg`, {
|
|
2958
2967
|
method: "GET",
|
|
2959
|
-
headers: { ...accessToken && { Authorization: accessToken } }
|
|
2968
|
+
headers: { ...accessToken && { Authorization: `Bearer ${accessToken}` } }
|
|
2960
2969
|
});
|
|
2961
2970
|
const data = await response.json();
|
|
2962
2971
|
return data;
|
|
@@ -2964,10 +2973,7 @@ var RampnowOnrampAPI = class {
|
|
|
2964
2973
|
async getRampOrderQuoteQuery(payload, accessToken) {
|
|
2965
2974
|
const response = await fetch(`${API_DOMAIN2}/api/rampnow/quote`, {
|
|
2966
2975
|
method: "POST",
|
|
2967
|
-
headers: {
|
|
2968
|
-
"Content-Type": "application/json",
|
|
2969
|
-
...accessToken && { Authorization: accessToken }
|
|
2970
|
-
},
|
|
2976
|
+
headers: { "Content-Type": "application/json", ...accessToken && { Authorization: `Bearer ${accessToken}` } },
|
|
2971
2977
|
body: JSON.stringify(payload)
|
|
2972
2978
|
});
|
|
2973
2979
|
const data = await response.json();
|
|
@@ -2980,7 +2986,7 @@ var RampnowOnrampAPI = class {
|
|
|
2980
2986
|
if (typeof payload !== "object" || payload === null || typeof payload?.paymentMode !== "string" || typeof payload?.srcAmount !== "number" || typeof payload?.walletAddress !== "string") {
|
|
2981
2987
|
throw new Error("Invalid Ramp order quote payload");
|
|
2982
2988
|
}
|
|
2983
|
-
return payload;
|
|
2989
|
+
return omit(payload, "accessToken");
|
|
2984
2990
|
}
|
|
2985
2991
|
// UNUSED due to Rampnow APP redirect order flow
|
|
2986
2992
|
// async ctreateChekoutOrderMutation(payload: CreateCheckoutOrderMutationPayload) {
|
|
@@ -4230,7 +4236,7 @@ var SigningManager = class extends TokenRefreshApiClient {
|
|
|
4230
4236
|
};
|
|
4231
4237
|
|
|
4232
4238
|
// src/iframe/main.ts
|
|
4233
|
-
var IFRAME_VERSION = "1.14.
|
|
4239
|
+
var IFRAME_VERSION = "1.14.1";
|
|
4234
4240
|
var IframeWallet = class {
|
|
4235
4241
|
constructor() {
|
|
4236
4242
|
console.log("=".repeat(60));
|
|
@@ -4247,34 +4253,6 @@ var IframeWallet = class {
|
|
|
4247
4253
|
this.binance = new BinanceOnrampAPI(this.messenger.sendResponse.bind(this.messenger));
|
|
4248
4254
|
this.rampnow = new RampnowOnrampAPI(this.messenger.sendResponse.bind(this.messenger));
|
|
4249
4255
|
}
|
|
4250
|
-
// private applyThemeColors(): void {
|
|
4251
|
-
// try {
|
|
4252
|
-
// const params = new URLSearchParams(window.location.search)
|
|
4253
|
-
// const bg = params.get('bg')
|
|
4254
|
-
// const text = params.get('text')
|
|
4255
|
-
// const textSec = params.get('textSec')
|
|
4256
|
-
// const border = params.get('border')
|
|
4257
|
-
// if (bg || text || textSec || border) {
|
|
4258
|
-
// const root = document.documentElement
|
|
4259
|
-
// if (bg) {
|
|
4260
|
-
// root.style.setProperty('--iframe-bg', bg)
|
|
4261
|
-
// root.style.setProperty('--iframe-modal-bg', bg)
|
|
4262
|
-
// }
|
|
4263
|
-
// if (text) {
|
|
4264
|
-
// root.style.setProperty('--iframe-text', text)
|
|
4265
|
-
// }
|
|
4266
|
-
// if (textSec) {
|
|
4267
|
-
// root.style.setProperty('--iframe-text-secondary', textSec)
|
|
4268
|
-
// }
|
|
4269
|
-
// if (border) {
|
|
4270
|
-
// root.style.setProperty('--iframe-border', border)
|
|
4271
|
-
// }
|
|
4272
|
-
// console.log('[IframeWallet] Applied theme colors:', { bg, text, textSec, border })
|
|
4273
|
-
// }
|
|
4274
|
-
// } catch (error) {
|
|
4275
|
-
// console.warn('[IframeWallet] Failed to apply theme colors:', error)
|
|
4276
|
-
// }
|
|
4277
|
-
// }
|
|
4278
4256
|
async initialize() {
|
|
4279
4257
|
if (window.location.hostname !== "localhost" && window.location.hostname !== "127.0.0.1" && !window.location.hostname.includes("lumiapassport.com")) {
|
|
4280
4258
|
console.warn("[iframe] \u26A0\uFE0F Running on unexpected origin!");
|