@moonpay/platform-sdk-react-native 1.4.1 → 1.5.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';
@@ -193,6 +193,11 @@ interface RNClient {
193
193
  getQuote(params: GetQuoteParams): Promise<Result<{
194
194
  data: Quote;
195
195
  }, GetQuoteError>>;
196
+ /**
197
+ * Lists crypto assets (CeFi and DeFi) available for purchase. DeFi tokens are
198
+ * returned with `status.verified: false`; quote them by `caip19` rather than `code`.
199
+ */
200
+ getAssets(params?: ListAssetsParams): Promise<Result<ListAssetsResponse, GetAssetsError>>;
196
201
  listTransactions(params?: ListTransactionsParams): Promise<Result<{
197
202
  data: Transaction[];
198
203
  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';
@@ -193,6 +193,11 @@ interface RNClient {
193
193
  getQuote(params: GetQuoteParams): Promise<Result<{
194
194
  data: Quote;
195
195
  }, GetQuoteError>>;
196
+ /**
197
+ * Lists crypto assets (CeFi and DeFi) available for purchase. DeFi tokens are
198
+ * returned with `status.verified: false`; quote them by `caip19` rather than `code`.
199
+ */
200
+ getAssets(params?: ListAssetsParams): Promise<Result<ListAssetsResponse, GetAssetsError>>;
196
201
  listTransactions(params?: ListTransactionsParams): Promise<Result<{
197
202
  data: Transaction[];
198
203
  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),