@unifold/connect-react 0.1.68-beta.0 → 0.1.68-beta.2
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 +31 -2
- package/dist/index.d.ts +31 -2
- package/dist/index.js +15993 -8985
- package/dist/index.mjs +16067 -9097
- package/dist/styles-base.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +23 -6
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
4
4
|
import { ChainType, DepositConfirmationMode, DepositMethod, DepositModalInitialScreen, ThemeMode, ThemeConfig, FontConfig, ComponentConfig, WithdrawTransactionInfo, AllowedCountryResult } from '@unifold/ui-react';
|
|
5
5
|
export { AllowedCountryResult, BrowserWalletAmountQuickSelect, Button, ButtonProps, ButtonTokens, CardTokens, ComponentConfig, ComponentTokens, ConfirmingView, ContainerTokens, CustomThemeColors, DepositConfirmationMode, DepositModalInitialScreen as DepositInitialScreen, DepositMethod, FontConfig, HeaderTokens, InputTokens, ListTokens, SearchTokens, ThemeColors, ThemeConfig, ThemeMode, UseSupportedDepositTokensOptions, WithdrawTransactionInfo, useSupportedDepositTokens } from '@unifold/ui-react';
|
|
6
6
|
import { CheckoutMethod, CheckoutPaymentIntent, CheckoutEvent, EvmContractCall, DirectExecutionSucceededEvent, DepositEvent, WithdrawDirectExecutionSucceededEvent, WithdrawEvent } from '@unifold/core';
|
|
7
|
-
export { ActionType, AutoSwapRequest, AutoSwapResponse, ChainType, CheckoutEvent, CheckoutEventType, CheckoutMethod, CheckoutPaymentIntent, CheckoutPaymentIntentData, CheckoutPaymentIntentSucceededEvent, CreateDepositAddressRequest, DefaultTokenChain, DefaultTokenMetadata, DefaultTokenResponse, DepositAddressResponse, DepositEvent, DepositEventType, DepositQuote, DepositQuoteRequest, DestinationToken, DestinationTokenChain, DirectExecution, DirectExecutionResponse, ExecutionStatus, FeaturedToken, FiatCurrenciesResponse, FiatCurrency, I18nStrings, IconUrl, IpAddressResponse, LockedQuoteLimits, LockedQuotePreview, LockedQuotePreviewRequest, OnrampQuote, OnrampQuotesRequest, OnrampQuotesResponse, OnrampSessionCreatedData, OnrampSessionCreatedEvent, OnrampSessionRequest, OnrampSessionResponse, PaymentIntent, PaymentIntentDepositAddress, PaymentIntentStatus, PaymentIntentType, PaymentNetwork, ProjectConfigResponse, QueryExecutionsRequest, QueryExecutionsResponse, SOLANA_USDC_ADDRESS, SendSolanaTransactionRequest, SendSolanaTransactionResponse, SourceToken, SourceTokenNetwork, SupportedChain, SupportedDepositTokensResponse, SupportedDestinationTokensResponse, SupportedSourceTokensQuery, SupportedSourceTokensResponse, SupportedToken, TokenChain, TokenChainIconUrl, TokenChainsResponse, UserIpInfo, Wallet, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, WithdrawEventType, createDepositAddress, createOnrampSession, generatePrefixedKSUID, getApiBaseUrl, getChainName, getDefaultOnrampToken, getDepositQuote, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getWalletByChainType, i18n, queryExecutions, retrievePaymentIntent, sendSolanaTransaction, setApiConfig, useUserIp } from '@unifold/core';
|
|
7
|
+
export { ActionType, AutoSwapRequest, AutoSwapResponse, ChainType, CheckoutEvent, CheckoutEventType, CheckoutMethod, CheckoutPaymentIntent, CheckoutPaymentIntentData, CheckoutPaymentIntentSucceededEvent, CreateDepositAddressRequest, DefaultTokenChain, DefaultTokenMetadata, DefaultTokenResponse, DepositAddressResponse, DepositEvent, DepositEventType, DepositQuote, DepositQuoteRequest, DestinationToken, DestinationTokenChain, DirectExecution, DirectExecutionResponse, ExecutionStatus, FeaturedToken, FiatCurrenciesResponse, FiatCurrency, I18nStrings, IconUrl, IpAddressResponse, LockedQuoteLimits, LockedQuotePreview, LockedQuotePreviewRequest, OnrampQuote, OnrampQuotesRequest, OnrampQuotesResponse, OnrampSessionCreatedData, OnrampSessionCreatedEvent, OnrampSessionRequest, OnrampSessionResponse, PaymentIntent, PaymentIntentDepositAddress, PaymentIntentStatus, PaymentIntentType, PaymentNetwork, ProjectConfigResponse, QueryExecutionsRequest, QueryExecutionsResponse, SOLANA_USDC_ADDRESS, SendSolanaTransactionRequest, SendSolanaTransactionResponse, SourceToken, SourceTokenNetwork, StripeAccessTokenResponse, StripeAuthIntentResponse, StripeConfigResponse, StripeConfirmRequest, StripeConsumerWallet, StripeCreateSessionRequest, StripeCryptoCustomer, StripeCustomerVerification, StripeDefaultTokenResponse, StripeListResponse, StripeOnrampSession, StripeOnrampTransactionDetails, StripePaymentToken, StripeQuoteRequest, StripeQuotesResponse, SupportedChain, SupportedDepositTokensResponse, SupportedDestinationTokensResponse, SupportedSourceTokensQuery, SupportedSourceTokensResponse, SupportedToken, TokenChain, TokenChainIconUrl, TokenChainsResponse, UserIpInfo, Wallet, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, WithdrawEventType, createDepositAddress, createOnrampSession, generatePrefixedKSUID, getApiBaseUrl, getChainName, getDefaultOnrampToken, getDepositQuote, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getWalletByChainType, i18n, queryExecutions, retrievePaymentIntent, sendSolanaTransaction, setApiConfig, stripeConfirmSession, stripeCreateAuthIntent, stripeCreateSession, stripeExchangeTokens, stripeGetConfig, stripeGetCustomer, stripeGetDefaultToken, stripeGetQuotes, stripeGetSession, stripeListPaymentTokens, stripeListWallets, stripeRefreshQuote, stripeRefreshToken, useUserIp } from '@unifold/core';
|
|
8
8
|
|
|
9
9
|
interface UnifoldConnectProviderConfig {
|
|
10
10
|
publishableKey: string;
|
|
@@ -45,6 +45,19 @@ interface UnifoldConnectProviderConfig {
|
|
|
45
45
|
enableConnectExchange?: boolean;
|
|
46
46
|
/** Enable "Pay with Cash App" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
|
|
47
47
|
enableCashApp?: boolean;
|
|
48
|
+
/** Enable "Pay with Link" headless onramp option. Defaults to false. */
|
|
49
|
+
enableStripeLink?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Enable "Pay with Apple Pay" (headless Coinbase) option. Overrides
|
|
52
|
+
* dashboard default. Resolves as flag ?? dashboard `apple_pay.enabled` ??
|
|
53
|
+
* true. The server still gates per-region (US-only, NY excluded at
|
|
54
|
+
* launch) at order-creation time.
|
|
55
|
+
*/
|
|
56
|
+
enableApplePay?: boolean;
|
|
57
|
+
/** Main menu — Apple Pay row title. @default `"Pay with Apple Pay"` */
|
|
58
|
+
applePayTitle?: string;
|
|
59
|
+
/** Main menu — Apple Pay row subtitle. @default `"Instant"` */
|
|
60
|
+
applePaySubTitle?: string;
|
|
48
61
|
/** Simple accent/primary color override (applies to both light and dark modes) */
|
|
49
62
|
accentColor?: string;
|
|
50
63
|
/** Full theme color customization per mode */
|
|
@@ -72,7 +85,7 @@ interface UnifoldConnectProviderConfig {
|
|
|
72
85
|
/** Deposit with Card onramp: hide wallet address disclaimer. @default false */
|
|
73
86
|
hideDisplayDescription?: boolean;
|
|
74
87
|
/** Connect Wallet → Enter amount: `percentage` (10%, 25%, 50%, 75%, MAX) or `usd` ($25…). @default `percentage` */
|
|
75
|
-
browserWalletAmountQuickSelect?:
|
|
88
|
+
browserWalletAmountQuickSelect?: 'usd' | 'percentage';
|
|
76
89
|
};
|
|
77
90
|
}
|
|
78
91
|
interface DepositResult {
|
|
@@ -96,6 +109,22 @@ interface DepositConfig {
|
|
|
96
109
|
destinationTokenSymbol: string;
|
|
97
110
|
/** Address that receives the deposited funds. */
|
|
98
111
|
recipientAddress: string;
|
|
112
|
+
/**
|
|
113
|
+
* The host platform's signed-in user. Currently used to pre-fill and pre-trust
|
|
114
|
+
* the user's email across onramp flows:
|
|
115
|
+
*
|
|
116
|
+
* - **Stripe Link / other onramp providers (Banxa, etc.):** `user.email` pre-fills
|
|
117
|
+
* the email screen and auto-submits, skipping manual entry.
|
|
118
|
+
* - **Apple Pay (headless Coinbase):** `user.email` is treated as a pre-trusted
|
|
119
|
+
* address — the flow skips both the localStorage email check and the email-OTP
|
|
120
|
+
* screen (it passes `email_already_verified: true` and uses this address
|
|
121
|
+
* directly). Phone OTP is still required (Coinbase mandates phone
|
|
122
|
+
* re-verification every 60 days).
|
|
123
|
+
*/
|
|
124
|
+
user?: {
|
|
125
|
+
/** User's email address. Pre-fills Stripe Link / onramp flows and acts as the pre-trusted email for Apple Pay (headless Coinbase). */
|
|
126
|
+
email?: string;
|
|
127
|
+
};
|
|
99
128
|
/**
|
|
100
129
|
* Array of contract calls to execute on the destination chain when delivering funds.
|
|
101
130
|
* Each entry specifies a target contract address, hex-encoded data, and optional value in wei (defaults to "0").
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
4
4
|
import { ChainType, DepositConfirmationMode, DepositMethod, DepositModalInitialScreen, ThemeMode, ThemeConfig, FontConfig, ComponentConfig, WithdrawTransactionInfo, AllowedCountryResult } from '@unifold/ui-react';
|
|
5
5
|
export { AllowedCountryResult, BrowserWalletAmountQuickSelect, Button, ButtonProps, ButtonTokens, CardTokens, ComponentConfig, ComponentTokens, ConfirmingView, ContainerTokens, CustomThemeColors, DepositConfirmationMode, DepositModalInitialScreen as DepositInitialScreen, DepositMethod, FontConfig, HeaderTokens, InputTokens, ListTokens, SearchTokens, ThemeColors, ThemeConfig, ThemeMode, UseSupportedDepositTokensOptions, WithdrawTransactionInfo, useSupportedDepositTokens } from '@unifold/ui-react';
|
|
6
6
|
import { CheckoutMethod, CheckoutPaymentIntent, CheckoutEvent, EvmContractCall, DirectExecutionSucceededEvent, DepositEvent, WithdrawDirectExecutionSucceededEvent, WithdrawEvent } from '@unifold/core';
|
|
7
|
-
export { ActionType, AutoSwapRequest, AutoSwapResponse, ChainType, CheckoutEvent, CheckoutEventType, CheckoutMethod, CheckoutPaymentIntent, CheckoutPaymentIntentData, CheckoutPaymentIntentSucceededEvent, CreateDepositAddressRequest, DefaultTokenChain, DefaultTokenMetadata, DefaultTokenResponse, DepositAddressResponse, DepositEvent, DepositEventType, DepositQuote, DepositQuoteRequest, DestinationToken, DestinationTokenChain, DirectExecution, DirectExecutionResponse, ExecutionStatus, FeaturedToken, FiatCurrenciesResponse, FiatCurrency, I18nStrings, IconUrl, IpAddressResponse, LockedQuoteLimits, LockedQuotePreview, LockedQuotePreviewRequest, OnrampQuote, OnrampQuotesRequest, OnrampQuotesResponse, OnrampSessionCreatedData, OnrampSessionCreatedEvent, OnrampSessionRequest, OnrampSessionResponse, PaymentIntent, PaymentIntentDepositAddress, PaymentIntentStatus, PaymentIntentType, PaymentNetwork, ProjectConfigResponse, QueryExecutionsRequest, QueryExecutionsResponse, SOLANA_USDC_ADDRESS, SendSolanaTransactionRequest, SendSolanaTransactionResponse, SourceToken, SourceTokenNetwork, SupportedChain, SupportedDepositTokensResponse, SupportedDestinationTokensResponse, SupportedSourceTokensQuery, SupportedSourceTokensResponse, SupportedToken, TokenChain, TokenChainIconUrl, TokenChainsResponse, UserIpInfo, Wallet, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, WithdrawEventType, createDepositAddress, createOnrampSession, generatePrefixedKSUID, getApiBaseUrl, getChainName, getDefaultOnrampToken, getDepositQuote, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getWalletByChainType, i18n, queryExecutions, retrievePaymentIntent, sendSolanaTransaction, setApiConfig, useUserIp } from '@unifold/core';
|
|
7
|
+
export { ActionType, AutoSwapRequest, AutoSwapResponse, ChainType, CheckoutEvent, CheckoutEventType, CheckoutMethod, CheckoutPaymentIntent, CheckoutPaymentIntentData, CheckoutPaymentIntentSucceededEvent, CreateDepositAddressRequest, DefaultTokenChain, DefaultTokenMetadata, DefaultTokenResponse, DepositAddressResponse, DepositEvent, DepositEventType, DepositQuote, DepositQuoteRequest, DestinationToken, DestinationTokenChain, DirectExecution, DirectExecutionResponse, ExecutionStatus, FeaturedToken, FiatCurrenciesResponse, FiatCurrency, I18nStrings, IconUrl, IpAddressResponse, LockedQuoteLimits, LockedQuotePreview, LockedQuotePreviewRequest, OnrampQuote, OnrampQuotesRequest, OnrampQuotesResponse, OnrampSessionCreatedData, OnrampSessionCreatedEvent, OnrampSessionRequest, OnrampSessionResponse, PaymentIntent, PaymentIntentDepositAddress, PaymentIntentStatus, PaymentIntentType, PaymentNetwork, ProjectConfigResponse, QueryExecutionsRequest, QueryExecutionsResponse, SOLANA_USDC_ADDRESS, SendSolanaTransactionRequest, SendSolanaTransactionResponse, SourceToken, SourceTokenNetwork, StripeAccessTokenResponse, StripeAuthIntentResponse, StripeConfigResponse, StripeConfirmRequest, StripeConsumerWallet, StripeCreateSessionRequest, StripeCryptoCustomer, StripeCustomerVerification, StripeDefaultTokenResponse, StripeListResponse, StripeOnrampSession, StripeOnrampTransactionDetails, StripePaymentToken, StripeQuoteRequest, StripeQuotesResponse, SupportedChain, SupportedDepositTokensResponse, SupportedDestinationTokensResponse, SupportedSourceTokensQuery, SupportedSourceTokensResponse, SupportedToken, TokenChain, TokenChainIconUrl, TokenChainsResponse, UserIpInfo, Wallet, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, WithdrawEventType, createDepositAddress, createOnrampSession, generatePrefixedKSUID, getApiBaseUrl, getChainName, getDefaultOnrampToken, getDepositQuote, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getWalletByChainType, i18n, queryExecutions, retrievePaymentIntent, sendSolanaTransaction, setApiConfig, stripeConfirmSession, stripeCreateAuthIntent, stripeCreateSession, stripeExchangeTokens, stripeGetConfig, stripeGetCustomer, stripeGetDefaultToken, stripeGetQuotes, stripeGetSession, stripeListPaymentTokens, stripeListWallets, stripeRefreshQuote, stripeRefreshToken, useUserIp } from '@unifold/core';
|
|
8
8
|
|
|
9
9
|
interface UnifoldConnectProviderConfig {
|
|
10
10
|
publishableKey: string;
|
|
@@ -45,6 +45,19 @@ interface UnifoldConnectProviderConfig {
|
|
|
45
45
|
enableConnectExchange?: boolean;
|
|
46
46
|
/** Enable "Pay with Cash App" option. Overrides dashboard default. Resolves as flag ?? dashboard value ?? true. */
|
|
47
47
|
enableCashApp?: boolean;
|
|
48
|
+
/** Enable "Pay with Link" headless onramp option. Defaults to false. */
|
|
49
|
+
enableStripeLink?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Enable "Pay with Apple Pay" (headless Coinbase) option. Overrides
|
|
52
|
+
* dashboard default. Resolves as flag ?? dashboard `apple_pay.enabled` ??
|
|
53
|
+
* true. The server still gates per-region (US-only, NY excluded at
|
|
54
|
+
* launch) at order-creation time.
|
|
55
|
+
*/
|
|
56
|
+
enableApplePay?: boolean;
|
|
57
|
+
/** Main menu — Apple Pay row title. @default `"Pay with Apple Pay"` */
|
|
58
|
+
applePayTitle?: string;
|
|
59
|
+
/** Main menu — Apple Pay row subtitle. @default `"Instant"` */
|
|
60
|
+
applePaySubTitle?: string;
|
|
48
61
|
/** Simple accent/primary color override (applies to both light and dark modes) */
|
|
49
62
|
accentColor?: string;
|
|
50
63
|
/** Full theme color customization per mode */
|
|
@@ -72,7 +85,7 @@ interface UnifoldConnectProviderConfig {
|
|
|
72
85
|
/** Deposit with Card onramp: hide wallet address disclaimer. @default false */
|
|
73
86
|
hideDisplayDescription?: boolean;
|
|
74
87
|
/** Connect Wallet → Enter amount: `percentage` (10%, 25%, 50%, 75%, MAX) or `usd` ($25…). @default `percentage` */
|
|
75
|
-
browserWalletAmountQuickSelect?:
|
|
88
|
+
browserWalletAmountQuickSelect?: 'usd' | 'percentage';
|
|
76
89
|
};
|
|
77
90
|
}
|
|
78
91
|
interface DepositResult {
|
|
@@ -96,6 +109,22 @@ interface DepositConfig {
|
|
|
96
109
|
destinationTokenSymbol: string;
|
|
97
110
|
/** Address that receives the deposited funds. */
|
|
98
111
|
recipientAddress: string;
|
|
112
|
+
/**
|
|
113
|
+
* The host platform's signed-in user. Currently used to pre-fill and pre-trust
|
|
114
|
+
* the user's email across onramp flows:
|
|
115
|
+
*
|
|
116
|
+
* - **Stripe Link / other onramp providers (Banxa, etc.):** `user.email` pre-fills
|
|
117
|
+
* the email screen and auto-submits, skipping manual entry.
|
|
118
|
+
* - **Apple Pay (headless Coinbase):** `user.email` is treated as a pre-trusted
|
|
119
|
+
* address — the flow skips both the localStorage email check and the email-OTP
|
|
120
|
+
* screen (it passes `email_already_verified: true` and uses this address
|
|
121
|
+
* directly). Phone OTP is still required (Coinbase mandates phone
|
|
122
|
+
* re-verification every 60 days).
|
|
123
|
+
*/
|
|
124
|
+
user?: {
|
|
125
|
+
/** User's email address. Pre-fills Stripe Link / onramp flows and acts as the pre-trusted email for Apple Pay (headless Coinbase). */
|
|
126
|
+
email?: string;
|
|
127
|
+
};
|
|
99
128
|
/**
|
|
100
129
|
* Array of contract calls to execute on the destination chain when delivering funds.
|
|
101
130
|
* Each entry specifies a target contract address, hex-encoded data, and optional value in wei (defaults to "0").
|