@unifold/connect-react-native 0.1.52 → 0.1.53
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 +33 -21
- package/dist/index.d.ts +33 -21
- package/dist/index.js +110 -5
- package/dist/index.mjs +110 -5
- package/package.json +2 -2
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" | "applepay";
|
|
421
424
|
interface DepositModalProps {
|
|
422
425
|
/** Whether the modal is visible */
|
|
423
426
|
visible: boolean;
|
|
@@ -432,6 +435,12 @@ interface DepositModalProps {
|
|
|
432
435
|
publishableKey: string;
|
|
433
436
|
/** Custom modal title */
|
|
434
437
|
modalTitle?: string;
|
|
438
|
+
/**
|
|
439
|
+
* Host-app-supplied user identity, set via `beginDeposit({ user })`. Consumed by:
|
|
440
|
+
* - Coinbase Apple Pay — a valid `user.email` skips the email-entry/OTP steps.
|
|
441
|
+
* - Stripe Link Pay — `user.email` / `user.phone` pre-fill (both may skip verify steps).
|
|
442
|
+
*/
|
|
443
|
+
user?: UnifoldUser;
|
|
435
444
|
/** Target token symbol (e.g., "USDC") */
|
|
436
445
|
destinationTokenSymbol?: string;
|
|
437
446
|
/** Recipient wallet address */
|
|
@@ -458,17 +467,14 @@ interface DepositModalProps {
|
|
|
458
467
|
enableCashApp?: boolean;
|
|
459
468
|
/** Enable "Connect Wallet" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
|
|
460
469
|
enableConnectWallet?: boolean;
|
|
470
|
+
/** Enable "Pay with Apple Pay" (Coinbase headless onramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
|
|
471
|
+
enableCoinbaseApplePay?: boolean;
|
|
461
472
|
/** Enable "Deposit with Card" (fiat on-ramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
|
|
462
473
|
enableFiatOnramp?: boolean;
|
|
463
474
|
/** Show "Pay with Link" (Stripe) option in the deposit menu */
|
|
464
475
|
enableStripeLink?: boolean;
|
|
465
476
|
/** Registered Stripe onramp component (Connect sets this from `enableStripeLink`) */
|
|
466
477
|
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
478
|
/** Where to render the Stripe payment method selector: "header" or "inline". Default: "header" */
|
|
473
479
|
stripePaymentSelectorPosition?: "header" | "inline";
|
|
474
480
|
/** Skip the success confirmation screen and fire onComplete immediately. Default: false */
|
|
@@ -539,6 +545,8 @@ interface DepositModalProps {
|
|
|
539
545
|
stripeLink?: BorderRadiusConfig;
|
|
540
546
|
/** Cash App sheet */
|
|
541
547
|
cashApp?: BorderRadiusConfig;
|
|
548
|
+
/** Coinbase Apple Pay sheet */
|
|
549
|
+
coinbaseApplePay?: BorderRadiusConfig;
|
|
542
550
|
/** Connect Wallet sheet */
|
|
543
551
|
connectWallet?: BorderRadiusConfig;
|
|
544
552
|
/** WebView sheet (inside buy with card) */
|
|
@@ -650,6 +658,8 @@ interface UnifoldConnectProviderConfig {
|
|
|
650
658
|
enableCashApp?: boolean;
|
|
651
659
|
/** Enable "Connect Wallet" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
|
|
652
660
|
enableConnectWallet?: boolean;
|
|
661
|
+
/** Enable "Pay with Apple Pay" (Coinbase headless onramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
|
|
662
|
+
enableCoinbaseApplePay?: boolean;
|
|
653
663
|
/** Enable "Deposit with Card" (fiat on-ramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
|
|
654
664
|
enableFiatOnramp?: boolean;
|
|
655
665
|
/** Stripe Link Pay tuning options (only applies when `enableStripeLink` is true). */
|
|
@@ -684,9 +694,11 @@ interface DepositConfig {
|
|
|
684
694
|
showBalance?: boolean;
|
|
685
695
|
/**
|
|
686
696
|
* Host-app-supplied user identity (`beginDeposit` only — not provider config).
|
|
687
|
-
* Pre-fills supported flows
|
|
688
|
-
*
|
|
689
|
-
*
|
|
697
|
+
* Pre-fills supported flows and is kept as an object so more fields can be
|
|
698
|
+
* added later without new top-level params. Consumed by:
|
|
699
|
+
* - Coinbase Apple Pay — a valid `user.email` skips the email-entry/OTP steps.
|
|
700
|
+
* - Stripe Link Pay — `user.email` / `user.phone` (with both set, Stripe may
|
|
701
|
+
* skip verify steps).
|
|
690
702
|
*/
|
|
691
703
|
user?: UnifoldUser;
|
|
692
704
|
/**
|
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" | "applepay";
|
|
421
424
|
interface DepositModalProps {
|
|
422
425
|
/** Whether the modal is visible */
|
|
423
426
|
visible: boolean;
|
|
@@ -432,6 +435,12 @@ interface DepositModalProps {
|
|
|
432
435
|
publishableKey: string;
|
|
433
436
|
/** Custom modal title */
|
|
434
437
|
modalTitle?: string;
|
|
438
|
+
/**
|
|
439
|
+
* Host-app-supplied user identity, set via `beginDeposit({ user })`. Consumed by:
|
|
440
|
+
* - Coinbase Apple Pay — a valid `user.email` skips the email-entry/OTP steps.
|
|
441
|
+
* - Stripe Link Pay — `user.email` / `user.phone` pre-fill (both may skip verify steps).
|
|
442
|
+
*/
|
|
443
|
+
user?: UnifoldUser;
|
|
435
444
|
/** Target token symbol (e.g., "USDC") */
|
|
436
445
|
destinationTokenSymbol?: string;
|
|
437
446
|
/** Recipient wallet address */
|
|
@@ -458,17 +467,14 @@ interface DepositModalProps {
|
|
|
458
467
|
enableCashApp?: boolean;
|
|
459
468
|
/** Enable "Connect Wallet" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
|
|
460
469
|
enableConnectWallet?: boolean;
|
|
470
|
+
/** Enable "Pay with Apple Pay" (Coinbase headless onramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
|
|
471
|
+
enableCoinbaseApplePay?: boolean;
|
|
461
472
|
/** Enable "Deposit with Card" (fiat on-ramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
|
|
462
473
|
enableFiatOnramp?: boolean;
|
|
463
474
|
/** Show "Pay with Link" (Stripe) option in the deposit menu */
|
|
464
475
|
enableStripeLink?: boolean;
|
|
465
476
|
/** Registered Stripe onramp component (Connect sets this from `enableStripeLink`) */
|
|
466
477
|
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
478
|
/** Where to render the Stripe payment method selector: "header" or "inline". Default: "header" */
|
|
473
479
|
stripePaymentSelectorPosition?: "header" | "inline";
|
|
474
480
|
/** Skip the success confirmation screen and fire onComplete immediately. Default: false */
|
|
@@ -539,6 +545,8 @@ interface DepositModalProps {
|
|
|
539
545
|
stripeLink?: BorderRadiusConfig;
|
|
540
546
|
/** Cash App sheet */
|
|
541
547
|
cashApp?: BorderRadiusConfig;
|
|
548
|
+
/** Coinbase Apple Pay sheet */
|
|
549
|
+
coinbaseApplePay?: BorderRadiusConfig;
|
|
542
550
|
/** Connect Wallet sheet */
|
|
543
551
|
connectWallet?: BorderRadiusConfig;
|
|
544
552
|
/** WebView sheet (inside buy with card) */
|
|
@@ -650,6 +658,8 @@ interface UnifoldConnectProviderConfig {
|
|
|
650
658
|
enableCashApp?: boolean;
|
|
651
659
|
/** Enable "Connect Wallet" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
|
|
652
660
|
enableConnectWallet?: boolean;
|
|
661
|
+
/** Enable "Pay with Apple Pay" (Coinbase headless onramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? false. */
|
|
662
|
+
enableCoinbaseApplePay?: boolean;
|
|
653
663
|
/** Enable "Deposit with Card" (fiat on-ramp) option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
|
|
654
664
|
enableFiatOnramp?: boolean;
|
|
655
665
|
/** Stripe Link Pay tuning options (only applies when `enableStripeLink` is true). */
|
|
@@ -684,9 +694,11 @@ interface DepositConfig {
|
|
|
684
694
|
showBalance?: boolean;
|
|
685
695
|
/**
|
|
686
696
|
* Host-app-supplied user identity (`beginDeposit` only — not provider config).
|
|
687
|
-
* Pre-fills supported flows
|
|
688
|
-
*
|
|
689
|
-
*
|
|
697
|
+
* Pre-fills supported flows and is kept as an object so more fields can be
|
|
698
|
+
* added later without new top-level params. Consumed by:
|
|
699
|
+
* - Coinbase Apple Pay — a valid `user.email` skips the email-entry/OTP steps.
|
|
700
|
+
* - Stripe Link Pay — `user.email` / `user.phone` (with both set, Stripe may
|
|
701
|
+
* skip verify steps).
|
|
690
702
|
*/
|
|
691
703
|
user?: UnifoldUser;
|
|
692
704
|
/**
|