@moonpay/platform-sdk-react-native 1.17.0 → 1.18.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 +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -28,8 +28,8 @@ import * as GooglePaySdk from '@moonpay/platform-protocol/sdks/google-pay';
|
|
|
28
28
|
export { Event as GooglePayEvent, SetupError as SetupGooglePayError } from '@moonpay/platform-protocol/sdks/google-pay';
|
|
29
29
|
import * as WidgetSdk from '@moonpay/platform-protocol/sdks/widget';
|
|
30
30
|
export { SetupError as SetupWidgetError, Event as WidgetEvent } from '@moonpay/platform-protocol/sdks/widget';
|
|
31
|
-
import { FrameTransport, FrameOptions, PresentationMode, ThemeOptions, ListAssetsParams, ListTransactionsParams } from '@moonpay/platform-sdk-core';
|
|
32
|
-
export { ListAssetsParams, ThemeOptions } from '@moonpay/platform-sdk-core';
|
|
31
|
+
import { FrameTransport, FrameOptions, PresentationMode, ThemeOptions, Credentials, GetCredentialsError, ListAssetsParams, ListTransactionsParams } from '@moonpay/platform-sdk-core';
|
|
32
|
+
export { Credentials, GetCredentialsError, ListAssetsParams, ThemeOptions } from '@moonpay/platform-sdk-core';
|
|
33
33
|
import { GetPaymentMethodsError, GetQuoteError, GetAssetsError, GetTransactionsError, SimulateBankTransferError, DevPlatformApiError, GetCustomerError, SubmitCustomerKycError, GetCustomerUploadUrlError, SubmitCustomerFilesError, CreateIdentityError, GetIdentityError, UpdateIdentityError, VerifyIdentityError, GetIdentityUploadUrlError, SubmitIdentityFilesError } from '@moonpay/platform-protocol/api/errors';
|
|
34
34
|
import { UpdateIdentityRequestBody, IdentityFileUploadUrlRequestBody, IdentityFileUploadUrl, SubmitIdentityFilesRequestBody, CreateIdentityRequestBody, Identity, IdentityVerificationResponse } from '@moonpay/platform-protocol/api/identity';
|
|
35
35
|
import { ResetConnectionError } from '@moonpay/platform-protocol/sdks/reset';
|
|
@@ -234,6 +234,18 @@ interface RNClient {
|
|
|
234
234
|
* call `setupAuth()` to drive the customer through email/OTP.
|
|
235
235
|
*/
|
|
236
236
|
setupAuth(options: SetupAuthOptions): Promise<Result<AuthFrame, AuthSdk.SetupError>>;
|
|
237
|
+
/**
|
|
238
|
+
* Returns the connected customer's `{ accessToken, clientToken }` so you can
|
|
239
|
+
* forward the `accessToken` to your own backend for customer-scoped Platform
|
|
240
|
+
* API calls (e.g. server-side quote fetching).
|
|
241
|
+
*
|
|
242
|
+
* Advanced escape hatch — the SDK otherwise keeps these credentials internal.
|
|
243
|
+
* The `accessToken` is short-lived and scoped to the connected customer. Errs
|
|
244
|
+
* with `noActiveSession` until a customer session exists — call
|
|
245
|
+
* `getConnection()` (and `connect()` / `setupAuth()` where needed) first.
|
|
246
|
+
* Synchronous — returns a `Result`, not a Promise.
|
|
247
|
+
*/
|
|
248
|
+
getCredentials(): Result<Credentials, GetCredentialsError>;
|
|
237
249
|
getPaymentMethods(): Promise<Result<{
|
|
238
250
|
data: ListPaymentMethodsResponse;
|
|
239
251
|
}, GetPaymentMethodsError>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -28,8 +28,8 @@ import * as GooglePaySdk from '@moonpay/platform-protocol/sdks/google-pay';
|
|
|
28
28
|
export { Event as GooglePayEvent, SetupError as SetupGooglePayError } from '@moonpay/platform-protocol/sdks/google-pay';
|
|
29
29
|
import * as WidgetSdk from '@moonpay/platform-protocol/sdks/widget';
|
|
30
30
|
export { SetupError as SetupWidgetError, Event as WidgetEvent } from '@moonpay/platform-protocol/sdks/widget';
|
|
31
|
-
import { FrameTransport, FrameOptions, PresentationMode, ThemeOptions, ListAssetsParams, ListTransactionsParams } from '@moonpay/platform-sdk-core';
|
|
32
|
-
export { ListAssetsParams, ThemeOptions } from '@moonpay/platform-sdk-core';
|
|
31
|
+
import { FrameTransport, FrameOptions, PresentationMode, ThemeOptions, Credentials, GetCredentialsError, ListAssetsParams, ListTransactionsParams } from '@moonpay/platform-sdk-core';
|
|
32
|
+
export { Credentials, GetCredentialsError, ListAssetsParams, ThemeOptions } from '@moonpay/platform-sdk-core';
|
|
33
33
|
import { GetPaymentMethodsError, GetQuoteError, GetAssetsError, GetTransactionsError, SimulateBankTransferError, DevPlatformApiError, GetCustomerError, SubmitCustomerKycError, GetCustomerUploadUrlError, SubmitCustomerFilesError, CreateIdentityError, GetIdentityError, UpdateIdentityError, VerifyIdentityError, GetIdentityUploadUrlError, SubmitIdentityFilesError } from '@moonpay/platform-protocol/api/errors';
|
|
34
34
|
import { UpdateIdentityRequestBody, IdentityFileUploadUrlRequestBody, IdentityFileUploadUrl, SubmitIdentityFilesRequestBody, CreateIdentityRequestBody, Identity, IdentityVerificationResponse } from '@moonpay/platform-protocol/api/identity';
|
|
35
35
|
import { ResetConnectionError } from '@moonpay/platform-protocol/sdks/reset';
|
|
@@ -234,6 +234,18 @@ interface RNClient {
|
|
|
234
234
|
* call `setupAuth()` to drive the customer through email/OTP.
|
|
235
235
|
*/
|
|
236
236
|
setupAuth(options: SetupAuthOptions): Promise<Result<AuthFrame, AuthSdk.SetupError>>;
|
|
237
|
+
/**
|
|
238
|
+
* Returns the connected customer's `{ accessToken, clientToken }` so you can
|
|
239
|
+
* forward the `accessToken` to your own backend for customer-scoped Platform
|
|
240
|
+
* API calls (e.g. server-side quote fetching).
|
|
241
|
+
*
|
|
242
|
+
* Advanced escape hatch — the SDK otherwise keeps these credentials internal.
|
|
243
|
+
* The `accessToken` is short-lived and scoped to the connected customer. Errs
|
|
244
|
+
* with `noActiveSession` until a customer session exists — call
|
|
245
|
+
* `getConnection()` (and `connect()` / `setupAuth()` where needed) first.
|
|
246
|
+
* Synchronous — returns a `Result`, not a Promise.
|
|
247
|
+
*/
|
|
248
|
+
getCredentials(): Result<Credentials, GetCredentialsError>;
|
|
237
249
|
getPaymentMethods(): Promise<Result<{
|
|
238
250
|
data: ListPaymentMethodsResponse;
|
|
239
251
|
}, GetPaymentMethodsError>>;
|
package/dist/index.js
CHANGED
|
@@ -965,6 +965,7 @@ function createRNClient(deps) {
|
|
|
965
965
|
getConnection: (options) => getConnection(deps, options ?? {}),
|
|
966
966
|
connect: (opts) => connect(deps, opts),
|
|
967
967
|
setupAuth: (opts) => setupAuth(deps, opts),
|
|
968
|
+
getCredentials: () => core.getCredentials(),
|
|
968
969
|
getPaymentMethods: () => core.getPaymentMethods(),
|
|
969
970
|
getQuote: (params) => core.getQuote(params),
|
|
970
971
|
getAssets: (params) => core.getAssets(params),
|