@unifold/ui-react 0.1.7 → 0.1.9

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
@@ -61,6 +61,12 @@ declare function getApiBaseUrl(): string;
61
61
  * like "http://localhost:3002/api/public/icons/networks/ethereum.svg"
62
62
  */
63
63
  declare function getIconUrl(iconPath: string): string;
64
+ /**
65
+ * Build an icon URL using a custom CDN base URL
66
+ * Converts relative paths like "/icons/networks/ethereum.svg" to full CDN URLs
67
+ * Falls back to getIconUrl if no CDN URL is provided
68
+ */
69
+ declare function getIconUrlWithCdn(iconPath: string, assetCdnUrl?: string): string;
64
70
  interface Wallet {
65
71
  id: string;
66
72
  chain_type: "ethereum" | "solana" | "bitcoin";
@@ -109,7 +115,9 @@ interface AutoSwapResponse {
109
115
  id: string;
110
116
  project_id: string;
111
117
  user_id: string;
112
- wallet_id: string;
118
+ deposit_wallet_id: string;
119
+ owner_type?: string;
120
+ owner_id?: string;
113
121
  transaction_hash: string;
114
122
  recipient_address: string;
115
123
  provider: string;
@@ -121,6 +129,7 @@ interface AutoSwapResponse {
121
129
  destination_chain_id: string;
122
130
  destination_token_address: string;
123
131
  source_amount_base_unit: string;
132
+ source_amount_usd?: string;
124
133
  destination_amount_base_unit: string;
125
134
  provider_metadata: unknown;
126
135
  created_at?: string;
@@ -131,6 +140,21 @@ interface AutoSwapResponse {
131
140
  status: ExecutionStatus;
132
141
  source_token_metadata?: {
133
142
  icon_url: string;
143
+ icon_urls?: IconUrl[];
144
+ };
145
+ destination_token_metadata?: {
146
+ icon_url: string;
147
+ icon_urls?: IconUrl[];
148
+ };
149
+ deposit_wallet?: {
150
+ id: string;
151
+ chain_type: string;
152
+ address_type: string | null;
153
+ address: string;
154
+ is_primary: boolean;
155
+ created_at: string;
156
+ updated_at: string;
157
+ last_used_at: string | null;
134
158
  };
135
159
  }
136
160
  declare const SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
@@ -347,8 +371,9 @@ interface BuyWithCardProps {
347
371
  }) => void;
348
372
  themeClass?: string;
349
373
  wallets?: Wallet[];
374
+ assetCdnUrl?: string;
350
375
  }
351
- declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, themeClass, wallets: externalWallets, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
376
+ declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, themeClass, wallets: externalWallets, assetCdnUrl, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
352
377
 
353
378
  interface CurrencyModalProps {
354
379
  open: boolean;
@@ -370,9 +395,10 @@ interface DepositSuccessToastProps {
370
395
  completionExplorerUrl?: string;
371
396
  status: ExecutionStatus;
372
397
  tokenIconUrl?: string;
398
+ sourceAmountBaseUnit?: string;
373
399
  onClose: () => void;
374
400
  }
375
- declare function DepositSuccessToast({ depositTx, completionTx, orderSubmittedAt, orderFilledAt, explorerUrl, completionExplorerUrl, status, tokenIconUrl, onClose, }: DepositSuccessToastProps): react_jsx_runtime.JSX.Element;
401
+ declare function DepositSuccessToast({ depositTx, orderSubmittedAt, status, tokenIconUrl, sourceAmountBaseUnit, onClose, }: DepositSuccessToastProps): react_jsx_runtime.JSX.Element;
376
402
 
377
403
  interface DepositsModalProps {
378
404
  open: boolean;
@@ -419,10 +445,17 @@ declare function DepositTrackerButton({ onClick, title, subtitle, badge, }: Depo
419
445
 
420
446
  interface DepositExecutionItemProps {
421
447
  execution: AutoSwapResponse;
422
- showCloseButton?: boolean;
423
- onClose?: () => void;
448
+ onClick?: () => void;
449
+ }
450
+ declare function DepositExecutionItem({ execution, onClick, }: DepositExecutionItemProps): react_jsx_runtime.JSX.Element;
451
+
452
+ interface DepositDetailModalProps {
453
+ open: boolean;
454
+ onOpenChange: (open: boolean) => void;
455
+ execution: AutoSwapResponse | null;
456
+ themeClass?: string;
424
457
  }
425
- declare function DepositExecutionItem({ execution, showCloseButton, onClose, }: DepositExecutionItemProps): react_jsx_runtime.JSX.Element;
458
+ declare function DepositDetailModal({ open, onOpenChange, execution, themeClass, }: DepositDetailModalProps): react_jsx_runtime.JSX.Element | null;
426
459
 
427
460
  interface CurrencyListItemProps {
428
461
  currency: FiatCurrency;
@@ -583,4 +616,4 @@ declare const i18n: {
583
616
  };
584
617
  type I18nStrings = typeof i18n;
585
618
 
586
- export { type AutoSwapRequest, type AutoSwapResponse, Button, type ButtonProps, BuyWithCard, type CreateEOARequest, CurrencyListItem, CurrencyListSection, CurrencyModal, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type EOAResponse, ExecutionStatus, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type MeldQuote, type MeldQuotesRequest, type MeldQuotesResponse, type MeldSessionRequest, type MeldSessionResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCrypto, TransferCrypto2, TransferCryptoBase, TransferCryptoButton, type UserIpInfo, type Wallet, buttonVariants, cn, createEOA, createMeldSession, getApiBaseUrl, getFiatCurrencies, getIconUrl, getMeldQuotes, getSupportedDepositTokens, getWalletByChainType, i18n, queryExecutions, setApiConfig, useTheme, useUserIp };
619
+ export { type AutoSwapRequest, type AutoSwapResponse, Button, type ButtonProps, BuyWithCard, type CreateEOARequest, CurrencyListItem, CurrencyListSection, CurrencyModal, DepositDetailModal, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type EOAResponse, ExecutionStatus, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type MeldQuote, type MeldQuotesRequest, type MeldQuotesResponse, type MeldSessionRequest, type MeldSessionResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCrypto, TransferCrypto2, TransferCryptoBase, TransferCryptoButton, type UserIpInfo, type Wallet, buttonVariants, cn, createEOA, createMeldSession, getApiBaseUrl, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getMeldQuotes, getSupportedDepositTokens, getWalletByChainType, i18n, queryExecutions, setApiConfig, useTheme, useUserIp };
package/dist/index.d.ts CHANGED
@@ -61,6 +61,12 @@ declare function getApiBaseUrl(): string;
61
61
  * like "http://localhost:3002/api/public/icons/networks/ethereum.svg"
62
62
  */
63
63
  declare function getIconUrl(iconPath: string): string;
64
+ /**
65
+ * Build an icon URL using a custom CDN base URL
66
+ * Converts relative paths like "/icons/networks/ethereum.svg" to full CDN URLs
67
+ * Falls back to getIconUrl if no CDN URL is provided
68
+ */
69
+ declare function getIconUrlWithCdn(iconPath: string, assetCdnUrl?: string): string;
64
70
  interface Wallet {
65
71
  id: string;
66
72
  chain_type: "ethereum" | "solana" | "bitcoin";
@@ -109,7 +115,9 @@ interface AutoSwapResponse {
109
115
  id: string;
110
116
  project_id: string;
111
117
  user_id: string;
112
- wallet_id: string;
118
+ deposit_wallet_id: string;
119
+ owner_type?: string;
120
+ owner_id?: string;
113
121
  transaction_hash: string;
114
122
  recipient_address: string;
115
123
  provider: string;
@@ -121,6 +129,7 @@ interface AutoSwapResponse {
121
129
  destination_chain_id: string;
122
130
  destination_token_address: string;
123
131
  source_amount_base_unit: string;
132
+ source_amount_usd?: string;
124
133
  destination_amount_base_unit: string;
125
134
  provider_metadata: unknown;
126
135
  created_at?: string;
@@ -131,6 +140,21 @@ interface AutoSwapResponse {
131
140
  status: ExecutionStatus;
132
141
  source_token_metadata?: {
133
142
  icon_url: string;
143
+ icon_urls?: IconUrl[];
144
+ };
145
+ destination_token_metadata?: {
146
+ icon_url: string;
147
+ icon_urls?: IconUrl[];
148
+ };
149
+ deposit_wallet?: {
150
+ id: string;
151
+ chain_type: string;
152
+ address_type: string | null;
153
+ address: string;
154
+ is_primary: boolean;
155
+ created_at: string;
156
+ updated_at: string;
157
+ last_used_at: string | null;
134
158
  };
135
159
  }
136
160
  declare const SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
@@ -347,8 +371,9 @@ interface BuyWithCardProps {
347
371
  }) => void;
348
372
  themeClass?: string;
349
373
  wallets?: Wallet[];
374
+ assetCdnUrl?: string;
350
375
  }
351
- declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, themeClass, wallets: externalWallets, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
376
+ declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, themeClass, wallets: externalWallets, assetCdnUrl, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
352
377
 
353
378
  interface CurrencyModalProps {
354
379
  open: boolean;
@@ -370,9 +395,10 @@ interface DepositSuccessToastProps {
370
395
  completionExplorerUrl?: string;
371
396
  status: ExecutionStatus;
372
397
  tokenIconUrl?: string;
398
+ sourceAmountBaseUnit?: string;
373
399
  onClose: () => void;
374
400
  }
375
- declare function DepositSuccessToast({ depositTx, completionTx, orderSubmittedAt, orderFilledAt, explorerUrl, completionExplorerUrl, status, tokenIconUrl, onClose, }: DepositSuccessToastProps): react_jsx_runtime.JSX.Element;
401
+ declare function DepositSuccessToast({ depositTx, orderSubmittedAt, status, tokenIconUrl, sourceAmountBaseUnit, onClose, }: DepositSuccessToastProps): react_jsx_runtime.JSX.Element;
376
402
 
377
403
  interface DepositsModalProps {
378
404
  open: boolean;
@@ -419,10 +445,17 @@ declare function DepositTrackerButton({ onClick, title, subtitle, badge, }: Depo
419
445
 
420
446
  interface DepositExecutionItemProps {
421
447
  execution: AutoSwapResponse;
422
- showCloseButton?: boolean;
423
- onClose?: () => void;
448
+ onClick?: () => void;
449
+ }
450
+ declare function DepositExecutionItem({ execution, onClick, }: DepositExecutionItemProps): react_jsx_runtime.JSX.Element;
451
+
452
+ interface DepositDetailModalProps {
453
+ open: boolean;
454
+ onOpenChange: (open: boolean) => void;
455
+ execution: AutoSwapResponse | null;
456
+ themeClass?: string;
424
457
  }
425
- declare function DepositExecutionItem({ execution, showCloseButton, onClose, }: DepositExecutionItemProps): react_jsx_runtime.JSX.Element;
458
+ declare function DepositDetailModal({ open, onOpenChange, execution, themeClass, }: DepositDetailModalProps): react_jsx_runtime.JSX.Element | null;
426
459
 
427
460
  interface CurrencyListItemProps {
428
461
  currency: FiatCurrency;
@@ -583,4 +616,4 @@ declare const i18n: {
583
616
  };
584
617
  type I18nStrings = typeof i18n;
585
618
 
586
- export { type AutoSwapRequest, type AutoSwapResponse, Button, type ButtonProps, BuyWithCard, type CreateEOARequest, CurrencyListItem, CurrencyListSection, CurrencyModal, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type EOAResponse, ExecutionStatus, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type MeldQuote, type MeldQuotesRequest, type MeldQuotesResponse, type MeldSessionRequest, type MeldSessionResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCrypto, TransferCrypto2, TransferCryptoBase, TransferCryptoButton, type UserIpInfo, type Wallet, buttonVariants, cn, createEOA, createMeldSession, getApiBaseUrl, getFiatCurrencies, getIconUrl, getMeldQuotes, getSupportedDepositTokens, getWalletByChainType, i18n, queryExecutions, setApiConfig, useTheme, useUserIp };
619
+ export { type AutoSwapRequest, type AutoSwapResponse, Button, type ButtonProps, BuyWithCard, type CreateEOARequest, CurrencyListItem, CurrencyListSection, CurrencyModal, DepositDetailModal, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type EOAResponse, ExecutionStatus, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type MeldQuote, type MeldQuotesRequest, type MeldQuotesResponse, type MeldSessionRequest, type MeldSessionResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCrypto, TransferCrypto2, TransferCryptoBase, TransferCryptoButton, type UserIpInfo, type Wallet, buttonVariants, cn, createEOA, createMeldSession, getApiBaseUrl, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getMeldQuotes, getSupportedDepositTokens, getWalletByChainType, i18n, queryExecutions, setApiConfig, useTheme, useUserIp };