@unifold/ui-react 0.1.60 → 0.1.61
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 +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { AutoSwapResponse, ChainType, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, ConfirmIntegrationTransferResult, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
2
|
+
import { AutoSwapResponse, ChainType, EvmContractCall, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, ConfirmIntegrationTransferResult, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
3
3
|
export { ChainType } from '@unifold/core';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -153,6 +153,12 @@ interface DepositModalProps {
|
|
|
153
153
|
destinationChainType?: ChainType;
|
|
154
154
|
destinationChainId?: string;
|
|
155
155
|
destinationTokenAddress?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Array of contract calls to execute on the destination chain when delivering funds.
|
|
158
|
+
* Only supported when destinationChainType is "ethereum" and
|
|
159
|
+
* destinationChainId is one of: "1", "8453", "42161", "4326".
|
|
160
|
+
*/
|
|
161
|
+
contractCalls?: EvmContractCall[];
|
|
156
162
|
/**
|
|
157
163
|
* Pre-select source token/chain in the Transfer Crypto view.
|
|
158
164
|
* All four props are optional. To match, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
|
|
@@ -212,7 +218,7 @@ interface DepositModalProps {
|
|
|
212
218
|
/** First screen when the modal opens. Default `main` (deposit menu). */
|
|
213
219
|
initialScreen?: DepositModalInitialScreen;
|
|
214
220
|
}
|
|
215
|
-
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
221
|
+
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, contractCalls, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
216
222
|
|
|
217
223
|
interface DepositHeaderProps {
|
|
218
224
|
title: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { AutoSwapResponse, ChainType, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, ConfirmIntegrationTransferResult, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
2
|
+
import { AutoSwapResponse, ChainType, EvmContractCall, DepositEvent, Wallet, ProductType, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, ConfirmIntegrationTransferResult, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
3
3
|
export { ChainType } from '@unifold/core';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -153,6 +153,12 @@ interface DepositModalProps {
|
|
|
153
153
|
destinationChainType?: ChainType;
|
|
154
154
|
destinationChainId?: string;
|
|
155
155
|
destinationTokenAddress?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Array of contract calls to execute on the destination chain when delivering funds.
|
|
158
|
+
* Only supported when destinationChainType is "ethereum" and
|
|
159
|
+
* destinationChainId is one of: "1", "8453", "42161", "4326".
|
|
160
|
+
*/
|
|
161
|
+
contractCalls?: EvmContractCall[];
|
|
156
162
|
/**
|
|
157
163
|
* Pre-select source token/chain in the Transfer Crypto view.
|
|
158
164
|
* All four props are optional. To match, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
|
|
@@ -212,7 +218,7 @@ interface DepositModalProps {
|
|
|
212
218
|
/** First screen when the modal opens. Default `main` (deposit menu). */
|
|
213
219
|
initialScreen?: DepositModalInitialScreen;
|
|
214
220
|
}
|
|
215
|
-
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
221
|
+
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, contractCalls, defaultSourceChainType, defaultSourceChainId, defaultSourceTokenAddress, defaultSourceSymbol, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, browserWalletAmountQuickSelect, enablePayWithExchange, enableFiatOnramp, enableConnectExchange, enableCashApp, hideDepositFlowInfo, hideDisplayDescription, onDepositSuccess, onDepositError, onEvent, theme, hideOverlay, initialScreen, transferCryptoTitle, depositWithCardTitle, payWithExchangeTitle, depositTrackerTitle, depositTrackerSubTitle, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
216
222
|
|
|
217
223
|
interface DepositHeaderProps {
|
|
218
224
|
title: string;
|
package/dist/index.js
CHANGED
|
@@ -719,6 +719,7 @@ function useDepositAddress(params) {
|
|
|
719
719
|
destinationChainId,
|
|
720
720
|
destinationTokenAddress,
|
|
721
721
|
actionType,
|
|
722
|
+
contractCalls,
|
|
722
723
|
enabled = true
|
|
723
724
|
} = params;
|
|
724
725
|
return (0, import_react_query.useQuery)({
|
|
@@ -731,6 +732,7 @@ function useDepositAddress(params) {
|
|
|
731
732
|
destinationChainId ?? null,
|
|
732
733
|
destinationTokenAddress ?? null,
|
|
733
734
|
actionType ?? null,
|
|
735
|
+
contractCalls ?? null,
|
|
734
736
|
publishableKey
|
|
735
737
|
],
|
|
736
738
|
queryFn: () => (0, import_core.createDepositAddress)(
|
|
@@ -740,7 +742,8 @@ function useDepositAddress(params) {
|
|
|
740
742
|
destination_chain_type: destinationChainType,
|
|
741
743
|
destination_chain_id: destinationChainId,
|
|
742
744
|
destination_token_address: destinationTokenAddress,
|
|
743
|
-
action_type: actionType
|
|
745
|
+
action_type: actionType,
|
|
746
|
+
contract_calls: contractCalls
|
|
744
747
|
},
|
|
745
748
|
publishableKey
|
|
746
749
|
),
|
|
@@ -14257,6 +14260,7 @@ function DepositModal({
|
|
|
14257
14260
|
destinationChainType,
|
|
14258
14261
|
destinationChainId,
|
|
14259
14262
|
destinationTokenAddress,
|
|
14263
|
+
contractCalls,
|
|
14260
14264
|
defaultSourceChainType,
|
|
14261
14265
|
defaultSourceChainId,
|
|
14262
14266
|
defaultSourceTokenAddress,
|
|
@@ -14383,6 +14387,7 @@ function DepositModal({
|
|
|
14383
14387
|
destinationChainType,
|
|
14384
14388
|
destinationChainId,
|
|
14385
14389
|
destinationTokenAddress,
|
|
14390
|
+
contractCalls,
|
|
14386
14391
|
enabled: open
|
|
14387
14392
|
// Only fetch when modal is open
|
|
14388
14393
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -624,6 +624,7 @@ function useDepositAddress(params) {
|
|
|
624
624
|
destinationChainId,
|
|
625
625
|
destinationTokenAddress,
|
|
626
626
|
actionType,
|
|
627
|
+
contractCalls,
|
|
627
628
|
enabled = true
|
|
628
629
|
} = params;
|
|
629
630
|
return useQuery({
|
|
@@ -636,6 +637,7 @@ function useDepositAddress(params) {
|
|
|
636
637
|
destinationChainId ?? null,
|
|
637
638
|
destinationTokenAddress ?? null,
|
|
638
639
|
actionType ?? null,
|
|
640
|
+
contractCalls ?? null,
|
|
639
641
|
publishableKey
|
|
640
642
|
],
|
|
641
643
|
queryFn: () => createDepositAddress(
|
|
@@ -645,7 +647,8 @@ function useDepositAddress(params) {
|
|
|
645
647
|
destination_chain_type: destinationChainType,
|
|
646
648
|
destination_chain_id: destinationChainId,
|
|
647
649
|
destination_token_address: destinationTokenAddress,
|
|
648
|
-
action_type: actionType
|
|
650
|
+
action_type: actionType,
|
|
651
|
+
contract_calls: contractCalls
|
|
649
652
|
},
|
|
650
653
|
publishableKey
|
|
651
654
|
),
|
|
@@ -14259,6 +14262,7 @@ function DepositModal({
|
|
|
14259
14262
|
destinationChainType,
|
|
14260
14263
|
destinationChainId,
|
|
14261
14264
|
destinationTokenAddress,
|
|
14265
|
+
contractCalls,
|
|
14262
14266
|
defaultSourceChainType,
|
|
14263
14267
|
defaultSourceChainId,
|
|
14264
14268
|
defaultSourceTokenAddress,
|
|
@@ -14385,6 +14389,7 @@ function DepositModal({
|
|
|
14385
14389
|
destinationChainType,
|
|
14386
14390
|
destinationChainId,
|
|
14387
14391
|
destinationTokenAddress,
|
|
14392
|
+
contractCalls,
|
|
14388
14393
|
enabled: open
|
|
14389
14394
|
// Only fetch when modal is open
|
|
14390
14395
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unifold/ui-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.61",
|
|
4
4
|
"description": "Unifold UI React - Deposit and onramp components for React applications",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"mipd": "^0.0.7",
|
|
37
37
|
"qr-code-styling": "^1.6.0-rc.1",
|
|
38
38
|
"tailwind-merge": "^2.0.0",
|
|
39
|
-
"@unifold/core": "0.1.
|
|
39
|
+
"@unifold/core": "0.1.61"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@solana/web3.js": "^1.87.0",
|