@moonpay/platform-sdk-core 1.15.0 → 1.15.2
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 +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -201,6 +201,12 @@ declare function presentationParams(presentation?: PresentationMode): Record<str
|
|
|
201
201
|
* already carries one.
|
|
202
202
|
*/
|
|
203
203
|
declare function applyPresentationParam(url: string, presentation?: PresentationMode): string;
|
|
204
|
+
/**
|
|
205
|
+
* Set the `clientToken` query param on an already-built frame URL (e.g. a
|
|
206
|
+
* challenge URL supplied via a quote's `challenge` field) — unless the URL
|
|
207
|
+
* already carries one, and only when the client actually holds one.
|
|
208
|
+
*/
|
|
209
|
+
declare function applyClientTokenParam(url: string, clientToken: string): string;
|
|
204
210
|
|
|
205
211
|
interface CoreClientOptions extends ClientContextOptions, UrlBuilderOptions {
|
|
206
212
|
/**
|
|
@@ -349,4 +355,4 @@ declare function isTrustedFrameOrigin(origin: string): boolean;
|
|
|
349
355
|
*/
|
|
350
356
|
declare function isTrustedFrameUrl(value: string): boolean;
|
|
351
357
|
|
|
352
|
-
export { type ClientContext, type ClientContextOptions, type CoreClient, type CoreClientOptions, FRAME_PATHS, type FrameHandle, type FrameOptions, type FrameOrchestratorOptions, type FrameTransport, type KeyPair, type ListAssetsParams, type ListTransactionsParams, type PresentationMode, TRUSTED_FRAME_ORIGIN_PATTERNS, type ThemeOptions, type UrlBuilderOptions, apiFetch, applyPresentationParam, applyThemeParam, buildFrameUrl, createClientContext, createClientCore, createFrameOrchestrator, createIdentity, decryptCredentials, deletePaymentMethod, generateKeyPair, getAssets, getCustomer, getCustomerUploadUrl, getIdentity, getIdentityUploadUrl, getPaymentMethods, getQuote, getTransaction, isTrustedFrameOrigin, isTrustedFrameUrl, listTransactions, presentationParams, simulateBankTransfer, submitCustomerFiles, submitCustomerKyc, submitIdentityFiles, themeParams, updateIdentity, verifyIdentity };
|
|
358
|
+
export { type ClientContext, type ClientContextOptions, type CoreClient, type CoreClientOptions, FRAME_PATHS, type FrameHandle, type FrameOptions, type FrameOrchestratorOptions, type FrameTransport, type KeyPair, type ListAssetsParams, type ListTransactionsParams, type PresentationMode, TRUSTED_FRAME_ORIGIN_PATTERNS, type ThemeOptions, type UrlBuilderOptions, apiFetch, applyClientTokenParam, applyPresentationParam, applyThemeParam, buildFrameUrl, createClientContext, createClientCore, createFrameOrchestrator, createIdentity, decryptCredentials, deletePaymentMethod, generateKeyPair, getAssets, getCustomer, getCustomerUploadUrl, getIdentity, getIdentityUploadUrl, getPaymentMethods, getQuote, getTransaction, isTrustedFrameOrigin, isTrustedFrameUrl, listTransactions, presentationParams, simulateBankTransfer, submitCustomerFiles, submitCustomerKyc, submitIdentityFiles, themeParams, updateIdentity, verifyIdentity };
|
package/dist/index.d.ts
CHANGED
|
@@ -201,6 +201,12 @@ declare function presentationParams(presentation?: PresentationMode): Record<str
|
|
|
201
201
|
* already carries one.
|
|
202
202
|
*/
|
|
203
203
|
declare function applyPresentationParam(url: string, presentation?: PresentationMode): string;
|
|
204
|
+
/**
|
|
205
|
+
* Set the `clientToken` query param on an already-built frame URL (e.g. a
|
|
206
|
+
* challenge URL supplied via a quote's `challenge` field) — unless the URL
|
|
207
|
+
* already carries one, and only when the client actually holds one.
|
|
208
|
+
*/
|
|
209
|
+
declare function applyClientTokenParam(url: string, clientToken: string): string;
|
|
204
210
|
|
|
205
211
|
interface CoreClientOptions extends ClientContextOptions, UrlBuilderOptions {
|
|
206
212
|
/**
|
|
@@ -349,4 +355,4 @@ declare function isTrustedFrameOrigin(origin: string): boolean;
|
|
|
349
355
|
*/
|
|
350
356
|
declare function isTrustedFrameUrl(value: string): boolean;
|
|
351
357
|
|
|
352
|
-
export { type ClientContext, type ClientContextOptions, type CoreClient, type CoreClientOptions, FRAME_PATHS, type FrameHandle, type FrameOptions, type FrameOrchestratorOptions, type FrameTransport, type KeyPair, type ListAssetsParams, type ListTransactionsParams, type PresentationMode, TRUSTED_FRAME_ORIGIN_PATTERNS, type ThemeOptions, type UrlBuilderOptions, apiFetch, applyPresentationParam, applyThemeParam, buildFrameUrl, createClientContext, createClientCore, createFrameOrchestrator, createIdentity, decryptCredentials, deletePaymentMethod, generateKeyPair, getAssets, getCustomer, getCustomerUploadUrl, getIdentity, getIdentityUploadUrl, getPaymentMethods, getQuote, getTransaction, isTrustedFrameOrigin, isTrustedFrameUrl, listTransactions, presentationParams, simulateBankTransfer, submitCustomerFiles, submitCustomerKyc, submitIdentityFiles, themeParams, updateIdentity, verifyIdentity };
|
|
358
|
+
export { type ClientContext, type ClientContextOptions, type CoreClient, type CoreClientOptions, FRAME_PATHS, type FrameHandle, type FrameOptions, type FrameOrchestratorOptions, type FrameTransport, type KeyPair, type ListAssetsParams, type ListTransactionsParams, type PresentationMode, TRUSTED_FRAME_ORIGIN_PATTERNS, type ThemeOptions, type UrlBuilderOptions, apiFetch, applyClientTokenParam, applyPresentationParam, applyThemeParam, buildFrameUrl, createClientContext, createClientCore, createFrameOrchestrator, createIdentity, decryptCredentials, deletePaymentMethod, generateKeyPair, getAssets, getCustomer, getCustomerUploadUrl, getIdentity, getIdentityUploadUrl, getPaymentMethods, getQuote, getTransaction, isTrustedFrameOrigin, isTrustedFrameUrl, listTransactions, presentationParams, simulateBankTransfer, submitCustomerFiles, submitCustomerKyc, submitIdentityFiles, themeParams, updateIdentity, verifyIdentity };
|
package/dist/index.js
CHANGED
|
@@ -1688,10 +1688,19 @@ function applyPresentationParam(url, presentation) {
|
|
|
1688
1688
|
}
|
|
1689
1689
|
return parsed.href;
|
|
1690
1690
|
}
|
|
1691
|
+
function applyClientTokenParam(url, clientToken) {
|
|
1692
|
+
if (!clientToken) return url;
|
|
1693
|
+
const parsed = new URL(url);
|
|
1694
|
+
if (!parsed.searchParams.has("clientToken")) {
|
|
1695
|
+
parsed.searchParams.set("clientToken", clientToken);
|
|
1696
|
+
}
|
|
1697
|
+
return parsed.href;
|
|
1698
|
+
}
|
|
1691
1699
|
export {
|
|
1692
1700
|
FRAME_PATHS,
|
|
1693
1701
|
TRUSTED_FRAME_ORIGIN_PATTERNS,
|
|
1694
1702
|
apiFetch,
|
|
1703
|
+
applyClientTokenParam,
|
|
1695
1704
|
applyPresentationParam,
|
|
1696
1705
|
applyThemeParam,
|
|
1697
1706
|
buildFrameUrl,
|