@moonpay/platform-sdk-react-native 1.4.2 → 1.6.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.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { ListPaymentMethodsResponse, GetQuoteParams, Quote, Transaction, PaginationInfo, TransactionWithStages } from '@moonpay/platform-protocol/api';
2
- export { GetQuoteParams, ListPaymentMethodsResponse, PaginationInfo, PaymentMethodConfig, PaymentMethodType, Quote, StoredCardPaymentMethod, StoredPaymentMethod, Transaction, TransactionWithStages } from '@moonpay/platform-protocol/api';
1
+ import { ListPaymentMethodsResponse, GetQuoteParams, Quote, ListAssetsResponse, Transaction, PaginationInfo, TransactionWithStages } from '@moonpay/platform-protocol/api';
2
+ export { AssetStatus, GetQuoteParams, ListAssetsResponse, ListPaymentMethodsResponse, PaginationInfo, PaymentMethodConfig, PaymentMethodType, PlatformAsset, Quote, StoredCardPaymentMethod, StoredPaymentMethod, Transaction, TransactionWithStages } from '@moonpay/platform-protocol/api';
3
3
  export { CardResponse } from '@moonpay/platform-protocol/frames/add-card';
4
4
  export { Cancellation as ChallengeCancellation, CompleteResult as ChallengeCompleteResult } from '@moonpay/platform-protocol/frames/challenge';
5
5
  import { Connection } from '@moonpay/platform-protocol/models/connection';
@@ -24,9 +24,9 @@ import * as GooglePaySdk from '@moonpay/platform-protocol/sdks/google-pay';
24
24
  export { Event as GooglePayEvent, SetupError as SetupGooglePayError } from '@moonpay/platform-protocol/sdks/google-pay';
25
25
  import * as WidgetSdk from '@moonpay/platform-protocol/sdks/widget';
26
26
  export { SetupError as SetupWidgetError, Event as WidgetEvent } from '@moonpay/platform-protocol/sdks/widget';
27
- import { FrameTransport, FrameOptions, ThemeOptions, ListTransactionsParams } from '@moonpay/platform-sdk-core';
28
- export { ThemeOptions } from '@moonpay/platform-sdk-core';
29
- import { GetPaymentMethodsError, GetQuoteError, GetTransactionsError, DevPlatformApiError, CreateIdentityError, GetIdentityError, UpdateIdentityError, VerifyIdentityError, GetIdentityUploadUrlError, SubmitIdentityFilesError } from '@moonpay/platform-protocol/api/errors';
27
+ import { FrameTransport, FrameOptions, ThemeOptions, ListAssetsParams, ListTransactionsParams } from '@moonpay/platform-sdk-core';
28
+ export { ListAssetsParams, ThemeOptions } from '@moonpay/platform-sdk-core';
29
+ import { GetPaymentMethodsError, GetQuoteError, GetAssetsError, GetTransactionsError, DevPlatformApiError, CreateIdentityError, GetIdentityError, UpdateIdentityError, VerifyIdentityError, GetIdentityUploadUrlError, SubmitIdentityFilesError } from '@moonpay/platform-protocol/api/errors';
30
30
  import { CreateIdentityRequestBody, Identity, UpdateIdentityRequestBody, IdentityVerificationResponse, IdentityFileUploadUrlRequestBody, IdentityFileUploadUrl, SubmitIdentityFilesRequestBody } from '@moonpay/platform-protocol/api/identity';
31
31
  import { ResetConnectionError } from '@moonpay/platform-protocol/sdks/reset';
32
32
  import { ViewStyle } from 'react-native';
@@ -176,6 +176,17 @@ interface WidgetFrame {
176
176
  }
177
177
 
178
178
  interface RNClient {
179
+ /**
180
+ * Probe the customer's connection state via the headless check-connection
181
+ * frame. Returns the `Connection` discriminated union and populates the
182
+ * internal context with bootstrap `accessToken` / `clientToken` for any
183
+ * status that carries credentials (`active`, `connectionRequired`).
184
+ *
185
+ * A `connectionRequired` result may carry `mismatch: true` when the
186
+ * session's email and phone number resolve to different MoonPay
187
+ * customers — partners can branch on it to route the customer through
188
+ * Connect proactively, before rendering payment UI.
189
+ */
179
190
  getConnection(options?: GetConnectionOptions): Promise<Result<Connection, ConnectSdk.GetConnectionError>>;
180
191
  connect(options: ConnectOptions): Promise<Result<ConnectFrame, ConnectSdk.ConnectError>>;
181
192
  /**
@@ -193,6 +204,11 @@ interface RNClient {
193
204
  getQuote(params: GetQuoteParams): Promise<Result<{
194
205
  data: Quote;
195
206
  }, GetQuoteError>>;
207
+ /**
208
+ * Lists crypto assets (CeFi and DeFi) available for purchase. DeFi tokens are
209
+ * returned with `status.verified: false`; quote them by `caip19` rather than `code`.
210
+ */
211
+ getAssets(params?: ListAssetsParams): Promise<Result<ListAssetsResponse, GetAssetsError>>;
196
212
  listTransactions(params?: ListTransactionsParams): Promise<Result<{
197
213
  data: Transaction[];
198
214
  pageInfo: PaginationInfo;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ListPaymentMethodsResponse, GetQuoteParams, Quote, Transaction, PaginationInfo, TransactionWithStages } from '@moonpay/platform-protocol/api';
2
- export { GetQuoteParams, ListPaymentMethodsResponse, PaginationInfo, PaymentMethodConfig, PaymentMethodType, Quote, StoredCardPaymentMethod, StoredPaymentMethod, Transaction, TransactionWithStages } from '@moonpay/platform-protocol/api';
1
+ import { ListPaymentMethodsResponse, GetQuoteParams, Quote, ListAssetsResponse, Transaction, PaginationInfo, TransactionWithStages } from '@moonpay/platform-protocol/api';
2
+ export { AssetStatus, GetQuoteParams, ListAssetsResponse, ListPaymentMethodsResponse, PaginationInfo, PaymentMethodConfig, PaymentMethodType, PlatformAsset, Quote, StoredCardPaymentMethod, StoredPaymentMethod, Transaction, TransactionWithStages } from '@moonpay/platform-protocol/api';
3
3
  export { CardResponse } from '@moonpay/platform-protocol/frames/add-card';
4
4
  export { Cancellation as ChallengeCancellation, CompleteResult as ChallengeCompleteResult } from '@moonpay/platform-protocol/frames/challenge';
5
5
  import { Connection } from '@moonpay/platform-protocol/models/connection';
@@ -24,9 +24,9 @@ import * as GooglePaySdk from '@moonpay/platform-protocol/sdks/google-pay';
24
24
  export { Event as GooglePayEvent, SetupError as SetupGooglePayError } from '@moonpay/platform-protocol/sdks/google-pay';
25
25
  import * as WidgetSdk from '@moonpay/platform-protocol/sdks/widget';
26
26
  export { SetupError as SetupWidgetError, Event as WidgetEvent } from '@moonpay/platform-protocol/sdks/widget';
27
- import { FrameTransport, FrameOptions, ThemeOptions, ListTransactionsParams } from '@moonpay/platform-sdk-core';
28
- export { ThemeOptions } from '@moonpay/platform-sdk-core';
29
- import { GetPaymentMethodsError, GetQuoteError, GetTransactionsError, DevPlatformApiError, CreateIdentityError, GetIdentityError, UpdateIdentityError, VerifyIdentityError, GetIdentityUploadUrlError, SubmitIdentityFilesError } from '@moonpay/platform-protocol/api/errors';
27
+ import { FrameTransport, FrameOptions, ThemeOptions, ListAssetsParams, ListTransactionsParams } from '@moonpay/platform-sdk-core';
28
+ export { ListAssetsParams, ThemeOptions } from '@moonpay/platform-sdk-core';
29
+ import { GetPaymentMethodsError, GetQuoteError, GetAssetsError, GetTransactionsError, DevPlatformApiError, CreateIdentityError, GetIdentityError, UpdateIdentityError, VerifyIdentityError, GetIdentityUploadUrlError, SubmitIdentityFilesError } from '@moonpay/platform-protocol/api/errors';
30
30
  import { CreateIdentityRequestBody, Identity, UpdateIdentityRequestBody, IdentityVerificationResponse, IdentityFileUploadUrlRequestBody, IdentityFileUploadUrl, SubmitIdentityFilesRequestBody } from '@moonpay/platform-protocol/api/identity';
31
31
  import { ResetConnectionError } from '@moonpay/platform-protocol/sdks/reset';
32
32
  import { ViewStyle } from 'react-native';
@@ -176,6 +176,17 @@ interface WidgetFrame {
176
176
  }
177
177
 
178
178
  interface RNClient {
179
+ /**
180
+ * Probe the customer's connection state via the headless check-connection
181
+ * frame. Returns the `Connection` discriminated union and populates the
182
+ * internal context with bootstrap `accessToken` / `clientToken` for any
183
+ * status that carries credentials (`active`, `connectionRequired`).
184
+ *
185
+ * A `connectionRequired` result may carry `mismatch: true` when the
186
+ * session's email and phone number resolve to different MoonPay
187
+ * customers — partners can branch on it to route the customer through
188
+ * Connect proactively, before rendering payment UI.
189
+ */
179
190
  getConnection(options?: GetConnectionOptions): Promise<Result<Connection, ConnectSdk.GetConnectionError>>;
180
191
  connect(options: ConnectOptions): Promise<Result<ConnectFrame, ConnectSdk.ConnectError>>;
181
192
  /**
@@ -193,6 +204,11 @@ interface RNClient {
193
204
  getQuote(params: GetQuoteParams): Promise<Result<{
194
205
  data: Quote;
195
206
  }, GetQuoteError>>;
207
+ /**
208
+ * Lists crypto assets (CeFi and DeFi) available for purchase. DeFi tokens are
209
+ * returned with `status.verified: false`; quote them by `caip19` rather than `code`.
210
+ */
211
+ getAssets(params?: ListAssetsParams): Promise<Result<ListAssetsResponse, GetAssetsError>>;
196
212
  listTransactions(params?: ListTransactionsParams): Promise<Result<{
197
213
  data: Transaction[];
198
214
  pageInfo: PaginationInfo;
package/dist/index.js CHANGED
@@ -833,6 +833,7 @@ function createRNClient(deps) {
833
833
  setupAuth: (opts) => setupAuth(deps, opts),
834
834
  getPaymentMethods: () => core.getPaymentMethods(),
835
835
  getQuote: (params) => core.getQuote(params),
836
+ getAssets: (params) => core.getAssets(params),
836
837
  listTransactions: (params) => core.listTransactions(params),
837
838
  getTransaction: (id) => core.getTransaction(id),
838
839
  setupWidget: (opts) => setupWidget(deps, opts),