@moonpay/platform-sdk-core 1.9.0 → 1.12.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/dist/index.cjs +13 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,7 @@ __export(index_exports, {
|
|
|
23
23
|
FRAME_PATHS: () => FRAME_PATHS,
|
|
24
24
|
TRUSTED_FRAME_ORIGIN_PATTERNS: () => TRUSTED_FRAME_ORIGIN_PATTERNS,
|
|
25
25
|
apiFetch: () => apiFetch,
|
|
26
|
+
applyPresentationParam: () => applyPresentationParam,
|
|
26
27
|
applyThemeParam: () => applyThemeParam,
|
|
27
28
|
buildFrameUrl: () => buildFrameUrl,
|
|
28
29
|
createClientContext: () => createClientContext,
|
|
@@ -43,6 +44,7 @@ __export(index_exports, {
|
|
|
43
44
|
isTrustedFrameOrigin: () => isTrustedFrameOrigin,
|
|
44
45
|
isTrustedFrameUrl: () => isTrustedFrameUrl,
|
|
45
46
|
listTransactions: () => listTransactions,
|
|
47
|
+
presentationParams: () => presentationParams,
|
|
46
48
|
submitCustomerFiles: () => submitCustomerFiles,
|
|
47
49
|
submitCustomerKyc: () => submitCustomerKyc,
|
|
48
50
|
submitIdentityFiles: () => submitIdentityFiles,
|
|
@@ -1715,6 +1717,17 @@ function applyThemeParam(url, theme) {
|
|
|
1715
1717
|
}
|
|
1716
1718
|
return parsed.href;
|
|
1717
1719
|
}
|
|
1720
|
+
function presentationParams(presentation) {
|
|
1721
|
+
return presentation ? { presentation } : {};
|
|
1722
|
+
}
|
|
1723
|
+
function applyPresentationParam(url, presentation) {
|
|
1724
|
+
if (!presentation) return url;
|
|
1725
|
+
const parsed = new URL(url);
|
|
1726
|
+
if (!parsed.searchParams.has("presentation")) {
|
|
1727
|
+
parsed.searchParams.set("presentation", presentation);
|
|
1728
|
+
}
|
|
1729
|
+
return parsed.href;
|
|
1730
|
+
}
|
|
1718
1731
|
/*! Bundled license information:
|
|
1719
1732
|
|
|
1720
1733
|
@noble/ciphers/esm/utils.js:
|