@unifold/connect-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 CHANGED
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { QueryClient } from '@tanstack/react-query';
4
4
  import { ChainType, DepositConfirmationMode, 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, FontConfig, HeaderTokens, InputTokens, ListTokens, SearchTokens, ThemeColors, ThemeConfig, ThemeMode, UseSupportedDepositTokensOptions, WithdrawTransactionInfo, useSupportedDepositTokens } from '@unifold/ui-react';
6
- import { DepositEvent } from '@unifold/core';
6
+ import { EvmContractCall, DepositEvent } from '@unifold/core';
7
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';
8
8
 
9
9
  interface UnifoldConnectProviderConfig {
@@ -85,6 +85,13 @@ interface DepositConfig {
85
85
  destinationTokenAddress: string;
86
86
  destinationTokenSymbol: string;
87
87
  recipientAddress: string;
88
+ /**
89
+ * Array of contract calls to execute on the destination chain when delivering funds.
90
+ * Each entry specifies a target contract address, hex-encoded data, and optional value in wei (defaults to "0").
91
+ * Only supported when destinationChainType is "ethereum" and
92
+ * destinationChainId is one of: "1", "8453", "42161", "4326".
93
+ */
94
+ contractCalls?: EvmContractCall[];
88
95
  /**
89
96
  * Pre-select source token/chain in the Transfer Crypto view.
90
97
  * All four props are optional. To match a specific token, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { QueryClient } from '@tanstack/react-query';
4
4
  import { ChainType, DepositConfirmationMode, 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, FontConfig, HeaderTokens, InputTokens, ListTokens, SearchTokens, ThemeColors, ThemeConfig, ThemeMode, UseSupportedDepositTokensOptions, WithdrawTransactionInfo, useSupportedDepositTokens } from '@unifold/ui-react';
6
- import { DepositEvent } from '@unifold/core';
6
+ import { EvmContractCall, DepositEvent } from '@unifold/core';
7
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';
8
8
 
9
9
  interface UnifoldConnectProviderConfig {
@@ -85,6 +85,13 @@ interface DepositConfig {
85
85
  destinationTokenAddress: string;
86
86
  destinationTokenSymbol: string;
87
87
  recipientAddress: string;
88
+ /**
89
+ * Array of contract calls to execute on the destination chain when delivering funds.
90
+ * Each entry specifies a target contract address, hex-encoded data, and optional value in wei (defaults to "0").
91
+ * Only supported when destinationChainType is "ethereum" and
92
+ * destinationChainId is one of: "1", "8453", "42161", "4326".
93
+ */
94
+ contractCalls?: EvmContractCall[];
88
95
  /**
89
96
  * Pre-select source token/chain in the Transfer Crypto view.
90
97
  * All four props are optional. To match a specific token, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
package/dist/index.js CHANGED
@@ -6220,6 +6220,7 @@ async function createDepositAddress(overrides, publishableKey) {
6220
6220
  recipient_address: overrides?.recipient_address || DEFAULT_CONFIG.recipientAddress || "0x309a4154a2CD4153Da886E780890C9cb5161553C",
6221
6221
  ...overrides?.action_type ? { action_type: overrides.action_type } : {},
6222
6222
  ...overrides?.source_chain_type ? { source_chain_type: overrides.source_chain_type } : {},
6223
+ ...overrides?.contract_calls ? { contract_calls: overrides.contract_calls } : {},
6223
6224
  client_metadata: overrides?.client_metadata || {}
6224
6225
  };
6225
6226
  const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
@@ -14061,6 +14062,7 @@ function useDepositAddress(params) {
14061
14062
  destinationChainId,
14062
14063
  destinationTokenAddress,
14063
14064
  actionType,
14065
+ contractCalls,
14064
14066
  enabled = true
14065
14067
  } = params;
14066
14068
  return (0, import_react_query3.useQuery)({
@@ -14073,6 +14075,7 @@ function useDepositAddress(params) {
14073
14075
  destinationChainId ?? null,
14074
14076
  destinationTokenAddress ?? null,
14075
14077
  actionType ?? null,
14078
+ contractCalls ?? null,
14076
14079
  publishableKey
14077
14080
  ],
14078
14081
  queryFn: () => createDepositAddress(
@@ -14082,7 +14085,8 @@ function useDepositAddress(params) {
14082
14085
  destination_chain_type: destinationChainType,
14083
14086
  destination_chain_id: destinationChainId,
14084
14087
  destination_token_address: destinationTokenAddress,
14085
- action_type: actionType
14088
+ action_type: actionType,
14089
+ contract_calls: contractCalls
14086
14090
  },
14087
14091
  publishableKey
14088
14092
  ),
@@ -27223,6 +27227,7 @@ function DepositModal({
27223
27227
  destinationChainType,
27224
27228
  destinationChainId,
27225
27229
  destinationTokenAddress,
27230
+ contractCalls,
27226
27231
  defaultSourceChainType,
27227
27232
  defaultSourceChainId,
27228
27233
  defaultSourceTokenAddress,
@@ -27349,6 +27354,7 @@ function DepositModal({
27349
27354
  destinationChainType,
27350
27355
  destinationChainId,
27351
27356
  destinationTokenAddress,
27357
+ contractCalls,
27352
27358
  enabled: open
27353
27359
  // Only fetch when modal is open
27354
27360
  });
@@ -30682,6 +30688,7 @@ function UnifoldProvider2({
30682
30688
  destinationChainType: depositConfig.destinationChainType,
30683
30689
  destinationChainId: depositConfig.destinationChainId,
30684
30690
  destinationTokenAddress: depositConfig.destinationTokenAddress,
30691
+ contractCalls: depositConfig.contractCalls,
30685
30692
  defaultSourceChainType: depositConfig.defaultSourceChainType,
30686
30693
  defaultSourceChainId: depositConfig.defaultSourceChainId,
30687
30694
  defaultSourceTokenAddress: depositConfig.defaultSourceTokenAddress,
package/dist/index.mjs CHANGED
@@ -6193,6 +6193,7 @@ async function createDepositAddress(overrides, publishableKey) {
6193
6193
  recipient_address: overrides?.recipient_address || DEFAULT_CONFIG.recipientAddress || "0x309a4154a2CD4153Da886E780890C9cb5161553C",
6194
6194
  ...overrides?.action_type ? { action_type: overrides.action_type } : {},
6195
6195
  ...overrides?.source_chain_type ? { source_chain_type: overrides.source_chain_type } : {},
6196
+ ...overrides?.contract_calls ? { contract_calls: overrides.contract_calls } : {},
6196
6197
  client_metadata: overrides?.client_metadata || {}
6197
6198
  };
6198
6199
  const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
@@ -14047,6 +14048,7 @@ function useDepositAddress(params) {
14047
14048
  destinationChainId,
14048
14049
  destinationTokenAddress,
14049
14050
  actionType,
14051
+ contractCalls,
14050
14052
  enabled = true
14051
14053
  } = params;
14052
14054
  return useQuery2({
@@ -14059,6 +14061,7 @@ function useDepositAddress(params) {
14059
14061
  destinationChainId ?? null,
14060
14062
  destinationTokenAddress ?? null,
14061
14063
  actionType ?? null,
14064
+ contractCalls ?? null,
14062
14065
  publishableKey
14063
14066
  ],
14064
14067
  queryFn: () => createDepositAddress(
@@ -14068,7 +14071,8 @@ function useDepositAddress(params) {
14068
14071
  destination_chain_type: destinationChainType,
14069
14072
  destination_chain_id: destinationChainId,
14070
14073
  destination_token_address: destinationTokenAddress,
14071
- action_type: actionType
14074
+ action_type: actionType,
14075
+ contract_calls: contractCalls
14072
14076
  },
14073
14077
  publishableKey
14074
14078
  ),
@@ -27209,6 +27213,7 @@ function DepositModal({
27209
27213
  destinationChainType,
27210
27214
  destinationChainId,
27211
27215
  destinationTokenAddress,
27216
+ contractCalls,
27212
27217
  defaultSourceChainType,
27213
27218
  defaultSourceChainId,
27214
27219
  defaultSourceTokenAddress,
@@ -27335,6 +27340,7 @@ function DepositModal({
27335
27340
  destinationChainType,
27336
27341
  destinationChainId,
27337
27342
  destinationTokenAddress,
27343
+ contractCalls,
27338
27344
  enabled: open
27339
27345
  // Only fetch when modal is open
27340
27346
  });
@@ -30668,6 +30674,7 @@ function UnifoldProvider2({
30668
30674
  destinationChainType: depositConfig.destinationChainType,
30669
30675
  destinationChainId: depositConfig.destinationChainId,
30670
30676
  destinationTokenAddress: depositConfig.destinationTokenAddress,
30677
+ contractCalls: depositConfig.contractCalls,
30671
30678
  defaultSourceChainType: depositConfig.defaultSourceChainType,
30672
30679
  defaultSourceChainId: depositConfig.defaultSourceChainId,
30673
30680
  defaultSourceTokenAddress: depositConfig.defaultSourceTokenAddress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unifold/connect-react",
3
- "version": "0.1.60",
3
+ "version": "0.1.61",
4
4
  "description": "Unifold Connect React - Complete React SDK with UI components for crypto deposits",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -26,9 +26,9 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@tanstack/react-query": "^5.90.11",
29
- "@unifold/core": "0.1.60",
30
- "@unifold/react-provider": "0.1.60",
31
- "@unifold/ui-react": "0.1.60"
29
+ "@unifold/core": "0.1.61",
30
+ "@unifold/ui-react": "0.1.61",
31
+ "@unifold/react-provider": "0.1.61"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/react": "^19.0.0",