@unifold/connect-react 0.1.66 → 0.1.68-beta.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.mts +22 -4
- package/dist/index.d.ts +22 -4
- package/dist/index.js +2743 -1791
- package/dist/index.mjs +2759 -1809
- package/dist/styles-base.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { QueryClient } from '@tanstack/react-query';
|
|
4
|
-
import { ChainType, DepositConfirmationMode, DepositModalInitialScreen, ThemeMode, ThemeConfig, FontConfig, ComponentConfig, WithdrawTransactionInfo, AllowedCountryResult } from '@unifold/ui-react';
|
|
5
|
-
export { AllowedCountryResult, BrowserWalletAmountQuickSelect, Button, ButtonProps, ButtonTokens, CardTokens, ComponentConfig, ComponentTokens, ConfirmingView, ContainerTokens, CustomThemeColors, DepositConfirmationMode, DepositModalInitialScreen as DepositInitialScreen, FontConfig, HeaderTokens, InputTokens, ListTokens, SearchTokens, ThemeColors, ThemeConfig, ThemeMode, UseSupportedDepositTokensOptions, WithdrawTransactionInfo, useSupportedDepositTokens } from '@unifold/ui-react';
|
|
6
|
-
import { EvmContractCall, DepositEvent } from '@unifold/core';
|
|
7
|
-
export { ActionType, AutoSwapRequest, AutoSwapResponse, ChainType, CreateDepositAddressRequest, DefaultTokenChain, DefaultTokenMetadata, DefaultTokenResponse, DepositAddressResponse, DepositEvent, DepositEventType, DepositQuote, DepositQuoteRequest, DestinationToken, DestinationTokenChain, 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, 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';
|
|
4
|
+
import { ChainType, DepositConfirmationMode, DepositMethod, DepositModalInitialScreen, ThemeMode, ThemeConfig, FontConfig, ComponentConfig, WithdrawTransactionInfo, AllowedCountryResult } from '@unifold/ui-react';
|
|
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
|
+
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';
|
|
8
8
|
|
|
9
9
|
interface UnifoldConnectProviderConfig {
|
|
10
10
|
publishableKey: string;
|
|
@@ -79,11 +79,14 @@ interface DepositResult {
|
|
|
79
79
|
message: string;
|
|
80
80
|
transaction?: unknown;
|
|
81
81
|
executionId?: string;
|
|
82
|
+
execution?: DirectExecutionSucceededEvent;
|
|
83
|
+
method?: DepositMethod;
|
|
82
84
|
}
|
|
83
85
|
interface DepositError {
|
|
84
86
|
message: string;
|
|
85
87
|
error?: unknown;
|
|
86
88
|
code?: string;
|
|
89
|
+
method?: DepositMethod;
|
|
87
90
|
}
|
|
88
91
|
interface DepositConfig {
|
|
89
92
|
externalUserId: string;
|
|
@@ -135,15 +138,26 @@ interface DepositConfig {
|
|
|
135
138
|
interface CheckoutResult {
|
|
136
139
|
paymentIntentId: string;
|
|
137
140
|
status: string;
|
|
141
|
+
method?: CheckoutMethod;
|
|
142
|
+
/**
|
|
143
|
+
* Full payment intent details at the time of success, mapped to SDK camelCase.
|
|
144
|
+
* Mirrors the `DepositResult.execution` field on the deposit side.
|
|
145
|
+
* Always populated for the terminal `succeeded` callback; may be undefined for
|
|
146
|
+
* intermediate `processing` callbacks fired right after a wallet confirmation.
|
|
147
|
+
*/
|
|
148
|
+
paymentIntent?: CheckoutPaymentIntent;
|
|
138
149
|
}
|
|
139
150
|
interface CheckoutError {
|
|
140
151
|
message: string;
|
|
141
152
|
error?: unknown;
|
|
142
153
|
code?: string;
|
|
154
|
+
method?: CheckoutMethod;
|
|
143
155
|
}
|
|
144
156
|
interface WithdrawResult {
|
|
145
157
|
message: string;
|
|
146
158
|
transaction?: unknown;
|
|
159
|
+
executionId?: string;
|
|
160
|
+
execution?: WithdrawDirectExecutionSucceededEvent;
|
|
147
161
|
}
|
|
148
162
|
interface WithdrawError {
|
|
149
163
|
message: string;
|
|
@@ -168,6 +182,8 @@ interface CheckoutConfig {
|
|
|
168
182
|
/** Optional callbacks (fired immediately when events occur) */
|
|
169
183
|
onSuccess?: (data: CheckoutResult) => void;
|
|
170
184
|
onError?: (error: CheckoutError) => void;
|
|
185
|
+
/** Called when checkout lifecycle events occur. */
|
|
186
|
+
onEvent?: (event: CheckoutEvent) => void;
|
|
171
187
|
/** Called when the user dismisses the checkout dialog */
|
|
172
188
|
onClose?: () => void;
|
|
173
189
|
}
|
|
@@ -210,6 +226,8 @@ interface WithdrawConfig {
|
|
|
210
226
|
withdraw: (txInfo: WithdrawTransactionInfo) => void | Promise<void>;
|
|
211
227
|
onSuccess?: (data: WithdrawResult) => void;
|
|
212
228
|
onError?: (error: WithdrawError) => void;
|
|
229
|
+
/** Called when withdraw lifecycle events occur. */
|
|
230
|
+
onEvent?: (event: WithdrawEvent) => void;
|
|
213
231
|
onClose?: () => void;
|
|
214
232
|
}
|
|
215
233
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { QueryClient } from '@tanstack/react-query';
|
|
4
|
-
import { ChainType, DepositConfirmationMode, DepositModalInitialScreen, ThemeMode, ThemeConfig, FontConfig, ComponentConfig, WithdrawTransactionInfo, AllowedCountryResult } from '@unifold/ui-react';
|
|
5
|
-
export { AllowedCountryResult, BrowserWalletAmountQuickSelect, Button, ButtonProps, ButtonTokens, CardTokens, ComponentConfig, ComponentTokens, ConfirmingView, ContainerTokens, CustomThemeColors, DepositConfirmationMode, DepositModalInitialScreen as DepositInitialScreen, FontConfig, HeaderTokens, InputTokens, ListTokens, SearchTokens, ThemeColors, ThemeConfig, ThemeMode, UseSupportedDepositTokensOptions, WithdrawTransactionInfo, useSupportedDepositTokens } from '@unifold/ui-react';
|
|
6
|
-
import { EvmContractCall, DepositEvent } from '@unifold/core';
|
|
7
|
-
export { ActionType, AutoSwapRequest, AutoSwapResponse, ChainType, CreateDepositAddressRequest, DefaultTokenChain, DefaultTokenMetadata, DefaultTokenResponse, DepositAddressResponse, DepositEvent, DepositEventType, DepositQuote, DepositQuoteRequest, DestinationToken, DestinationTokenChain, 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, 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';
|
|
4
|
+
import { ChainType, DepositConfirmationMode, DepositMethod, DepositModalInitialScreen, ThemeMode, ThemeConfig, FontConfig, ComponentConfig, WithdrawTransactionInfo, AllowedCountryResult } from '@unifold/ui-react';
|
|
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
|
+
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';
|
|
8
8
|
|
|
9
9
|
interface UnifoldConnectProviderConfig {
|
|
10
10
|
publishableKey: string;
|
|
@@ -79,11 +79,14 @@ interface DepositResult {
|
|
|
79
79
|
message: string;
|
|
80
80
|
transaction?: unknown;
|
|
81
81
|
executionId?: string;
|
|
82
|
+
execution?: DirectExecutionSucceededEvent;
|
|
83
|
+
method?: DepositMethod;
|
|
82
84
|
}
|
|
83
85
|
interface DepositError {
|
|
84
86
|
message: string;
|
|
85
87
|
error?: unknown;
|
|
86
88
|
code?: string;
|
|
89
|
+
method?: DepositMethod;
|
|
87
90
|
}
|
|
88
91
|
interface DepositConfig {
|
|
89
92
|
externalUserId: string;
|
|
@@ -135,15 +138,26 @@ interface DepositConfig {
|
|
|
135
138
|
interface CheckoutResult {
|
|
136
139
|
paymentIntentId: string;
|
|
137
140
|
status: string;
|
|
141
|
+
method?: CheckoutMethod;
|
|
142
|
+
/**
|
|
143
|
+
* Full payment intent details at the time of success, mapped to SDK camelCase.
|
|
144
|
+
* Mirrors the `DepositResult.execution` field on the deposit side.
|
|
145
|
+
* Always populated for the terminal `succeeded` callback; may be undefined for
|
|
146
|
+
* intermediate `processing` callbacks fired right after a wallet confirmation.
|
|
147
|
+
*/
|
|
148
|
+
paymentIntent?: CheckoutPaymentIntent;
|
|
138
149
|
}
|
|
139
150
|
interface CheckoutError {
|
|
140
151
|
message: string;
|
|
141
152
|
error?: unknown;
|
|
142
153
|
code?: string;
|
|
154
|
+
method?: CheckoutMethod;
|
|
143
155
|
}
|
|
144
156
|
interface WithdrawResult {
|
|
145
157
|
message: string;
|
|
146
158
|
transaction?: unknown;
|
|
159
|
+
executionId?: string;
|
|
160
|
+
execution?: WithdrawDirectExecutionSucceededEvent;
|
|
147
161
|
}
|
|
148
162
|
interface WithdrawError {
|
|
149
163
|
message: string;
|
|
@@ -168,6 +182,8 @@ interface CheckoutConfig {
|
|
|
168
182
|
/** Optional callbacks (fired immediately when events occur) */
|
|
169
183
|
onSuccess?: (data: CheckoutResult) => void;
|
|
170
184
|
onError?: (error: CheckoutError) => void;
|
|
185
|
+
/** Called when checkout lifecycle events occur. */
|
|
186
|
+
onEvent?: (event: CheckoutEvent) => void;
|
|
171
187
|
/** Called when the user dismisses the checkout dialog */
|
|
172
188
|
onClose?: () => void;
|
|
173
189
|
}
|
|
@@ -210,6 +226,8 @@ interface WithdrawConfig {
|
|
|
210
226
|
withdraw: (txInfo: WithdrawTransactionInfo) => void | Promise<void>;
|
|
211
227
|
onSuccess?: (data: WithdrawResult) => void;
|
|
212
228
|
onError?: (error: WithdrawError) => void;
|
|
229
|
+
/** Called when withdraw lifecycle events occur. */
|
|
230
|
+
onEvent?: (event: WithdrawEvent) => void;
|
|
213
231
|
onClose?: () => void;
|
|
214
232
|
}
|
|
215
233
|
|