@pollar/react 0.10.1-rc.0 → 0.10.1-rc.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.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { pollarPaths, PollarClient, PollarClientConfig, PollarAdapters, OnStorageDegrade, WalletInfo, PollarLoginOptions, SessionsState, TransactionState, TxBuildBody, BuildOutcome, SubmitOutcome, SignOutcome, StellarNetwork, WalletBalanceState, EnabledAssetsState, TrustlineOutcome, TxHistoryState, SwapVenue, SwapToken, SwapQuoteParams, SwapQuote, PollarAdapter, WalletId, KycStatus as KycStatus$1, RampQuote, AuthState, KycProvider, KycStartResponse, RampDirection, RampTxStatus, EnabledAssetRecord, WalletBalanceRecord, SwapProvider, DistributionRulesState, DistributionRule } from '@pollar/core';
2
+ import { pollarPaths, PollarClient, PollarClientConfig, PollarAdapters, OnStorageDegrade, WalletInfo, PollarLoginOptions, SessionsState, TransactionState, TxBuildBody, BuildOutcome, SubmitOutcome, SignOutcome, StellarNetwork, WalletBalanceState, EnabledAssetsState, TrustlineOutcome, TxHistoryState, SwapVenue, SwapToken, SwapQuoteParams, SwapQuote, PollarAdapter, WalletId, KycStatus as KycStatus$1, RampQuote, AuthState, KycProvider, KycStartResponse, RampDirection, RampCountry, RampTxStatus, EnabledAssetRecord, WalletBalanceRecord, SwapProvider, DistributionRulesState, DistributionRule } from '@pollar/core';
3
3
  export { AuthProviderContext, PollarAuthProvider, SessionsState } from '@pollar/core';
4
4
  import { ReactNode } from 'react';
5
5
 
@@ -308,7 +308,7 @@ interface KycModalTemplateProps {
308
308
  }
309
309
  declare function KycModalTemplate({ theme, accentColor, step, providers, selectedProvider, session, kycStatus, isLoading, onSelectProvider, onDoneVerifying, onClose, }: KycModalTemplateProps): react_jsx_runtime.JSX.Element;
310
310
 
311
- type RampStep = 'input' | 'loading_quote' | 'select_route' | 'status' | 'error';
311
+ type RampStep = 'input' | 'loading_quote' | 'select_route' | 'contact' | 'status' | 'error';
312
312
  interface RampWidgetTemplateProps {
313
313
  theme: string;
314
314
  accentColor: string;
@@ -317,27 +317,36 @@ interface RampWidgetTemplateProps {
317
317
  amount: string;
318
318
  currency: string;
319
319
  country: string;
320
+ email: string;
321
+ fullName: string;
322
+ countries: RampCountry[];
323
+ countriesLoading: boolean;
324
+ refreshing: boolean;
320
325
  quotes: RampQuote[];
321
326
  isLoading: boolean;
322
327
  provider: string;
323
328
  txStatus: RampTxStatus | null;
324
329
  kycUrl: string | null;
325
330
  stellarTxHash: string | null;
331
+ depositInstructions: Record<string, unknown> | null;
326
332
  canComplete: boolean;
327
333
  completing: boolean;
328
334
  errorMsg: string | null;
329
335
  onDirectionChange: (d: RampDirection) => void;
330
336
  onAmountChange: (v: string) => void;
331
- onCurrencyChange: (v: string) => void;
337
+ onEmailChange: (v: string) => void;
338
+ onFullNameChange: (v: string) => void;
332
339
  onCountryChange: (v: string) => void;
333
340
  onFindRoute: () => void;
334
341
  onSelectQuote: (q: RampQuote) => void;
342
+ onContactContinue: () => void;
335
343
  onOpenKyc: () => void;
336
344
  onCompleteWithdraw: () => void;
337
345
  onRetry: () => void;
346
+ onRefresh: () => void;
338
347
  onClose: () => void;
339
348
  }
340
- declare function RampWidgetTemplate({ theme, accentColor, step, direction, amount, currency, country, quotes, isLoading, provider, txStatus, kycUrl, stellarTxHash, canComplete, completing, errorMsg, onDirectionChange, onAmountChange, onCurrencyChange, onCountryChange, onFindRoute, onSelectQuote, onOpenKyc, onCompleteWithdraw, onRetry, onClose, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
349
+ declare function RampWidgetTemplate({ theme, accentColor, step, direction, amount, currency, country, email, fullName, countries, countriesLoading, refreshing, quotes, isLoading, provider, txStatus, kycUrl, stellarTxHash, depositInstructions, canComplete, completing, errorMsg, onDirectionChange, onAmountChange, onEmailChange, onFullNameChange, onCountryChange, onFindRoute, onSelectQuote, onContactContinue, onOpenKyc, onCompleteWithdraw, onRetry, onRefresh, onClose, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
341
350
 
342
351
  interface TransactionModalTemplateProps {
343
352
  theme: string;
@@ -482,6 +491,8 @@ interface SwapModalTemplateProps {
482
491
  onRefresh: () => void;
483
492
  onSelectSell: (o: SwapAssetOption) => void;
484
493
  onSelectBuy: (o: SwapAssetOption) => void;
494
+ /** Add a user-pasted token (code + issuer) to the buy list. Returns an error or null. */
495
+ onAddCustomToken: (code: string, issuer: string) => string | null;
485
496
  onAmountChange: (value: string) => void;
486
497
  onProviderChange: (p: SwapProvider) => void;
487
498
  onSwap: () => void;
@@ -490,7 +501,7 @@ interface SwapModalTemplateProps {
490
501
  onRetry: () => void;
491
502
  onDone: () => void;
492
503
  }
493
- declare function SwapModalTemplate({ theme, accentColor, step, txTitle, sellOptions, buyOptions, selectedSell, selectedBuy, amount, provider, providers, quote, quoteLoading, quoteError, formError, isLoadingData, smartUnsupported, configLoading, swapUnavailable, buyNeedsTrustline, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectSell, onSelectBuy, onAmountChange, onProviderChange, onSwap, onToggleXdr, onCopyHash, onRetry, onDone, }: SwapModalTemplateProps): react_jsx_runtime.JSX.Element;
504
+ declare function SwapModalTemplate({ theme, accentColor, step, txTitle, sellOptions, buyOptions, selectedSell, selectedBuy, amount, provider, providers, quote, quoteLoading, quoteError, formError, isLoadingData, smartUnsupported, configLoading, swapUnavailable, buyNeedsTrustline, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectSell, onSelectBuy, onAddCustomToken, onAmountChange, onProviderChange, onSwap, onToggleXdr, onCopyHash, onRetry, onDone, }: SwapModalTemplateProps): react_jsx_runtime.JSX.Element;
494
505
 
495
506
  interface ReceiveModalTemplateProps {
496
507
  theme: string;