@unifold/connect-react-native 0.1.52 → 0.1.54-beta.1

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.mts CHANGED
@@ -362,6 +362,21 @@ interface SupportedDestinationTokensResponse {
362
362
  */
363
363
  declare function getSupportedDestinationTokens(publishableKey?: string): Promise<SupportedDestinationTokensResponse>;
364
364
 
365
+ /**
366
+ * Host-app-supplied user identity, shared across deposit flows. An object (not a
367
+ * bare string) so more fields can be added later without churning the public API.
368
+ * - Coinbase Apple Pay: a valid `email` skips the email-entry/OTP steps (the user
369
+ * only verifies their phone; Coinbase's 60-day phone-freshness rule still applies).
370
+ * - Stripe Link Pay: `email`/`phone` pre-fill; with both set, Stripe may skip its
371
+ * verify steps.
372
+ */
373
+ interface UnifoldUser {
374
+ /** Host-trusted email. Coinbase skips its email steps when set & valid; Stripe pre-fills. */
375
+ email?: string;
376
+ /** User phone (Stripe Link pre-fill; with `email`, Stripe may skip verify steps). */
377
+ phone?: string;
378
+ }
379
+
365
380
  interface BorderRadiusConfig {
366
381
  borderTopLeftRadius?: number;
367
382
  borderTopRightRadius?: number;
@@ -405,19 +420,7 @@ type TransferInputVariant = "single_input" | "double_input" | "compact";
405
420
  */
406
421
  type DepositMenuDisplay = "stacked" | "tabs";
407
422
  /** Controls which screen opens first when the deposit modal is shown */
408
- type DepositInitialScreen = "main" | "transfer" | "card" | "tracker" | "cashapp" | "wallet";
409
- /**
410
- * Host-app-supplied user identity used to pre-fill supported flows.
411
- * Currently consumed by Stripe Link Pay (email/phone pre-fill). Kept as an
412
- * extensible object so more fields can be added later without new top-level
413
- * props.
414
- */
415
- interface UnifoldUser {
416
- /** Pre-fills the user's email (e.g. Stripe Link Pay). */
417
- email?: string;
418
- /** Pre-fills the user's phone; with `email`, Stripe may skip verify steps. */
419
- phone?: string;
420
- }
423
+ type DepositInitialScreen = "main" | "transfer" | "card" | "tracker" | "cashapp" | "wallet" | "apple_pay" | "stripe_link";
421
424
  interface DepositModalProps {
422
425
  /** Whether the modal is visible */
423
426
  visible: boolean;
@@ -432,6 +435,14 @@ interface DepositModalProps {
432
435
  publishableKey: string;
433
436
  /** Custom modal title */
434
437
  modalTitle?: string;
438
+ /** Overrides the Transfer Crypto row title on the main menu and the Transfer Crypto flow header. @default `"Transfer Crypto"` */
439
+ transferCryptoTitle?: string;
440
+ /**
441
+ * Host-app-supplied user identity, set via `beginDeposit({ user })`. Consumed by:
442
+ * - Coinbase Apple Pay — a valid `user.email` skips the email-entry/OTP steps.
443
+ * - Stripe Link Pay — `user.email` / `user.phone` pre-fill (both may skip verify steps).
444
+ */
445
+ user?: UnifoldUser;
435
446
  /** Target token symbol (e.g., "USDC") */
436
447
  destinationTokenSymbol?: string;
437
448
  /** Recipient wallet address */
@@ -458,17 +469,14 @@ interface DepositModalProps {
458
469
  enableCashApp?: boolean;
459
470
  /** Enable "Connect Wallet" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
460
471
  enableConnectWallet?: boolean;
472
+ /** Enable "Pay with Apple Pay" (Coinbase headless onramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
473
+ enableCoinbaseApplePay?: boolean;
461
474
  /** Enable "Deposit with Card" (fiat on-ramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
462
475
  enableFiatOnramp?: boolean;
463
- /** Show "Pay with Link" (Stripe) option in the deposit menu */
476
+ /** Show "Pay with Link" (Stripe) option in the deposit menu. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. The backend `stripe_link.is_hidden` kill switch force-hides it regardless. */
464
477
  enableStripeLink?: boolean;
465
478
  /** Registered Stripe onramp component (Connect sets this from `enableStripeLink`) */
466
479
  StripeOnrampComponent?: React$1.ComponentType<any>;
467
- /**
468
- * Host-app-supplied user identity. Pre-fills supported flows (currently Stripe
469
- * Link Pay email/phone). Set via `beginDeposit({ user })`.
470
- */
471
- user?: UnifoldUser;
472
480
  /** Where to render the Stripe payment method selector: "header" or "inline". Default: "header" */
473
481
  stripePaymentSelectorPosition?: "header" | "inline";
474
482
  /** Skip the success confirmation screen and fire onComplete immediately. Default: false */
@@ -494,6 +502,10 @@ interface DepositModalProps {
494
502
  * - 'transfer': open Transfer Crypto immediately
495
503
  * - 'card': open Buy with Card immediately
496
504
  * - 'tracker': open Deposit Tracker immediately (ignored if the tracker is disabled)
505
+ * - 'cashapp': open Pay with Cash App immediately
506
+ * - 'wallet': open Connect Wallet immediately
507
+ * - 'apple_pay': open Coinbase Apple Pay immediately
508
+ * - 'stripe_link': open Stripe Link Pay immediately
497
509
  */
498
510
  initialScreen?: DepositInitialScreen;
499
511
  /** Callback when deposit succeeds */
@@ -539,6 +551,8 @@ interface DepositModalProps {
539
551
  stripeLink?: BorderRadiusConfig;
540
552
  /** Cash App sheet */
541
553
  cashApp?: BorderRadiusConfig;
554
+ /** Coinbase Apple Pay sheet */
555
+ coinbaseApplePay?: BorderRadiusConfig;
542
556
  /** Connect Wallet sheet */
543
557
  connectWallet?: BorderRadiusConfig;
544
558
  /** WebView sheet (inside buy with card) */
@@ -620,6 +634,8 @@ interface UnifoldConnectProviderConfig {
620
634
  publishableKey: string;
621
635
  config?: {
622
636
  modalTitle?: string;
637
+ /** Overrides the Transfer Crypto row title on the main deposit menu and the Transfer Crypto flow header. @default `"Transfer Crypto"` */
638
+ transferCryptoTitle?: string;
623
639
  hideDepositTracker?: boolean;
624
640
  /** Theme appearance: 'light', 'dark', or 'auto' (system preference). Defaults to 'dark' */
625
641
  appearance?: ThemeMode | "auto";
@@ -640,8 +656,11 @@ interface UnifoldConnectProviderConfig {
640
656
  /** Border radius configuration for all bottom sheets */
641
657
  sheetBorderRadius?: DepositModalProps["sheetBorderRadius"];
642
658
  /**
643
- * Show "Pay with Link" (Stripe) option in the deposit menu.
644
- * Stripe onramp is bundled with Connect; set to false to hide the option.
659
+ * Show "Pay with Link" (Stripe) option in the deposit menu. Overrides
660
+ * dashboard default. Resolves as flag ?? dashboard value ?? false omit it
661
+ * to defer to the backend config. Stripe onramp is bundled with Connect.
662
+ * Note: the backend `stripe_link.is_hidden` kill switch force-hides the
663
+ * option regardless of this flag.
645
664
  */
646
665
  enableStripeLink?: boolean;
647
666
  /** Enable "Transfer Crypto" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
@@ -650,6 +669,8 @@ interface UnifoldConnectProviderConfig {
650
669
  enableCashApp?: boolean;
651
670
  /** Enable "Connect Wallet" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
652
671
  enableConnectWallet?: boolean;
672
+ /** Enable "Pay with Apple Pay" (Coinbase headless onramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
673
+ enableCoinbaseApplePay?: boolean;
653
674
  /** Enable "Deposit with Card" (fiat on-ramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
654
675
  enableFiatOnramp?: boolean;
655
676
  /** Stripe Link Pay tuning options (only applies when `enableStripeLink` is true). */
@@ -684,9 +705,11 @@ interface DepositConfig {
684
705
  showBalance?: boolean;
685
706
  /**
686
707
  * Host-app-supplied user identity (`beginDeposit` only — not provider config).
687
- * Pre-fills supported flows; currently Stripe Link Pay uses `user.email` /
688
- * `user.phone` (with both set, Stripe may skip verify steps). Kept as an
689
- * object so more fields can be added later without new `stripeXxx` params.
708
+ * Pre-fills supported flows and is kept as an object so more fields can be
709
+ * added later without new top-level params. Consumed by:
710
+ * - Coinbase Apple Pay a valid `user.email` skips the email-entry/OTP steps.
711
+ * - Stripe Link Pay — `user.email` / `user.phone` (with both set, Stripe may
712
+ * skip verify steps).
690
713
  */
691
714
  user?: UnifoldUser;
692
715
  /**
@@ -702,6 +725,10 @@ interface DepositConfig {
702
725
  * - 'transfer': open Transfer Crypto immediately
703
726
  * - 'card': open Buy with Card immediately
704
727
  * - 'tracker': open Deposit Tracker immediately
728
+ * - 'cashapp': open Pay with Cash App immediately
729
+ * - 'wallet': open Connect Wallet immediately
730
+ * - 'apple_pay': open Coinbase Apple Pay immediately
731
+ * - 'stripe_link': open Stripe Link Pay immediately
705
732
  */
706
733
  initialScreen?: DepositInitialScreen;
707
734
  onSuccess?: (data: DepositResult) => void;
package/dist/index.d.ts CHANGED
@@ -362,6 +362,21 @@ interface SupportedDestinationTokensResponse {
362
362
  */
363
363
  declare function getSupportedDestinationTokens(publishableKey?: string): Promise<SupportedDestinationTokensResponse>;
364
364
 
365
+ /**
366
+ * Host-app-supplied user identity, shared across deposit flows. An object (not a
367
+ * bare string) so more fields can be added later without churning the public API.
368
+ * - Coinbase Apple Pay: a valid `email` skips the email-entry/OTP steps (the user
369
+ * only verifies their phone; Coinbase's 60-day phone-freshness rule still applies).
370
+ * - Stripe Link Pay: `email`/`phone` pre-fill; with both set, Stripe may skip its
371
+ * verify steps.
372
+ */
373
+ interface UnifoldUser {
374
+ /** Host-trusted email. Coinbase skips its email steps when set & valid; Stripe pre-fills. */
375
+ email?: string;
376
+ /** User phone (Stripe Link pre-fill; with `email`, Stripe may skip verify steps). */
377
+ phone?: string;
378
+ }
379
+
365
380
  interface BorderRadiusConfig {
366
381
  borderTopLeftRadius?: number;
367
382
  borderTopRightRadius?: number;
@@ -405,19 +420,7 @@ type TransferInputVariant = "single_input" | "double_input" | "compact";
405
420
  */
406
421
  type DepositMenuDisplay = "stacked" | "tabs";
407
422
  /** Controls which screen opens first when the deposit modal is shown */
408
- type DepositInitialScreen = "main" | "transfer" | "card" | "tracker" | "cashapp" | "wallet";
409
- /**
410
- * Host-app-supplied user identity used to pre-fill supported flows.
411
- * Currently consumed by Stripe Link Pay (email/phone pre-fill). Kept as an
412
- * extensible object so more fields can be added later without new top-level
413
- * props.
414
- */
415
- interface UnifoldUser {
416
- /** Pre-fills the user's email (e.g. Stripe Link Pay). */
417
- email?: string;
418
- /** Pre-fills the user's phone; with `email`, Stripe may skip verify steps. */
419
- phone?: string;
420
- }
423
+ type DepositInitialScreen = "main" | "transfer" | "card" | "tracker" | "cashapp" | "wallet" | "apple_pay" | "stripe_link";
421
424
  interface DepositModalProps {
422
425
  /** Whether the modal is visible */
423
426
  visible: boolean;
@@ -432,6 +435,14 @@ interface DepositModalProps {
432
435
  publishableKey: string;
433
436
  /** Custom modal title */
434
437
  modalTitle?: string;
438
+ /** Overrides the Transfer Crypto row title on the main menu and the Transfer Crypto flow header. @default `"Transfer Crypto"` */
439
+ transferCryptoTitle?: string;
440
+ /**
441
+ * Host-app-supplied user identity, set via `beginDeposit({ user })`. Consumed by:
442
+ * - Coinbase Apple Pay — a valid `user.email` skips the email-entry/OTP steps.
443
+ * - Stripe Link Pay — `user.email` / `user.phone` pre-fill (both may skip verify steps).
444
+ */
445
+ user?: UnifoldUser;
435
446
  /** Target token symbol (e.g., "USDC") */
436
447
  destinationTokenSymbol?: string;
437
448
  /** Recipient wallet address */
@@ -458,17 +469,14 @@ interface DepositModalProps {
458
469
  enableCashApp?: boolean;
459
470
  /** Enable "Connect Wallet" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
460
471
  enableConnectWallet?: boolean;
472
+ /** Enable "Pay with Apple Pay" (Coinbase headless onramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
473
+ enableCoinbaseApplePay?: boolean;
461
474
  /** Enable "Deposit with Card" (fiat on-ramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
462
475
  enableFiatOnramp?: boolean;
463
- /** Show "Pay with Link" (Stripe) option in the deposit menu */
476
+ /** Show "Pay with Link" (Stripe) option in the deposit menu. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. The backend `stripe_link.is_hidden` kill switch force-hides it regardless. */
464
477
  enableStripeLink?: boolean;
465
478
  /** Registered Stripe onramp component (Connect sets this from `enableStripeLink`) */
466
479
  StripeOnrampComponent?: React$1.ComponentType<any>;
467
- /**
468
- * Host-app-supplied user identity. Pre-fills supported flows (currently Stripe
469
- * Link Pay email/phone). Set via `beginDeposit({ user })`.
470
- */
471
- user?: UnifoldUser;
472
480
  /** Where to render the Stripe payment method selector: "header" or "inline". Default: "header" */
473
481
  stripePaymentSelectorPosition?: "header" | "inline";
474
482
  /** Skip the success confirmation screen and fire onComplete immediately. Default: false */
@@ -494,6 +502,10 @@ interface DepositModalProps {
494
502
  * - 'transfer': open Transfer Crypto immediately
495
503
  * - 'card': open Buy with Card immediately
496
504
  * - 'tracker': open Deposit Tracker immediately (ignored if the tracker is disabled)
505
+ * - 'cashapp': open Pay with Cash App immediately
506
+ * - 'wallet': open Connect Wallet immediately
507
+ * - 'apple_pay': open Coinbase Apple Pay immediately
508
+ * - 'stripe_link': open Stripe Link Pay immediately
497
509
  */
498
510
  initialScreen?: DepositInitialScreen;
499
511
  /** Callback when deposit succeeds */
@@ -539,6 +551,8 @@ interface DepositModalProps {
539
551
  stripeLink?: BorderRadiusConfig;
540
552
  /** Cash App sheet */
541
553
  cashApp?: BorderRadiusConfig;
554
+ /** Coinbase Apple Pay sheet */
555
+ coinbaseApplePay?: BorderRadiusConfig;
542
556
  /** Connect Wallet sheet */
543
557
  connectWallet?: BorderRadiusConfig;
544
558
  /** WebView sheet (inside buy with card) */
@@ -620,6 +634,8 @@ interface UnifoldConnectProviderConfig {
620
634
  publishableKey: string;
621
635
  config?: {
622
636
  modalTitle?: string;
637
+ /** Overrides the Transfer Crypto row title on the main deposit menu and the Transfer Crypto flow header. @default `"Transfer Crypto"` */
638
+ transferCryptoTitle?: string;
623
639
  hideDepositTracker?: boolean;
624
640
  /** Theme appearance: 'light', 'dark', or 'auto' (system preference). Defaults to 'dark' */
625
641
  appearance?: ThemeMode | "auto";
@@ -640,8 +656,11 @@ interface UnifoldConnectProviderConfig {
640
656
  /** Border radius configuration for all bottom sheets */
641
657
  sheetBorderRadius?: DepositModalProps["sheetBorderRadius"];
642
658
  /**
643
- * Show "Pay with Link" (Stripe) option in the deposit menu.
644
- * Stripe onramp is bundled with Connect; set to false to hide the option.
659
+ * Show "Pay with Link" (Stripe) option in the deposit menu. Overrides
660
+ * dashboard default. Resolves as flag ?? dashboard value ?? false omit it
661
+ * to defer to the backend config. Stripe onramp is bundled with Connect.
662
+ * Note: the backend `stripe_link.is_hidden` kill switch force-hides the
663
+ * option regardless of this flag.
645
664
  */
646
665
  enableStripeLink?: boolean;
647
666
  /** Enable "Transfer Crypto" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
@@ -650,6 +669,8 @@ interface UnifoldConnectProviderConfig {
650
669
  enableCashApp?: boolean;
651
670
  /** Enable "Connect Wallet" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
652
671
  enableConnectWallet?: boolean;
672
+ /** Enable "Pay with Apple Pay" (Coinbase headless onramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
673
+ enableCoinbaseApplePay?: boolean;
653
674
  /** Enable "Deposit with Card" (fiat on-ramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
654
675
  enableFiatOnramp?: boolean;
655
676
  /** Stripe Link Pay tuning options (only applies when `enableStripeLink` is true). */
@@ -684,9 +705,11 @@ interface DepositConfig {
684
705
  showBalance?: boolean;
685
706
  /**
686
707
  * Host-app-supplied user identity (`beginDeposit` only — not provider config).
687
- * Pre-fills supported flows; currently Stripe Link Pay uses `user.email` /
688
- * `user.phone` (with both set, Stripe may skip verify steps). Kept as an
689
- * object so more fields can be added later without new `stripeXxx` params.
708
+ * Pre-fills supported flows and is kept as an object so more fields can be
709
+ * added later without new top-level params. Consumed by:
710
+ * - Coinbase Apple Pay a valid `user.email` skips the email-entry/OTP steps.
711
+ * - Stripe Link Pay — `user.email` / `user.phone` (with both set, Stripe may
712
+ * skip verify steps).
690
713
  */
691
714
  user?: UnifoldUser;
692
715
  /**
@@ -702,6 +725,10 @@ interface DepositConfig {
702
725
  * - 'transfer': open Transfer Crypto immediately
703
726
  * - 'card': open Buy with Card immediately
704
727
  * - 'tracker': open Deposit Tracker immediately
728
+ * - 'cashapp': open Pay with Cash App immediately
729
+ * - 'wallet': open Connect Wallet immediately
730
+ * - 'apple_pay': open Coinbase Apple Pay immediately
731
+ * - 'stripe_link': open Stripe Link Pay immediately
705
732
  */
706
733
  initialScreen?: DepositInitialScreen;
707
734
  onSuccess?: (data: DepositResult) => void;